:root{font-family:Arial,Helvetica,sans-serif;color:#222;background:#f4f4f2}*{box-sizing:border-box}body{margin:0}.login-body{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(430px,100%);background:#fff;border:1px solid #ddd;border-radius:12px;padding:30px;box-shadow:0 8px 30px rgba(0,0,0,.08)}.brand{text-transform:uppercase;letter-spacing:.14em;font-weight:700}.login-card h1{margin:.35rem 0}.muted{color:#666}label{display:block;font-weight:700;margin:18px 0}input{display:block;width:100%;padding:11px;margin-top:7px;border:1px solid #aaa;border-radius:7px;font:inherit}button{padding:11px 18px;border:0;border-radius:7px;background:#222;color:#fff;font-weight:700;cursor:pointer}.alert{background:#fff0f0;border:1px solid #d99;padding:10px;border-radius:7px}.success{background:#effaf0;border:1px solid #9c9;padding:12px;border-radius:7px}.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 22px;background:#222;color:#fff}.user,.user form{display:flex;gap:12px;align-items:center}.linkbtn{padding:0;background:transparent;text-decoration:underline}.shell{max-width:1200px;margin:auto;padding:28px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.card{background:#fff;border:1px solid #ddd;border-radius:10px;padding:18px}.card h2{margin-top:0}.coming{font-size:.85rem;color:#666}code{font-size:.85rem}

body:not(.login-body){background:#f5f7f5;color:#17211b}.hidden{display:none!important}.topbar{position:sticky;top:0;z-index:20;min-height:58px;background:#173d2b}.topbar-brand{display:flex;gap:8px;align-items:center}.menu-button{display:none;background:transparent;color:#fff;font-size:22px;padding:4px}.app-layout{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 58px)}.sidebar{background:#fff;border-right:1px solid #dce3de;padding:18px 12px}.sidebar nav{display:grid;gap:5px}.nav-item{display:flex;justify-content:space-between;width:100%;padding:11px 12px;border:0;border-radius:7px;background:transparent;text-align:left;font-weight:650;color:#26382d}.nav-item.active{background:#e5f0e9;color:#153d29}.nav-item.pending{opacity:.48}.nav-item span{font-size:10px;text-transform:uppercase}.main-content{min-width:0;padding:28px;max-width:1500px;width:100%;margin:0 auto}.page-heading,.section-heading{display:flex;justify-content:space-between;align-items:center;gap:18px}.page-heading{margin-bottom:20px}.page-heading h1{margin:0;font-size:30px}.page-heading p{margin:5px 0 0;color:#637068}.panel,.summary-card,.detail-card{background:#fff;border:1px solid #dce3de;border-radius:10px}.panel{padding:18px;margin-bottom:18px}.summary-grid,.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.summary-card,.detail-card{padding:17px}.summary-card span,.detail-card span{display:block;color:#657269;font-size:12px;text-transform:uppercase;letter-spacing:.04em}.summary-card strong{display:block;font-size:25px;margin-top:5px}.detail-card strong{display:block;font-size:17px;margin-top:6px}.filter-panel{display:flex;align-items:end;gap:22px}.search-field{display:grid;gap:6px;flex:1;font-weight:650;margin:0}.search-field input,textarea{width:100%;padding:10px 11px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;font:inherit}.checkbox-field{display:flex;align-items:center;gap:8px;padding-bottom:10px;margin:0}.checkbox-field input{display:inline;width:auto;margin:0}.table-panel{padding:0;overflow:hidden}.table-panel .section-heading{padding:16px 18px 0}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;white-space:nowrap}.data-table th,.data-table td{padding:12px 14px;border-bottom:1px solid #e6ebe7;text-align:right}.data-table th{background:#f1f5f2;color:#536159;font-size:12px;text-transform:uppercase;position:sticky;top:0}.data-table th:first-child,.data-table td:first-child,.data-table th:nth-child(2),.data-table td:nth-child(2),.data-table th:nth-child(3),.data-table td:nth-child(3),.data-table th:nth-child(4),.data-table td:nth-child(4){text-align:left}.data-table td small{display:block;color:#758078;margin-top:2px}.clickable-row{cursor:pointer}.clickable-row:hover,.clickable-row:focus{background:#eef5f0;outline:none}.loading,.empty-state{padding:30px;text-align:center;color:#68746c}.primary-button,.secondary-button,.back-button{border-radius:7px;padding:9px 14px;font-weight:700;cursor:pointer}.primary-button{border:1px solid #173d2b;background:#173d2b;color:#fff}.secondary-button{border:1px solid #8da096;background:#fff;color:#173d2b}.back-button{border:0;background:transparent;color:#24513a;padding-left:0}.message{padding:11px 13px;border-radius:7px;margin-bottom:16px}.message.error{background:#fff0ef;border:1px solid #e2b3af;color:#7b2620}.message.success{background:#eaf6ee;border:1px solid #afd1b9;color:#215c32}.section-heading h2{margin:0 0 12px}textarea{display:block;resize:vertical;margin:0}.muted{color:#68746c}

@media(max-width:850px){.app-layout{grid-template-columns:1fr}.menu-button{display:block}.sidebar{display:none;position:fixed;top:58px;bottom:0;left:0;width:240px;z-index:15;box-shadow:8px 0 30px #0002}.sidebar.open{display:block}.main-content{padding:18px}.summary-grid,.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar-brand span,.user>span{display:none}}
@media(max-width:520px){.summary-grid,.detail-grid{grid-template-columns:1fr}.filter-panel,.page-heading{align-items:stretch;flex-direction:column}.secondary-button{width:100%}}

/* Keep the desktop tank inventory visible without horizontal scrolling. */
@media(min-width:851px){
  #tankTable{table-layout:fixed;white-space:normal}
  #tankTable th,#tankTable td{padding-left:10px;padding-right:10px}
  #tankTable th:nth-child(1),#tankTable td:nth-child(1){width:24%}
  #tankTable td:nth-child(1) .cell-value,#tankTable td:nth-child(1) strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #tankTable th:nth-child(2),#tankTable td:nth-child(2){width:11%}
  #tankTable th:nth-child(3),#tankTable td:nth-child(3){width:13%}
  #tankTable th:nth-child(4),#tankTable td:nth-child(4){width:12%}
  #tankTable td:nth-child(4) .cell-value{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #tankTable th:nth-child(5),#tankTable td:nth-child(5){width:9%;white-space:nowrap}
  #tankTable th:nth-child(6),#tankTable td:nth-child(6){width:10%;white-space:nowrap}
  #tankTable th:nth-child(7),#tankTable td:nth-child(7){width:11%;white-space:nowrap}
  #tankTable th:nth-child(8),#tankTable td:nth-child(8){width:10%;white-space:nowrap}
}

/* Touch layout used by current and future responsive data tables. */
@media(max-width:850px){
  .responsive-table,.responsive-table tbody{display:block;width:100%;white-space:normal}
  .responsive-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .responsive-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}
  .responsive-table tr{display:block;min-width:0;background:#fff;border:1px solid #dce3de;border-radius:9px;overflow:hidden}
  .responsive-table td,.responsive-table td:first-child,.responsive-table td:nth-child(2),.responsive-table td:nth-child(3),.responsive-table td:nth-child(4){display:grid;grid-template-columns:minmax(78px,34%) minmax(0,1fr);gap:10px;align-items:start;width:100%;padding:8px 11px;border-bottom:1px solid #edf0ed;text-align:left;white-space:normal}
  .responsive-table td:last-child{border-bottom:0}
  .responsive-table td::before{content:attr(data-label);color:#657269;font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase}
  .responsive-table .cell-value{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
  .responsive-table td:first-child .cell-value{text-align:left}
  .responsive-table .cell-value small{white-space:normal}
  .responsive-table .clickable-row:hover,.responsive-table .clickable-row:focus{border-color:#7d9a89}
}
@media(max-width:600px){
  .responsive-table tbody{grid-template-columns:1fr;padding:10px}
  .topbar{padding-left:14px;padding-right:14px}
  .main-content{padding:14px}
  .panel{padding:14px}
  .table-panel{padding:0}
}

/* Inventory module */
.tab-bar{display:flex;gap:8px;margin-bottom:18px}.tab-button{border:1px solid #9aaba1;background:#fff;color:#173d2b}.tab-button.active{background:#173d2b;color:#fff}.saved-record-panel{display:grid;grid-template-columns:minmax(240px,1fr) minmax(360px,1.35fr);gap:18px;align-items:end}.help-text{margin:5px 0 0;color:#68746c;font-size:13px;line-height:1.4}.saved-record-controls{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:8px;align-items:center}.saved-record-controls select,.form-grid input,.inventory-input-table input{width:100%;padding:10px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;font:inherit}.inventory-form-panel>label{margin:16px 0}.notice{padding:12px;border-radius:7px;margin-bottom:16px;line-height:1.45}.notice.info{background:#eef6ee;border:1px solid #c9ddcf}.notice.warning{background:#fff6df;border:1px solid #e4cb88}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}.form-grid label{margin:0}.attestation{display:flex;gap:10px;align-items:flex-start;font-weight:600}.attestation input{width:auto;margin:3px 0 0;flex:0 0 auto}.inventory-table-wrap{border:1px solid #dce3de;border-radius:8px}.inventory-input-table{table-layout:fixed;white-space:normal}.inventory-input-table th,.inventory-input-table td{padding:9px 8px}.inventory-input-table th{position:static}.inventory-input-table input{padding:8px}.inventory-input-table td:nth-last-child(-n+6),.inventory-input-table th:nth-last-child(-n+6){text-align:right}.inventory-input-table td:nth-last-child(-n+2),.inventory-input-table th:nth-last-child(-n+2){text-align:left}.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.danger-button{border:1px solid #a83d34;background:#fff;color:#8a2821;border-radius:7px;padding:9px 14px;font-weight:700;cursor:pointer}.inventory-preview{margin-top:18px}.reconciliation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.recon-card{border:1px solid #dce3de;border-radius:9px;padding:14px;background:#fafcfb;min-width:0}.recon-card h3{margin:0;font-size:17px}.recon-card p{margin:4px 0 12px;color:#657269}.recon-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.recon-metric{min-width:0;background:#fff;border:1px solid #e3e9e5;border-radius:6px;padding:8px}.recon-metric span{display:block;color:#68746c;font-size:10px;text-transform:uppercase}.recon-metric strong{display:block;margin-top:4px;font-size:14px;overflow-wrap:anywhere}.recon-card details{margin-top:10px;font-size:13px}.recon-card ul{padding-left:20px}.preview-totals{margin-top:12px;padding:12px;background:#f1f5f2;border-radius:7px;line-height:1.6}
@media(min-width:1101px){
  .inventory-input-table{white-space:nowrap}
  .inventory-input-table td{overflow:hidden}
  .inventory-input-table .cell-value,.inventory-input-table .cell-value strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #invTankTable th:nth-child(1),#invTankTable td:nth-child(1){width:10%}#invTankTable th:nth-child(2),#invTankTable td:nth-child(2){width:18%}#invTankTable th:nth-child(3),#invTankTable td:nth-child(3){width:14%}#invTankTable th:nth-child(4),#invTankTable td:nth-child(4){width:8%}#invTankTable th:nth-child(5),#invTankTable td:nth-child(5){width:10%}#invTankTable th:nth-child(6),#invTankTable td:nth-child(6){width:9%}#invTankTable th:nth-child(7),#invTankTable td:nth-child(7){width:9%}#invTankTable th:nth-child(8),#invTankTable td:nth-child(8){width:11%}#invTankTable th:nth-child(9),#invTankTable td:nth-child(9){width:11%}
  #invBottleTable th:nth-child(1),#invBottleTable td:nth-child(1){width:25%}#invBottleTable th:nth-child(2),#invBottleTable td:nth-child(2){width:16%}#invBottleTable th:nth-child(3),#invBottleTable td:nth-child(3){width:14%}#invBottleTable th:nth-child(4),#invBottleTable td:nth-child(4){width:12%}#invBottleTable th:nth-child(5),#invBottleTable td:nth-child(5){width:10%}#invBottleTable th:nth-child(6),#invBottleTable td:nth-child(6){width:11%}#invBottleTable th:nth-child(7),#invBottleTable td:nth-child(7){width:12%}
}
@media(max-width:1100px){
  .saved-record-panel{grid-template-columns:1fr}.inventory-input-table,.inventory-input-table tbody{display:block;width:100%;white-space:normal}.inventory-input-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.inventory-input-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}.inventory-input-table tr{display:block;min-width:0;border:1px solid #dce3de;border-radius:9px;overflow:hidden}.inventory-input-table td,.inventory-input-table td:nth-last-child(-n+6),.inventory-input-table td:nth-last-child(-n+2){display:grid;grid-template-columns:minmax(105px,42%) minmax(0,1fr);gap:10px;align-items:center;width:100%;padding:8px 10px;border-bottom:1px solid #edf0ed;text-align:left}.inventory-input-table td:last-child{border-bottom:0}.inventory-input-table td::before{content:attr(data-label);color:#657269;font-size:11px;font-weight:700;text-transform:uppercase}.inventory-input-table .cell-value{text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inventory-input-table input{text-align:right}.recon-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){.saved-record-controls{grid-template-columns:1fr}.saved-record-controls button{width:100%}.form-grid{grid-template-columns:1fr}.inventory-input-table tbody,.reconciliation-grid{grid-template-columns:1fr}.recon-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.form-actions>*{flex:1 1 100%}}

/* Native Batching */
.nested-panel{margin-top:18px;padding:16px;border:1px solid var(--border,#ddd);border-radius:8px;background:#fafafa}.nested-panel h2{margin-top:0}.batch-ingredients{display:grid;gap:12px}.batch-ingredient-row{padding:14px;border:1px solid var(--border,#ddd);border-radius:8px;background:#fff}.batch-ingredient-grid{display:grid;grid-template-columns:1fr 1.4fr 1.2fr .8fr .8fr 1fr auto;gap:10px;align-items:end}.batch-source-preview{margin-top:8px;font-size:12px;color:#666}.batch-remove{white-space:nowrap}@media(max-width:900px){.batch-ingredient-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.batch-ingredient-grid{grid-template-columns:1fr}}

/* Native Batching form controls — match text inputs and support searchable tank lists. */
.batch-form-panel select,.batch-form-panel input,.batch-form-panel textarea,.batch-ingredient-row select,.batch-ingredient-row input{width:100%;box-sizing:border-box;padding:10px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;color:inherit;font:inherit;line-height:1.25}.batch-form-panel select,.batch-ingredient-row select{height:42px;appearance:auto}.batch-form-panel .select-search,.batch-ingredient-row .select-search{margin:0 0 6px;height:38px;padding:8px 10px}.batch-form-panel label,.batch-ingredient-row label{min-width:0}.batch-ingredient-grid{align-items:end}

/* Native Batching parity controls */
.batch-form-panel select,.batch-form-panel input,.batch-form-panel textarea{box-sizing:border-box;width:100%;min-height:42px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;padding:8px 10px;font:inherit;color:inherit}.batch-form-panel textarea{min-height:78px}.batch-form-panel .select-search{margin-bottom:6px}.batch-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.batch-row-head .secondary-button{width:auto}.batch-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;margin-bottom:16px}.batch-preview-grid>div{border:1px solid #d7dfda;border-radius:8px;padding:12px}.batch-preview-grid span{display:block;font-size:12px;color:#68746e;margin-bottom:4px}.batch-preview-grid strong{font-size:18px}.batch-recipe-preview{display:grid;gap:5px;margin-top:8px}.batch-allocation-total{margin-top:10px;font-weight:700}.batch-ingredient-row{margin-bottom:12px}@media(max-width:800px){.batch-preview-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}}


/* Batching v1.3 — compact, professional searchable tank controls. */
.batch-field{display:flex;flex-direction:column;min-width:0;margin:0}
.batch-field>label:first-child{display:block;margin:0 0 7px;font-weight:700}
.batch-form-panel .batch-field .select-search,.batch-ingredient-row .batch-field .select-search{margin:0 0 7px;min-height:42px}
.batch-check,.batch-form-panel .batch-check,.batch-ingredient-row .batch-check{display:inline-flex;align-items:center;align-self:flex-start;gap:8px;margin:0 0 8px;padding:0;font-weight:600;font-size:13px;color:#536159;line-height:1.2;cursor:pointer}
.batch-check input,.batch-form-panel .batch-check input,.batch-ingredient-row .batch-check input{appearance:auto!important;-webkit-appearance:checkbox!important;display:inline-block!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;border:1px solid #8da096!important;border-radius:3px!important;box-shadow:none!important;accent-color:#173d2b;vertical-align:middle}
.batch-check span{display:inline;white-space:nowrap}
.batch-form-panel select,.batch-ingredient-row select{min-height:42px}


/* Batching v1.4 — tank selector is the primary field; search/filter tools sit below it. */
.batch-tank-field>select{order:2}
.batch-tank-field>.tank-tools{order:3}
.tank-tools{display:flex;align-items:center;gap:10px;margin-top:7px;min-width:0}
.batch-form-panel .tank-tools .tank-search,.batch-ingredient-row .tank-tools .tank-search{flex:1 1 auto;width:auto;min-width:110px;min-height:34px;height:34px;margin:0;padding:6px 9px;font-size:13px;background:#fafcfb}
.tank-tools .batch-check,.batch-form-panel .tank-tools .batch-check,.batch-ingredient-row .tank-tools .batch-check{flex:0 0 auto;align-self:center;margin:0;white-space:nowrap;font-size:12px}
.batch-source-preview{padding-left:0}
@media(max-width:620px){.tank-tools{align-items:stretch;flex-direction:column;gap:6px}.tank-tools .batch-check,.batch-form-panel .tank-tools .batch-check,.batch-ingredient-row .tank-tools .batch-check{align-self:flex-start}}


/* Batching v1.5 — unified searchable tank combobox. Search and empty filter live inside dropdown. */
.tank-native-select{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
.tank-combobox{position:relative;width:100%;min-width:0}
.batch-form-panel .tank-combo-trigger,.batch-ingredient-row .tank-combo-trigger{position:relative;width:100%;min-height:42px;margin:0;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:inherit;font:inherit;font-weight:500;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tank-combo-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;line-height:1;color:#263d32}
.tank-combo-trigger:hover{border-color:#8fa098}.tank-combo-trigger:focus{outline:2px solid rgba(23,61,43,.16);outline-offset:1px;border-color:#547363}
.tank-combo-panel{position:absolute;z-index:80;left:0;right:0;top:calc(100% + 5px);padding:10px;border:1px solid #cbd5cf;border-radius:9px;background:#fff;box-shadow:0 10px 28px rgba(25,45,35,.16)}
.tank-combo-panel.hidden{display:none!important}
.batch-form-panel .tank-combo-panel .tank-search,.batch-ingredient-row .tank-combo-panel .tank-search{display:block;width:100%;height:38px;min-height:38px;margin:0 0 8px;padding:7px 10px;background:#fff;font-size:13px}
.tank-combo-panel .batch-check,.batch-form-panel .tank-combo-panel .batch-check,.batch-ingredient-row .tank-combo-panel .batch-check{display:flex;margin:0 -2px 8px;padding:3px 2px 8px;border-bottom:1px solid #e6ebe8;font-size:12px}
.tank-combo-options{max-height:245px;overflow-y:auto;overscroll-behavior:contain}
.tank-combo-option{display:block;width:100%;margin:0;padding:9px 10px;border:0;border-radius:6px;background:transparent;color:#1d2923;font:inherit;font-size:13px;text-align:left;cursor:pointer;white-space:normal}
.tank-combo-option:hover{background:#f1f5f2}.tank-combo-option.selected{background:#e7f0ea;font-weight:700;color:#173d2b}
.batch-tank-field>.tank-combobox{order:2}.batch-tank-field>.tank-tools{display:none!important}
@media(max-width:620px){.tank-combo-panel{min-width:260px;right:auto;width:min(330px,calc(100vw - 44px))}}


/* Batching v1.7 — production tank select: one closed select field; search + empty filter exist only inside floating dropdown. */
.tank-combobox{position:relative;width:100%;min-width:0}
.tank-combo-panel{position:absolute!important;display:block;z-index:1000;left:0;right:0;top:calc(100% + 5px);padding:0;border:1px solid #c8d1cc;border-radius:9px;background:#fff;box-shadow:0 12px 30px rgba(25,45,35,.18);overflow:hidden}
.tank-combo-panel.hidden{display:none!important}
.tank-combo-toolbar{display:flex;align-items:center;gap:10px;padding:9px;border-bottom:1px solid #e5ebe7;background:#fff}
.batch-form-panel .tank-combo-toolbar .tank-search,.batch-ingredient-row .tank-combo-toolbar .tank-search{flex:1 1 auto;width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;box-shadow:none!important}
.tank-combo-toolbar .batch-check,.batch-form-panel .tank-combo-toolbar .batch-check,.batch-ingredient-row .tank-combo-toolbar .batch-check{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;white-space:nowrap!important;font-size:12px!important;font-weight:500!important;color:#31463b!important}
.tank-combo-toolbar .batch-check input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;box-shadow:none!important}
.tank-combo-options{display:block!important;max-height:245px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:5px!important;background:#fff!important;overscroll-behavior:contain}
.tank-combo-option{display:block!important;width:100%!important;box-sizing:border-box!important;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;font-weight:400!important;line-height:1.35!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important;outline:0!important}
.tank-combo-option:hover,.tank-combo-option:focus{background:#f1f5f2!important;color:#173d2b!important}
.tank-combo-option.selected{background:#e7f0ea!important;color:#173d2b!important;font-weight:700!important}
.batch-tank-field>.tank-tools{display:none!important}
@media(max-width:620px){.tank-combo-toolbar{gap:7px}.tank-combo-toolbar .batch-check span{font-size:11px}.tank-combo-panel{min-width:280px;right:auto;width:min(360px,calc(100vw - 36px))}}

/* Native Recipes */
.recipes-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:20px;align-items:start}.recipes-list-panel{padding:0;overflow:hidden;position:sticky;top:18px}.recipes-list-head,.recipe-form-head,.recipe-ingredients-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.recipes-list-head{padding:18px;border-bottom:1px solid #e3e8e4}.recipes-list-head h2,.recipe-form-head h2,.recipe-ingredients-head h3,.recipe-subpanel h3{margin:0}.recipes-list-tools{padding:14px 18px;background:#f7f9f7;border-bottom:1px solid #e3e8e4;display:grid;gap:10px}.recipe-list{max-height:68vh;overflow:auto}.recipe-list-item{display:flex;width:100%;text-align:left;flex-direction:column;gap:3px;padding:13px 18px;border:0;border-bottom:1px solid #edf0ed;background:#fff;color:inherit;cursor:pointer}.recipe-list-item:hover{background:#f7faf8}.recipe-list-item.active{background:#edf5f0;box-shadow:inset 3px 0 0 #356b4d}.recipe-list-item span{font-size:13px}.recipe-list-item small{color:#66736b}.recipe-form-panel{max-width:none}.recipe-form-head{margin-bottom:16px}.status-badge{font-size:12px;padding:6px 9px;border-radius:999px;background:#eef1ef;color:#526158}.recipe-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.field-help{display:block;font-size:12px;color:#647069;margin-top:6px;min-height:16px}.recipe-subpanel{margin:22px 0;padding:18px;background:#f7f9f7;border:1px solid #e3e8e4;border-radius:9px}.recipe-ingredients-head{margin:24px 0 12px}.recipe-ing{border:1px solid #dce3de;border-radius:9px;padding:14px;margin-bottom:12px;background:#fff}.recipe-ing-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.recipe-ing-grid{display:grid;grid-template-columns:1fr 1.5fr .7fr .65fr .65fr;gap:10px;align-items:end}.ri-notes-wrap{margin-top:10px}.empty-state{padding:25px;text-align:center;color:#6b756e}@media(max-width:1050px){.recipes-layout{grid-template-columns:1fr}.recipes-list-panel{position:static}.recipe-list{max-height:340px}.recipe-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.recipe-main-grid,.recipe-ing-grid{grid-template-columns:1fr}.recipe-ingredients-head{align-items:flex-start;flex-direction:column}}


/* Recipes v1.1 — compact legacy-inspired production layout. */
.recipes-view{max-width:1180px}
.recipes-browser-panel{padding:0;margin-bottom:14px;overflow:hidden}
.recipes-browser-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px 8px}
.recipes-browser-head h2{margin:0;font-size:17px}
.recipes-browser-tools{display:grid;grid-template-columns:minmax(280px,1fr) 220px;gap:10px;padding:0 14px 10px}
.recipes-browser-tools input,.recipes-browser-tools select{min-height:38px}
.recipes-browser-panel .loading,.recipes-browser-panel .empty-state{padding:10px 14px 14px}
.recipes-browser-panel .recipe-list{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));max-height:190px;overflow:auto;border-top:1px solid #e5e9e6;padding:6px;background:#fafbfa}
.recipes-browser-panel .recipe-list.hidden{display:none!important}
.recipes-browser-panel .recipe-list-item{min-width:0;padding:9px 10px;margin:0;border:1px solid transparent;border-radius:6px;background:transparent;gap:1px}
.recipes-browser-panel .recipe-list-item:hover{background:#f0f4f1}
.recipes-browser-panel .recipe-list-item.active{background:#e8f1eb;border-color:#cbdcd1;box-shadow:none}
.recipes-browser-panel .recipe-list-item span{font-size:13px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recipes-browser-panel .recipe-list-item small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recipe-form-panel{padding:14px 16px 16px}
.recipe-form-head{margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #e6eae7}
.recipe-form-head h2{font-size:18px}
.recipe-details-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 12px;align-items:start}
.recipe-details-grid label,.recipe-formula-grid label,.recipe-ing-grid label,.recipe-notes-field{margin:0;font-size:13px;font-weight:650}
.recipe-details-grid input,.recipe-details-grid select,.recipe-formula-grid input,.recipe-formula-grid select,.recipe-ing-grid input,.recipe-ing-grid select{min-height:38px;height:38px;padding:7px 9px}
.recipe-details-grid .field-help{font-size:11px;margin-top:3px;min-height:0;font-weight:400}
.recipe-proof-field{grid-column:span 2}
.recipe-formula-section{margin:14px 0 12px;padding:11px 0 13px;border-top:1px solid #e6eae7;border-bottom:1px solid #e6eae7;background:transparent}
.recipe-section-title{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.recipe-section-title h3{margin:0;font-size:15px}.recipe-section-title .help-text{margin:0;font-size:11px}
.recipe-formula-grid{display:grid;grid-template-columns:2fr 1fr;gap:12px}
.recipe-ingredients-head{margin:12px 0 8px}.recipe-ingredients-head h3{font-size:16px}.recipe-ingredients-head .help-text{margin:2px 0 0;font-size:11px}
.recipe-ing{border:1px solid #dde4df;border-radius:7px;padding:10px 11px;margin-bottom:8px;background:#fff}
.recipe-ing-head{margin-bottom:8px}.recipe-ing-head strong{font-size:13px}.recipe-ing-head .secondary-button{min-height:30px;padding:4px 9px;font-size:12px}
.recipe-ing-grid{grid-template-columns:1fr 1.6fr .65fr .6fr .6fr;gap:8px;align-items:end}
.ri-notes-wrap{display:block;margin-top:8px}.ri-notes-wrap textarea{min-height:50px}
.recipe-notes-field{display:block;margin-top:10px}.recipe-notes-field textarea{margin-top:5px}
.recipe-form-panel>.form-actions{margin-top:10px}
@media(max-width:980px){.recipe-details-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.recipe-proof-field{grid-column:auto}}
@media(max-width:760px){.recipes-browser-tools{grid-template-columns:1fr}.recipes-browser-panel .recipe-list{grid-template-columns:1fr;max-height:240px}.recipe-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.recipe-formula-grid{grid-template-columns:1fr}.recipe-ing-grid{grid-template-columns:1fr 1fr}.recipe-section-title{display:block}}
@media(max-width:520px){.recipe-details-grid,.recipe-ing-grid{grid-template-columns:1fr}}


/* Recipes v1.2 — unified production controls + search-first recipe browser. */
.recipes-view input:not([type=checkbox]):not([type=radio]),
.recipes-view select,
.recipes-view textarea{box-sizing:border-box;width:100%;border:1px solid #b8c3bb;border-radius:7px;background:#fff;color:inherit;font:inherit}
.recipes-view input:not([type=checkbox]):not([type=radio]),
.recipes-view select{height:38px;min-height:38px;padding:7px 10px}
.recipes-view select{appearance:auto}
.recipes-view textarea{padding:8px 10px}
.recipe-details-grid>label,.recipe-ing-grid>label,.recipe-formula-grid>label{min-width:0;width:100%}
.recipe-details-grid>label>select,.recipe-ing-grid>label>select,.recipe-formula-grid>label>select{display:block;width:100%;max-width:none}
.recipes-browser-tools input,.recipes-browser-tools select{width:100%;height:38px;min-height:38px}
.recipes-browser-panel .empty-state{padding:7px 14px 11px;text-align:left;font-size:12px;color:#6b756e;background:#fafbfa;border-top:1px solid #eef1ef}
.recipes-browser-panel .recipe-list{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));max-height:220px;overflow-y:auto;overflow-x:hidden;align-content:start}
@media(min-width:1200px){.recipes-browser-panel .recipe-list{grid-template-columns:repeat(4,minmax(0,1fr))}}


/* Recipes v1.3 — integrated searchable Product select. */
.search-select-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
.search-select-combo{position:relative;width:100%;min-width:0}
.search-select-trigger{position:relative;width:100%;height:42px;min-height:42px;margin:0;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#1d2923;font:inherit;font-weight:400;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-select-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;line-height:1;color:#263d32}
.search-select-trigger:hover{border-color:#8fa098}.search-select-trigger:focus{outline:2px solid rgba(23,61,43,.16);outline-offset:1px;border-color:#547363}
.search-select-panel{position:absolute!important;z-index:1000;left:0;right:0;top:calc(100% + 5px);padding:0;border:1px solid #c8d1cc;border-radius:9px;background:#fff;box-shadow:0 12px 30px rgba(25,45,35,.18);overflow:hidden}
.search-select-panel.hidden{display:none!important}
.search-select-search{display:block!important;width:calc(100% - 18px)!important;height:36px!important;min-height:36px!important;margin:9px!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;box-shadow:none!important}
.search-select-options{display:block;max-height:245px;overflow-y:auto;overflow-x:hidden;padding:5px;border-top:1px solid #e5ebe7;background:#fff;overscroll-behavior:contain}
.search-select-option{display:block!important;width:100%!important;box-sizing:border-box!important;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;font-weight:400!important;line-height:1.35!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.search-select-option:hover,.search-select-option:focus{background:#f1f5f2!important;color:#173d2b!important}.search-select-option.selected{background:#e7f0ea!important;color:#173d2b!important;font-weight:700!important}
.search-select-empty{padding:10px;color:#66766e;font-size:13px}

/* Distillation native module — compact legacy-density workflow */
.distillation-view{max-width:1180px}.dist-form-panel{padding:18px}.dist-source-list,.dist-output-list{display:grid;gap:12px}.dist-source-row,.dist-output-row{margin:0;padding:14px}.dist-output-row .section-heading,.dist-source-row .section-heading{margin-bottom:10px}.dist-output-row h3,.dist-source-row h3{margin:0}.dist-destroy,.dist-tank-destination{margin-top:10px}.dist-preview-line{padding:8px 0;border-bottom:1px solid var(--border,#e5e7eb)}.dist-preview-line:last-child{border-bottom:0}.dist-preview-line strong{font-weight:700}.distillation-view select,.distillation-view input[type="text"],.distillation-view input[type="number"],.distillation-view input[type="date"],.distillation-view input[type="datetime-local"],.distillation-view textarea,.distillation-view .search-select-trigger,.distillation-view .tank-combo-trigger{box-sizing:border-box;width:100%;min-height:42px}.distillation-view .search-select-native,.distillation-view .tank-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.distillation-view .search-select-combo,.distillation-view .tank-combobox{position:relative;width:100%}.distillation-view .search-select-panel,.distillation-view .tank-combo-panel{z-index:1000}.distillation-view .dist-output-enabled{width:auto;min-height:0}.distillation-view .batch-check{white-space:nowrap}.distillation-view .dist-new-tank{margin-top:12px}.distillation-view .dist-dest-info,.distillation-view .dist-source-info{margin-top:6px;min-height:18px}
@media(max-width:760px){.distillation-view .form-grid{grid-template-columns:1fr}.dist-form-panel{padding:12px}}


/* Distillation v1.1 — use the established native-app field/select styling everywhere. */
.distillation-view select,
.distillation-view input[type="text"],
.distillation-view input[type="number"],
.distillation-view input[type="date"],
.distillation-view input[type="datetime-local"],
.distillation-view textarea{
  box-sizing:border-box;
  width:100%;
  min-height:42px;
  margin:0;
  padding:8px 10px;
  border:1px solid #b9c3bd;
  border-radius:8px;
  background:#fff;
  color:#1d2923;
  font:inherit;
  line-height:1.25;
  box-shadow:none;
}
.distillation-view select{
  height:42px;
  appearance:auto;
  -webkit-appearance:auto;
}
.distillation-view textarea{min-height:78px;resize:vertical}

/* Distillation tank selector: visually identical to the established searchable select,
   not a normal action button. Search + Show empty remain inside the floating panel. */
.distillation-view .tank-combo-trigger{
  position:relative;
  display:block;
  box-sizing:border-box;
  width:100%;
  height:42px;
  min-height:42px;
  margin:0;
  padding:8px 38px 8px 12px;
  border:1px solid #b9c3bd;
  border-radius:8px;
  background:#fff;
  color:#1d2923;
  font:inherit;
  font-weight:400;
  line-height:1.25;
  text-align:left;
  cursor:pointer;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:none;
  outline:0;
}
.distillation-view .tank-combo-trigger:after{
  content:'⌄';
  position:absolute;
  right:13px;
  top:50%;
  transform:translateY(-54%);
  font-size:18px;
  line-height:1;
  color:#263d32;
}
.distillation-view .tank-combo-trigger:hover{border-color:#8fa098;background:#fff}
.distillation-view .tank-combo-trigger:focus{
  outline:2px solid rgba(23,61,43,.16);
  outline-offset:1px;
  border-color:#547363;
  background:#fff;
}
.distillation-view .tank-combo-toolbar .tank-search{
  flex:1 1 auto;
  box-sizing:border-box;
  width:auto!important;
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:7px 10px!important;
  border:1px solid #b9c3bd!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#1d2923!important;
  font:inherit!important;
  font-size:13px!important;
  box-shadow:none!important;
}
.distillation-view .tank-combo-toolbar .batch-check{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#31463b!important;
  font-size:12px!important;
  font-weight:500!important;
  white-space:nowrap!important;
}
.distillation-view .tank-combo-toolbar .batch-check input[type="checkbox"]{
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  margin:0!important;
  padding:0!important;
  box-shadow:none!important;
}

/* Distillation v1.2: quantity + UOM uses the standard control system. */
#distillationView .dist-quantity-pair{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:10px;align-items:end}
#distillationView .dist-quantity-pair label{min-width:0}
#distillationView .dist-quantity-pair input,
#distillationView .dist-quantity-pair select{width:100%;min-height:40px;height:40px;box-sizing:border-box;border:1px solid var(--border,#cbd5e1);border-radius:6px;background:#fff;padding:8px 10px;font:inherit;color:inherit}
@media(max-width:700px){#distillationView .dist-quantity-pair{grid-template-columns:minmax(0,1fr) 92px}}


/* v1.3 — combined quantity/UOM control standard.
   UOM is visually part of the quantity box; existing value/unit behavior is unchanged. */
.quantity-uom-field{display:block;min-width:0;width:100%}
.quantity-uom-control{display:flex;align-items:stretch;width:100%;height:42px;min-height:42px;box-sizing:border-box;border:1px solid #b9c3bd;border-radius:8px;background:#fff;overflow:hidden}
.quantity-uom-control>input,.quantity-uom-control>select{box-sizing:border-box!important;height:40px!important;min-height:40px!important;margin:0!important;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;font:inherit!important}
.quantity-uom-control>input:first-child{flex:1 1 auto;width:100%!important;min-width:0;padding:8px 10px!important}
.quantity-uom-control>select{flex:0 0 auto;width:auto!important;min-width:70px;padding:8px 28px 8px 9px!important;border-left:1px solid #d7dfda!important;cursor:pointer}
.quantity-uom-control>.quantity-uom-text{flex:0 0 72px!important;width:72px!important;min-width:72px!important;padding:8px 7px!important;border-left:1px solid #d7dfda!important;text-align:center}
.quantity-uom-control:focus-within{border-color:#668778;box-shadow:0 0 0 2px rgba(53,107,77,.10)}
#distillationView .quantity-uom-control{height:40px;min-height:40px}
#distillationView .quantity-uom-control>input,#distillationView .quantity-uom-control>select{height:38px!important;min-height:38px!important}
#distillationView .dist-quantity-pair{display:contents}
.batch-ingredient-grid{grid-template-columns:1fr 1.4fr 1.2fr 1.25fr 1fr auto}
.recipe-ing-grid{grid-template-columns:1fr 1.6fr 1.15fr .6fr;gap:8px;align-items:end}
@media(max-width:900px){.batch-ingredient-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.recipe-ing-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.batch-ingredient-grid,.recipe-ing-grid{grid-template-columns:1fr}}

/* Tanks action workflows */
.tank-detail-actions{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}.compact-action-panel{max-width:900px}.compact-action-panel select,.compact-action-panel input,.compact-action-panel textarea{width:100%;box-sizing:border-box}.compact-action-panel select{appearance:auto;min-height:42px;padding:9px 36px 9px 11px;border:1px solid #cfcfcf;border-radius:7px;background:#fff;font:inherit;color:inherit}.tank-detail-actions button{white-space:nowrap}
/* Tanks v1.5: native partial-transfer form */
#partialTransferPanel .quantity-uom-combo{display:flex;align-items:stretch;width:100%;border:1px solid #b9c3bd;border-radius:8px;background:#fff;overflow:hidden}
#partialTransferPanel .quantity-uom-combo>input{border:0!important;border-radius:0!important;min-width:0;flex:1;box-shadow:none!important}
#partialTransferPanel .quantity-uom-combo>select{width:auto;min-width:68px;border:0!important;border-left:1px solid #d7ded9!important;border-radius:0!important;background:#f7f8f7;padding:0 28px 0 10px}
#partialTransferPanel .quantity-uom-static{display:flex;align-items:center;padding:0 12px;border-left:1px solid #d7ded9;background:#f7f8f7;font-size:13px;font-weight:600}
#partialTransferPanel .inline-check{display:flex;align-items:center;gap:6px;margin:5px 0 7px;font-size:13px;font-weight:500}
#partialTransferPanel .inline-check input{width:16px;height:16px;min-height:0}
#partialTransferPanel .text-button{margin-top:7px;border:0;background:transparent;padding:0;color:#244c38;font-weight:700;cursor:pointer}
#partialTransferPanel .source-summary{padding:8px 0;line-height:1.35}
#partialTransferPanel .preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:10px 0}
#partialTransferPanel .preview-grid>div{padding:8px 10px;background:#f5f7f5;border-radius:7px}.preview-grid span{display:block;font-size:12px;color:#66736c}.preview-grid strong{display:block;margin-top:2px}


/* Tanks v1.6 — partial-transfer selector uses the standard integrated tank picker. */
#tankTransferView .tank-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
#tankTransferView .tank-combobox{position:relative;width:100%;min-width:0}
#tankTransferView .tank-combo-trigger{position:relative;display:block;box-sizing:border-box;width:100%;height:42px;min-height:42px;margin:0;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#1d2923;font:inherit;font-weight:400;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none}
#tankTransferView .tank-combo-trigger:hover{border-color:#8fa098;background:#fff}
#tankTransferView .tank-combo-trigger:focus{outline:2px solid rgba(23,61,43,.16);outline-offset:1px;border-color:#547363}
#tankTransferView .tank-combo-toolbar .tank-search{flex:1 1 auto;box-sizing:border-box;width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;box-shadow:none!important}
#tankTransferView .tank-combo-toolbar .batch-check{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;white-space:nowrap!important;font-size:12px!important;font-weight:500!important;color:#31463b!important}
#tankTransferView .tank-combo-toolbar .batch-check input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;box-shadow:none!important}
#tankTransferView .tank-combo-empty{padding:10px;color:#68756e;font-size:13px}

/* Transfer in Bond native module */
.tib-view{max-width:1180px;margin:0 auto}.tib-panel{padding:18px}.tib-view .nested-panel{margin:18px 0;padding:16px;background:#f7f9f7;border:1px solid #dfe5e1;border-radius:8px}.tib-view h3{margin:4px 0 8px}.tib-view h4{margin:12px 0 8px}.tib-view .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;margin:12px 0}.tib-view .form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.tib-view label{font-weight:600}.tib-view input,.tib-view select,.tib-view textarea{width:100%;box-sizing:border-box;min-height:42px;margin-top:5px;padding:8px 10px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;font:inherit}.tib-view textarea{min-height:72px}.tib-view .inline-check,.tib-view .attestation,.tib-view .check-grid label{display:flex;align-items:flex-start;gap:8px;font-weight:400}.tib-view .inline-check input,.tib-view .attestation input,.tib-view .check-grid input{width:16px;min-height:16px;height:16px;margin-top:2px}.tib-view .check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;margin:8px 0 12px}.tib-view .tib-combobox{margin-top:5px}.tib-view .tank-combo-trigger{display:block;position:relative;width:100%;height:42px;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#17211c;font:inherit;font-weight:400;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none}.tib-view .tank-combo-trigger:after{content:'⌄';position:absolute;right:12px;top:8px}.tib-view .tank-combo-panel{position:absolute;z-index:80;width:min(620px,calc(100vw - 48px));max-height:330px;overflow:auto;background:#fff;border:1px solid #b9c3bd;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.14);padding:8px}.tib-view .tank-combobox{position:relative}.tib-view .tank-combo-toolbar{position:sticky;top:0;background:#fff;padding-bottom:7px;z-index:2}.tib-view .tank-combo-toolbar .tank-search{margin:0 0 6px}.tib-view .tank-combo-toolbar .batch-check{display:flex;align-items:center;gap:7px;font-weight:400}.tib-view .tank-combo-toolbar .batch-check input{width:16px;height:16px;min-height:16px;margin:0}.tib-view .tank-combo-option{display:block;width:100%;padding:9px 10px;border:0;border-radius:6px;background:#fff;text-align:left;font:inherit}.tib-view .tank-combo-option:hover{background:#eef4ef}.native-hidden-select{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.tib-view .source-summary{margin:10px 0;padding:10px;background:#f5f7f5;border-radius:7px}.tib-view .summary-grid{margin:12px 0}.tib-view .inventory-preview{margin-top:18px}
@media(max-width:760px){.tib-view .form-grid,.tib-view .form-grid.three,.tib-view .check-grid{grid-template-columns:1fr}}


/* Transfer in Bond v1.1 — compact native controls */
.tib-view select,
.tib-view input[type="text"],.tib-view input[type="number"],.tib-view input[type="date"],
.tib-view textarea{box-sizing:border-box;width:100%;min-height:42px;margin-top:5px;padding:8px 10px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#17211c;font:inherit;font-weight:400}
.tib-view select{appearance:auto;-webkit-appearance:menulist}
.tib-view input[type="checkbox"]{appearance:auto!important;-webkit-appearance:checkbox!important;box-sizing:border-box!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:1px 0 0!important;padding:0!important;border:initial!important;border-radius:initial!important;background:initial!important;box-shadow:none!important;flex:0 0 16px!important}
.tib-view .inline-check,.tib-view .attestation,.tib-view .check-grid label{display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;width:auto!important;min-height:20px!important;margin:7px 0!important;padding:0!important;font-weight:500!important}
.tib-view .check-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px 24px!important;margin:8px 0 14px!important}
.tib-view #tibArrivalStatusWrap{display:block;margin:10px 0 14px;max-width:360px}
.tib-view #tibExceptions{margin-top:10px}
.tib-view .nested-panel{margin:16px 0;padding:14px 16px;background:#f8faf8;border:1px solid #dfe5e1;border-radius:8px}
.tib-view .nested-panel>h3{margin:0 0 5px;font-size:16px}.tib-view .nested-panel>h4{margin:10px 0 7px;font-size:14px}
.tib-view .attestation{padding:10px 12px!important;background:#fff;border:1px solid #dfe5e1;border-radius:7px}
.tib-view .tib-combobox{position:relative!important;display:block!important;width:100%!important;min-width:0!important;margin-top:5px!important}
.tib-view .tank-combo-trigger{position:relative!important;display:block!important;box-sizing:border-box!important;width:100%!important;height:42px!important;min-height:42px!important;margin:0!important;padding:8px 38px 8px 12px!important;border:1px solid #b9c3bd!important;border-radius:8px!important;background:#fff!important;color:#17211c!important;font:inherit!important;font-weight:400!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.tib-view .tank-combo-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;line-height:1;color:#263d32}
.tib-view .tank-combo-panel{position:absolute!important;display:block;z-index:1000!important;left:0!important;right:0!important;top:calc(100% + 5px)!important;width:auto!important;max-height:none!important;overflow:hidden!important;padding:0!important;border:1px solid #c8d1cc!important;border-radius:9px!important;background:#fff!important;box-shadow:0 12px 30px rgba(25,45,35,.18)!important}
.tib-view .tank-combo-panel.hidden{display:none!important}
.tib-view .tank-combo-toolbar{display:flex!important;align-items:center!important;gap:10px!important;padding:9px!important;border-bottom:1px solid #e5ebe7!important;background:#fff!important}
.tib-view .tank-combo-toolbar .tank-search{flex:1 1 auto!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;font:inherit!important;font-size:13px!important}
.tib-view .tank-combo-toolbar .batch-check{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;white-space:nowrap!important;font-size:12px!important;font-weight:500!important}
.tib-view .tank-combo-options{display:block!important;max-height:245px!important;overflow-y:auto!important;padding:5px!important;background:#fff!important}
.tib-view .tank-combo-option{display:block!important;box-sizing:border-box!important;width:100%!important;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;font-weight:400!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.tib-view .tank-combo-option:hover,.tib-view .tank-combo-option:focus{background:#f1f5f2!important}.tib-view .tank-combo-option.selected{background:#e7f0ea!important;font-weight:700!important}
.tib-view .native-hidden-select{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;min-height:1px!important;margin:0!important;padding:0!important;opacity:0!important;pointer-events:none!important}
@media(max-width:760px){.tib-view .check-grid{grid-template-columns:1fr!important}.tib-view .tank-combo-panel{right:auto!important;width:min(430px,calc(100vw - 44px))!important}}


/* Cross-app v1.3: safe numeric entry + scrolling sidebar */
input[type="number"]{-moz-appearance:textfield}
input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
@media(min-width:851px){.sidebar{position:sticky;top:58px;height:calc(100vh - 58px);overflow-y:auto;align-self:start}}
.inventory-measurement-bar{display:flex;align-items:center;gap:10px;margin:0 0 12px}.inventory-measurement-bar label{margin:0}.inventory-measurement-bar select{width:auto;min-width:160px;padding:9px 34px 9px 10px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;font:inherit}
:root{font-family:Arial,Helvetica,sans-serif;color:#222;background:#f4f4f2}*{box-sizing:border-box}body{margin:0}.login-body{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(430px,100%);background:#fff;border:1px solid #ddd;border-radius:12px;padding:30px;box-shadow:0 8px 30px rgba(0,0,0,.08)}.brand{text-transform:uppercase;letter-spacing:.14em;font-weight:700}.login-card h1{margin:.35rem 0}.muted{color:#666}label{display:block;font-weight:700;margin:18px 0}input{display:block;width:100%;padding:11px;margin-top:7px;border:1px solid #aaa;border-radius:7px;font:inherit}button{padding:11px 18px;border:0;border-radius:7px;background:#222;color:#fff;font-weight:700;cursor:pointer}.alert{background:#fff0f0;border:1px solid #d99;padding:10px;border-radius:7px}.success{background:#effaf0;border:1px solid #9c9;padding:12px;border-radius:7px}.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 22px;background:#222;color:#fff}.user,.user form{display:flex;gap:12px;align-items:center}.linkbtn{padding:0;background:transparent;text-decoration:underline}.shell{max-width:1200px;margin:auto;padding:28px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.card{background:#fff;border:1px solid #ddd;border-radius:10px;padding:18px}.card h2{margin-top:0}.coming{font-size:.85rem;color:#666}code{font-size:.85rem}

body:not(.login-body){background:#f5f7f5;color:#17211b}.hidden{display:none!important}.topbar{position:sticky;top:0;z-index:20;min-height:58px;background:#173d2b}.topbar-brand{display:flex;gap:8px;align-items:center}.menu-button{display:none;background:transparent;color:#fff;font-size:22px;padding:4px}.app-layout{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 58px)}.sidebar{background:#fff;border-right:1px solid #dce3de;padding:18px 12px}.sidebar nav{display:grid;gap:5px}.nav-item{display:flex;justify-content:space-between;width:100%;padding:11px 12px;border:0;border-radius:7px;background:transparent;text-align:left;font-weight:650;color:#26382d}.nav-item.active{background:#e5f0e9;color:#153d29}.nav-item.pending{opacity:.48}.nav-item span{font-size:10px;text-transform:uppercase}.main-content{min-width:0;padding:28px;max-width:1500px;width:100%;margin:0 auto}.page-heading,.section-heading{display:flex;justify-content:space-between;align-items:center;gap:18px}.page-heading{margin-bottom:20px}.page-heading h1{margin:0;font-size:30px}.page-heading p{margin:5px 0 0;color:#637068}.panel,.summary-card,.detail-card{background:#fff;border:1px solid #dce3de;border-radius:10px}.panel{padding:18px;margin-bottom:18px}.summary-grid,.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.summary-card,.detail-card{padding:17px}.summary-card span,.detail-card span{display:block;color:#657269;font-size:12px;text-transform:uppercase;letter-spacing:.04em}.summary-card strong{display:block;font-size:25px;margin-top:5px}.detail-card strong{display:block;font-size:17px;margin-top:6px}.filter-panel{display:flex;align-items:end;gap:22px}.search-field{display:grid;gap:6px;flex:1;font-weight:650;margin:0}.search-field input,textarea{width:100%;padding:10px 11px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;font:inherit}.checkbox-field{display:flex;align-items:center;gap:8px;padding-bottom:10px;margin:0}.checkbox-field input{display:inline;width:auto;margin:0}.table-panel{padding:0;overflow:hidden}.table-panel .section-heading{padding:16px 18px 0}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;white-space:nowrap}.data-table th,.data-table td{padding:12px 14px;border-bottom:1px solid #e6ebe7;text-align:right}.data-table th{background:#f1f5f2;color:#536159;font-size:12px;text-transform:uppercase;position:sticky;top:0}.data-table th:first-child,.data-table td:first-child,.data-table th:nth-child(2),.data-table td:nth-child(2),.data-table th:nth-child(3),.data-table td:nth-child(3),.data-table th:nth-child(4),.data-table td:nth-child(4){text-align:left}.data-table td small{display:block;color:#758078;margin-top:2px}.clickable-row{cursor:pointer}.clickable-row:hover,.clickable-row:focus{background:#eef5f0;outline:none}.loading,.empty-state{padding:30px;text-align:center;color:#68746c}.primary-button,.secondary-button,.back-button{border-radius:7px;padding:9px 14px;font-weight:700;cursor:pointer}.primary-button{border:1px solid #173d2b;background:#173d2b;color:#fff}.secondary-button{border:1px solid #8da096;background:#fff;color:#173d2b}.back-button{border:0;background:transparent;color:#24513a;padding-left:0}.message{padding:11px 13px;border-radius:7px;margin-bottom:16px}.message.error{background:#fff0ef;border:1px solid #e2b3af;color:#7b2620}.message.success{background:#eaf6ee;border:1px solid #afd1b9;color:#215c32}.section-heading h2{margin:0 0 12px}textarea{display:block;resize:vertical;margin:0}.muted{color:#68746c}

@media(max-width:850px){.app-layout{grid-template-columns:1fr}.menu-button{display:block}.sidebar{display:none;position:fixed;top:58px;bottom:0;left:0;width:240px;z-index:15;box-shadow:8px 0 30px #0002}.sidebar.open{display:block}.main-content{padding:18px}.summary-grid,.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar-brand span,.user>span{display:none}}
@media(max-width:520px){.summary-grid,.detail-grid{grid-template-columns:1fr}.filter-panel,.page-heading{align-items:stretch;flex-direction:column}.secondary-button{width:100%}}

/* Keep the desktop tank inventory visible without horizontal scrolling. */
@media(min-width:851px){
  #tankTable{table-layout:fixed;white-space:normal}
  #tankTable th,#tankTable td{padding-left:10px;padding-right:10px}
  #tankTable th:nth-child(1),#tankTable td:nth-child(1){width:24%}
  #tankTable td:nth-child(1) .cell-value,#tankTable td:nth-child(1) strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #tankTable th:nth-child(2),#tankTable td:nth-child(2){width:11%}
  #tankTable th:nth-child(3),#tankTable td:nth-child(3){width:13%}
  #tankTable th:nth-child(4),#tankTable td:nth-child(4){width:12%}
  #tankTable td:nth-child(4) .cell-value{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #tankTable th:nth-child(5),#tankTable td:nth-child(5){width:9%;white-space:nowrap}
  #tankTable th:nth-child(6),#tankTable td:nth-child(6){width:10%;white-space:nowrap}
  #tankTable th:nth-child(7),#tankTable td:nth-child(7){width:11%;white-space:nowrap}
  #tankTable th:nth-child(8),#tankTable td:nth-child(8){width:10%;white-space:nowrap}
}

/* Touch layout used by current and future responsive data tables. */
@media(max-width:850px){
  .responsive-table,.responsive-table tbody{display:block;width:100%;white-space:normal}
  .responsive-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .responsive-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}
  .responsive-table tr{display:block;min-width:0;background:#fff;border:1px solid #dce3de;border-radius:9px;overflow:hidden}
  .responsive-table td,.responsive-table td:first-child,.responsive-table td:nth-child(2),.responsive-table td:nth-child(3),.responsive-table td:nth-child(4){display:grid;grid-template-columns:minmax(78px,34%) minmax(0,1fr);gap:10px;align-items:start;width:100%;padding:8px 11px;border-bottom:1px solid #edf0ed;text-align:left;white-space:normal}
  .responsive-table td:last-child{border-bottom:0}
  .responsive-table td::before{content:attr(data-label);color:#657269;font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase}
  .responsive-table .cell-value{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
  .responsive-table td:first-child .cell-value{text-align:left}
  .responsive-table .cell-value small{white-space:normal}
  .responsive-table .clickable-row:hover,.responsive-table .clickable-row:focus{border-color:#7d9a89}
}
@media(max-width:600px){
  .responsive-table tbody{grid-template-columns:1fr;padding:10px}
  .topbar{padding-left:14px;padding-right:14px}
  .main-content{padding:14px}
  .panel{padding:14px}
  .table-panel{padding:0}
}

/* Inventory module */
.tab-bar{display:flex;gap:8px;margin-bottom:18px}.tab-button{border:1px solid #9aaba1;background:#fff;color:#173d2b}.tab-button.active{background:#173d2b;color:#fff}.saved-record-panel{display:grid;grid-template-columns:minmax(240px,1fr) minmax(360px,1.35fr);gap:18px;align-items:end}.help-text{margin:5px 0 0;color:#68746c;font-size:13px;line-height:1.4}.saved-record-controls{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:8px;align-items:center}.saved-record-controls select,.form-grid input,.inventory-input-table input{width:100%;padding:10px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;font:inherit}.inventory-form-panel>label{margin:16px 0}.notice{padding:12px;border-radius:7px;margin-bottom:16px;line-height:1.45}.notice.info{background:#eef6ee;border:1px solid #c9ddcf}.notice.warning{background:#fff6df;border:1px solid #e4cb88}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}.form-grid label{margin:0}.attestation{display:flex;gap:10px;align-items:flex-start;font-weight:600}.attestation input{width:auto;margin:3px 0 0;flex:0 0 auto}.inventory-table-wrap{border:1px solid #dce3de;border-radius:8px}.inventory-input-table{table-layout:fixed;white-space:normal}.inventory-input-table th,.inventory-input-table td{padding:9px 8px}.inventory-input-table th{position:static}.inventory-input-table input{padding:8px}.inventory-input-table td:nth-last-child(-n+6),.inventory-input-table th:nth-last-child(-n+6){text-align:right}.inventory-input-table td:nth-last-child(-n+2),.inventory-input-table th:nth-last-child(-n+2){text-align:left}.form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.danger-button{border:1px solid #a83d34;background:#fff;color:#8a2821;border-radius:7px;padding:9px 14px;font-weight:700;cursor:pointer}.inventory-preview{margin-top:18px}.reconciliation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.recon-card{border:1px solid #dce3de;border-radius:9px;padding:14px;background:#fafcfb;min-width:0}.recon-card h3{margin:0;font-size:17px}.recon-card p{margin:4px 0 12px;color:#657269}.recon-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.recon-metric{min-width:0;background:#fff;border:1px solid #e3e9e5;border-radius:6px;padding:8px}.recon-metric span{display:block;color:#68746c;font-size:10px;text-transform:uppercase}.recon-metric strong{display:block;margin-top:4px;font-size:14px;overflow-wrap:anywhere}.recon-card details{margin-top:10px;font-size:13px}.recon-card ul{padding-left:20px}.preview-totals{margin-top:12px;padding:12px;background:#f1f5f2;border-radius:7px;line-height:1.6}
@media(min-width:1101px){
  .inventory-input-table{white-space:nowrap}
  .inventory-input-table td{overflow:hidden}
  .inventory-input-table .cell-value,.inventory-input-table .cell-value strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #invTankTable th:nth-child(1),#invTankTable td:nth-child(1){width:10%}#invTankTable th:nth-child(2),#invTankTable td:nth-child(2){width:18%}#invTankTable th:nth-child(3),#invTankTable td:nth-child(3){width:14%}#invTankTable th:nth-child(4),#invTankTable td:nth-child(4){width:8%}#invTankTable th:nth-child(5),#invTankTable td:nth-child(5){width:10%}#invTankTable th:nth-child(6),#invTankTable td:nth-child(6){width:9%}#invTankTable th:nth-child(7),#invTankTable td:nth-child(7){width:9%}#invTankTable th:nth-child(8),#invTankTable td:nth-child(8){width:11%}#invTankTable th:nth-child(9),#invTankTable td:nth-child(9){width:11%}
  #invBottleTable th:nth-child(1),#invBottleTable td:nth-child(1){width:25%}#invBottleTable th:nth-child(2),#invBottleTable td:nth-child(2){width:16%}#invBottleTable th:nth-child(3),#invBottleTable td:nth-child(3){width:14%}#invBottleTable th:nth-child(4),#invBottleTable td:nth-child(4){width:12%}#invBottleTable th:nth-child(5),#invBottleTable td:nth-child(5){width:10%}#invBottleTable th:nth-child(6),#invBottleTable td:nth-child(6){width:11%}#invBottleTable th:nth-child(7),#invBottleTable td:nth-child(7){width:12%}
}
@media(max-width:1100px){
  .saved-record-panel{grid-template-columns:1fr}.inventory-input-table,.inventory-input-table tbody{display:block;width:100%;white-space:normal}.inventory-input-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.inventory-input-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px}.inventory-input-table tr{display:block;min-width:0;border:1px solid #dce3de;border-radius:9px;overflow:hidden}.inventory-input-table td,.inventory-input-table td:nth-last-child(-n+6),.inventory-input-table td:nth-last-child(-n+2){display:grid;grid-template-columns:minmax(105px,42%) minmax(0,1fr);gap:10px;align-items:center;width:100%;padding:8px 10px;border-bottom:1px solid #edf0ed;text-align:left}.inventory-input-table td:last-child{border-bottom:0}.inventory-input-table td::before{content:attr(data-label);color:#657269;font-size:11px;font-weight:700;text-transform:uppercase}.inventory-input-table .cell-value{text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inventory-input-table input{text-align:right}.recon-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){.saved-record-controls{grid-template-columns:1fr}.saved-record-controls button{width:100%}.form-grid{grid-template-columns:1fr}.inventory-input-table tbody,.reconciliation-grid{grid-template-columns:1fr}.recon-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.form-actions>*{flex:1 1 100%}}

/* Native Batching */
.nested-panel{margin-top:18px;padding:16px;border:1px solid var(--border,#ddd);border-radius:8px;background:#fafafa}.nested-panel h2{margin-top:0}.batch-ingredients{display:grid;gap:12px}.batch-ingredient-row{padding:14px;border:1px solid var(--border,#ddd);border-radius:8px;background:#fff}.batch-ingredient-grid{display:grid;grid-template-columns:1fr 1.4fr 1.2fr .8fr .8fr 1fr auto;gap:10px;align-items:end}.batch-source-preview{margin-top:8px;font-size:12px;color:#666}.batch-remove{white-space:nowrap}@media(max-width:900px){.batch-ingredient-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.batch-ingredient-grid{grid-template-columns:1fr}}

/* Native Batching form controls — match text inputs and support searchable tank lists. */
.batch-form-panel select,.batch-form-panel input,.batch-form-panel textarea,.batch-ingredient-row select,.batch-ingredient-row input{width:100%;box-sizing:border-box;padding:10px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;color:inherit;font:inherit;line-height:1.25}.batch-form-panel select,.batch-ingredient-row select{height:42px;appearance:auto}.batch-form-panel .select-search,.batch-ingredient-row .select-search{margin:0 0 6px;height:38px;padding:8px 10px}.batch-form-panel label,.batch-ingredient-row label{min-width:0}.batch-ingredient-grid{align-items:end}

/* Native Batching parity controls */
.batch-form-panel select,.batch-form-panel input,.batch-form-panel textarea{box-sizing:border-box;width:100%;min-height:42px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;padding:8px 10px;font:inherit;color:inherit}.batch-form-panel textarea{min-height:78px}.batch-form-panel .select-search{margin-bottom:6px}.batch-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.batch-row-head .secondary-button{width:auto}.batch-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;margin-bottom:16px}.batch-preview-grid>div{border:1px solid #d7dfda;border-radius:8px;padding:12px}.batch-preview-grid span{display:block;font-size:12px;color:#68746e;margin-bottom:4px}.batch-preview-grid strong{font-size:18px}.batch-recipe-preview{display:grid;gap:5px;margin-top:8px}.batch-allocation-total{margin-top:10px;font-weight:700}.batch-ingredient-row{margin-bottom:12px}@media(max-width:800px){.batch-preview-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}}


/* Batching v1.3 — compact, professional searchable tank controls. */
.batch-field{display:flex;flex-direction:column;min-width:0;margin:0}
.batch-field>label:first-child{display:block;margin:0 0 7px;font-weight:700}
.batch-form-panel .batch-field .select-search,.batch-ingredient-row .batch-field .select-search{margin:0 0 7px;min-height:42px}
.batch-check,.batch-form-panel .batch-check,.batch-ingredient-row .batch-check{display:inline-flex;align-items:center;align-self:flex-start;gap:8px;margin:0 0 8px;padding:0;font-weight:600;font-size:13px;color:#536159;line-height:1.2;cursor:pointer}
.batch-check input,.batch-form-panel .batch-check input,.batch-ingredient-row .batch-check input{appearance:auto!important;-webkit-appearance:checkbox!important;display:inline-block!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;border:1px solid #8da096!important;border-radius:3px!important;box-shadow:none!important;accent-color:#173d2b;vertical-align:middle}
.batch-check span{display:inline;white-space:nowrap}
.batch-form-panel select,.batch-ingredient-row select{min-height:42px}


/* Batching v1.4 — tank selector is the primary field; search/filter tools sit below it. */
.batch-tank-field>select{order:2}
.batch-tank-field>.tank-tools{order:3}
.tank-tools{display:flex;align-items:center;gap:10px;margin-top:7px;min-width:0}
.batch-form-panel .tank-tools .tank-search,.batch-ingredient-row .tank-tools .tank-search{flex:1 1 auto;width:auto;min-width:110px;min-height:34px;height:34px;margin:0;padding:6px 9px;font-size:13px;background:#fafcfb}
.tank-tools .batch-check,.batch-form-panel .tank-tools .batch-check,.batch-ingredient-row .tank-tools .batch-check{flex:0 0 auto;align-self:center;margin:0;white-space:nowrap;font-size:12px}
.batch-source-preview{padding-left:0}
@media(max-width:620px){.tank-tools{align-items:stretch;flex-direction:column;gap:6px}.tank-tools .batch-check,.batch-form-panel .tank-tools .batch-check,.batch-ingredient-row .tank-tools .batch-check{align-self:flex-start}}


/* Batching v1.5 — unified searchable tank combobox. Search and empty filter live inside dropdown. */
.tank-native-select{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
.tank-combobox{position:relative;width:100%;min-width:0}
.batch-form-panel .tank-combo-trigger,.batch-ingredient-row .tank-combo-trigger{position:relative;width:100%;min-height:42px;margin:0;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:inherit;font:inherit;font-weight:500;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tank-combo-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;line-height:1;color:#263d32}
.tank-combo-trigger:hover{border-color:#8fa098}.tank-combo-trigger:focus{outline:2px solid rgba(23,61,43,.16);outline-offset:1px;border-color:#547363}
.tank-combo-panel{position:absolute;z-index:80;left:0;right:0;top:calc(100% + 5px);padding:10px;border:1px solid #cbd5cf;border-radius:9px;background:#fff;box-shadow:0 10px 28px rgba(25,45,35,.16)}
.tank-combo-panel.hidden{display:none!important}
.batch-form-panel .tank-combo-panel .tank-search,.batch-ingredient-row .tank-combo-panel .tank-search{display:block;width:100%;height:38px;min-height:38px;margin:0 0 8px;padding:7px 10px;background:#fff;font-size:13px}
.tank-combo-panel .batch-check,.batch-form-panel .tank-combo-panel .batch-check,.batch-ingredient-row .tank-combo-panel .batch-check{display:flex;margin:0 -2px 8px;padding:3px 2px 8px;border-bottom:1px solid #e6ebe8;font-size:12px}
.tank-combo-options{max-height:245px;overflow-y:auto;overscroll-behavior:contain}
.tank-combo-option{display:block;width:100%;margin:0;padding:9px 10px;border:0;border-radius:6px;background:transparent;color:#1d2923;font:inherit;font-size:13px;text-align:left;cursor:pointer;white-space:normal}
.tank-combo-option:hover{background:#f1f5f2}.tank-combo-option.selected{background:#e7f0ea;font-weight:700;color:#173d2b}
.batch-tank-field>.tank-combobox{order:2}.batch-tank-field>.tank-tools{display:none!important}
@media(max-width:620px){.tank-combo-panel{min-width:260px;right:auto;width:min(330px,calc(100vw - 44px))}}


/* Batching v1.7 — production tank select: one closed select field; search + empty filter exist only inside floating dropdown. */
.tank-combobox{position:relative;width:100%;min-width:0}
.tank-combo-panel{position:absolute!important;display:block;z-index:1000;left:0;right:0;top:calc(100% + 5px);padding:0;border:1px solid #c8d1cc;border-radius:9px;background:#fff;box-shadow:0 12px 30px rgba(25,45,35,.18);overflow:hidden}
.tank-combo-panel.hidden{display:none!important}
.tank-combo-toolbar{display:flex;align-items:center;gap:10px;padding:9px;border-bottom:1px solid #e5ebe7;background:#fff}
.batch-form-panel .tank-combo-toolbar .tank-search,.batch-ingredient-row .tank-combo-toolbar .tank-search{flex:1 1 auto;width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;box-shadow:none!important}
.tank-combo-toolbar .batch-check,.batch-form-panel .tank-combo-toolbar .batch-check,.batch-ingredient-row .tank-combo-toolbar .batch-check{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;white-space:nowrap!important;font-size:12px!important;font-weight:500!important;color:#31463b!important}
.tank-combo-toolbar .batch-check input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;box-shadow:none!important}
.tank-combo-options{display:block!important;max-height:245px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:5px!important;background:#fff!important;overscroll-behavior:contain}
.tank-combo-option{display:block!important;width:100%!important;box-sizing:border-box!important;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;font-weight:400!important;line-height:1.35!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important;outline:0!important}
.tank-combo-option:hover,.tank-combo-option:focus{background:#f1f5f2!important;color:#173d2b!important}
.tank-combo-option.selected{background:#e7f0ea!important;color:#173d2b!important;font-weight:700!important}
.batch-tank-field>.tank-tools{display:none!important}
@media(max-width:620px){.tank-combo-toolbar{gap:7px}.tank-combo-toolbar .batch-check span{font-size:11px}.tank-combo-panel{min-width:280px;right:auto;width:min(360px,calc(100vw - 36px))}}

/* Native Recipes */
.recipes-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:20px;align-items:start}.recipes-list-panel{padding:0;overflow:hidden;position:sticky;top:18px}.recipes-list-head,.recipe-form-head,.recipe-ingredients-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.recipes-list-head{padding:18px;border-bottom:1px solid #e3e8e4}.recipes-list-head h2,.recipe-form-head h2,.recipe-ingredients-head h3,.recipe-subpanel h3{margin:0}.recipes-list-tools{padding:14px 18px;background:#f7f9f7;border-bottom:1px solid #e3e8e4;display:grid;gap:10px}.recipe-list{max-height:68vh;overflow:auto}.recipe-list-item{display:flex;width:100%;text-align:left;flex-direction:column;gap:3px;padding:13px 18px;border:0;border-bottom:1px solid #edf0ed;background:#fff;color:inherit;cursor:pointer}.recipe-list-item:hover{background:#f7faf8}.recipe-list-item.active{background:#edf5f0;box-shadow:inset 3px 0 0 #356b4d}.recipe-list-item span{font-size:13px}.recipe-list-item small{color:#66736b}.recipe-form-panel{max-width:none}.recipe-form-head{margin-bottom:16px}.status-badge{font-size:12px;padding:6px 9px;border-radius:999px;background:#eef1ef;color:#526158}.recipe-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.field-help{display:block;font-size:12px;color:#647069;margin-top:6px;min-height:16px}.recipe-subpanel{margin:22px 0;padding:18px;background:#f7f9f7;border:1px solid #e3e8e4;border-radius:9px}.recipe-ingredients-head{margin:24px 0 12px}.recipe-ing{border:1px solid #dce3de;border-radius:9px;padding:14px;margin-bottom:12px;background:#fff}.recipe-ing-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.recipe-ing-grid{display:grid;grid-template-columns:1fr 1.5fr .7fr .65fr .65fr;gap:10px;align-items:end}.ri-notes-wrap{margin-top:10px}.empty-state{padding:25px;text-align:center;color:#6b756e}@media(max-width:1050px){.recipes-layout{grid-template-columns:1fr}.recipes-list-panel{position:static}.recipe-list{max-height:340px}.recipe-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.recipe-main-grid,.recipe-ing-grid{grid-template-columns:1fr}.recipe-ingredients-head{align-items:flex-start;flex-direction:column}}


/* Recipes v1.1 — compact legacy-inspired production layout. */
.recipes-view{max-width:1180px}
.recipes-browser-panel{padding:0;margin-bottom:14px;overflow:hidden}
.recipes-browser-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px 8px}
.recipes-browser-head h2{margin:0;font-size:17px}
.recipes-browser-tools{display:grid;grid-template-columns:minmax(280px,1fr) 220px;gap:10px;padding:0 14px 10px}
.recipes-browser-tools input,.recipes-browser-tools select{min-height:38px}
.recipes-browser-panel .loading,.recipes-browser-panel .empty-state{padding:10px 14px 14px}
.recipes-browser-panel .recipe-list{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));max-height:190px;overflow:auto;border-top:1px solid #e5e9e6;padding:6px;background:#fafbfa}
.recipes-browser-panel .recipe-list.hidden{display:none!important}
.recipes-browser-panel .recipe-list-item{min-width:0;padding:9px 10px;margin:0;border:1px solid transparent;border-radius:6px;background:transparent;gap:1px}
.recipes-browser-panel .recipe-list-item:hover{background:#f0f4f1}
.recipes-browser-panel .recipe-list-item.active{background:#e8f1eb;border-color:#cbdcd1;box-shadow:none}
.recipes-browser-panel .recipe-list-item span{font-size:13px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recipes-browser-panel .recipe-list-item small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recipe-form-panel{padding:14px 16px 16px}
.recipe-form-head{margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #e6eae7}
.recipe-form-head h2{font-size:18px}
.recipe-details-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 12px;align-items:start}
.recipe-details-grid label,.recipe-formula-grid label,.recipe-ing-grid label,.recipe-notes-field{margin:0;font-size:13px;font-weight:650}
.recipe-details-grid input,.recipe-details-grid select,.recipe-formula-grid input,.recipe-formula-grid select,.recipe-ing-grid input,.recipe-ing-grid select{min-height:38px;height:38px;padding:7px 9px}
.recipe-details-grid .field-help{font-size:11px;margin-top:3px;min-height:0;font-weight:400}
.recipe-proof-field{grid-column:span 2}
.recipe-formula-section{margin:14px 0 12px;padding:11px 0 13px;border-top:1px solid #e6eae7;border-bottom:1px solid #e6eae7;background:transparent}
.recipe-section-title{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.recipe-section-title h3{margin:0;font-size:15px}.recipe-section-title .help-text{margin:0;font-size:11px}
.recipe-formula-grid{display:grid;grid-template-columns:2fr 1fr;gap:12px}
.recipe-ingredients-head{margin:12px 0 8px}.recipe-ingredients-head h3{font-size:16px}.recipe-ingredients-head .help-text{margin:2px 0 0;font-size:11px}
.recipe-ing{border:1px solid #dde4df;border-radius:7px;padding:10px 11px;margin-bottom:8px;background:#fff}
.recipe-ing-head{margin-bottom:8px}.recipe-ing-head strong{font-size:13px}.recipe-ing-head .secondary-button{min-height:30px;padding:4px 9px;font-size:12px}
.recipe-ing-grid{grid-template-columns:1fr 1.6fr .65fr .6fr .6fr;gap:8px;align-items:end}
.ri-notes-wrap{display:block;margin-top:8px}.ri-notes-wrap textarea{min-height:50px}
.recipe-notes-field{display:block;margin-top:10px}.recipe-notes-field textarea{margin-top:5px}
.recipe-form-panel>.form-actions{margin-top:10px}
@media(max-width:980px){.recipe-details-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.recipe-proof-field{grid-column:auto}}
@media(max-width:760px){.recipes-browser-tools{grid-template-columns:1fr}.recipes-browser-panel .recipe-list{grid-template-columns:1fr;max-height:240px}.recipe-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.recipe-formula-grid{grid-template-columns:1fr}.recipe-ing-grid{grid-template-columns:1fr 1fr}.recipe-section-title{display:block}}
@media(max-width:520px){.recipe-details-grid,.recipe-ing-grid{grid-template-columns:1fr}}


/* Recipes v1.2 — unified production controls + search-first recipe browser. */
.recipes-view input:not([type=checkbox]):not([type=radio]),
.recipes-view select,
.recipes-view textarea{box-sizing:border-box;width:100%;border:1px solid #b8c3bb;border-radius:7px;background:#fff;color:inherit;font:inherit}
.recipes-view input:not([type=checkbox]):not([type=radio]),
.recipes-view select{height:38px;min-height:38px;padding:7px 10px}
.recipes-view select{appearance:auto}
.recipes-view textarea{padding:8px 10px}
.recipe-details-grid>label,.recipe-ing-grid>label,.recipe-formula-grid>label{min-width:0;width:100%}
.recipe-details-grid>label>select,.recipe-ing-grid>label>select,.recipe-formula-grid>label>select{display:block;width:100%;max-width:none}
.recipes-browser-tools input,.recipes-browser-tools select{width:100%;height:38px;min-height:38px}
.recipes-browser-panel .empty-state{padding:7px 14px 11px;text-align:left;font-size:12px;color:#6b756e;background:#fafbfa;border-top:1px solid #eef1ef}
.recipes-browser-panel .recipe-list{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));max-height:220px;overflow-y:auto;overflow-x:hidden;align-content:start}
@media(min-width:1200px){.recipes-browser-panel .recipe-list{grid-template-columns:repeat(4,minmax(0,1fr))}}


/* Recipes v1.3 — integrated searchable Product select. */
.search-select-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
.search-select-combo{position:relative;width:100%;min-width:0}
.search-select-trigger{position:relative;width:100%;height:42px;min-height:42px;margin:0;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#1d2923;font:inherit;font-weight:400;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-select-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;line-height:1;color:#263d32}
.search-select-trigger:hover{border-color:#8fa098}.search-select-trigger:focus{outline:2px solid rgba(23,61,43,.16);outline-offset:1px;border-color:#547363}
.search-select-panel{position:absolute!important;z-index:1000;left:0;right:0;top:calc(100% + 5px);padding:0;border:1px solid #c8d1cc;border-radius:9px;background:#fff;box-shadow:0 12px 30px rgba(25,45,35,.18);overflow:hidden}
.search-select-panel.hidden{display:none!important}
.search-select-search{display:block!important;width:calc(100% - 18px)!important;height:36px!important;min-height:36px!important;margin:9px!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;box-shadow:none!important}
.search-select-options{display:block;max-height:245px;overflow-y:auto;overflow-x:hidden;padding:5px;border-top:1px solid #e5ebe7;background:#fff;overscroll-behavior:contain}
.search-select-option{display:block!important;width:100%!important;box-sizing:border-box!important;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;font-weight:400!important;line-height:1.35!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.search-select-option:hover,.search-select-option:focus{background:#f1f5f2!important;color:#173d2b!important}.search-select-option.selected{background:#e7f0ea!important;color:#173d2b!important;font-weight:700!important}
.search-select-empty{padding:10px;color:#66766e;font-size:13px}

/* Distillation native module — compact legacy-density workflow */
.distillation-view{max-width:1180px}.dist-form-panel{padding:18px}.dist-source-list,.dist-output-list{display:grid;gap:12px}.dist-source-row,.dist-output-row{margin:0;padding:14px}.dist-output-row .section-heading,.dist-source-row .section-heading{margin-bottom:10px}.dist-output-row h3,.dist-source-row h3{margin:0}.dist-destroy,.dist-tank-destination{margin-top:10px}.dist-preview-line{padding:8px 0;border-bottom:1px solid var(--border,#e5e7eb)}.dist-preview-line:last-child{border-bottom:0}.dist-preview-line strong{font-weight:700}.distillation-view select,.distillation-view input[type="text"],.distillation-view input[type="number"],.distillation-view input[type="date"],.distillation-view input[type="datetime-local"],.distillation-view textarea,.distillation-view .search-select-trigger,.distillation-view .tank-combo-trigger{box-sizing:border-box;width:100%;min-height:42px}.distillation-view .search-select-native,.distillation-view .tank-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.distillation-view .search-select-combo,.distillation-view .tank-combobox{position:relative;width:100%}.distillation-view .search-select-panel,.distillation-view .tank-combo-panel{z-index:1000}.distillation-view .dist-output-enabled{width:auto;min-height:0}.distillation-view .batch-check{white-space:nowrap}.distillation-view .dist-new-tank{margin-top:12px}.distillation-view .dist-dest-info,.distillation-view .dist-source-info{margin-top:6px;min-height:18px}
@media(max-width:760px){.distillation-view .form-grid{grid-template-columns:1fr}.dist-form-panel{padding:12px}}


/* Distillation v1.1 — use the established native-app field/select styling everywhere. */
.distillation-view select,
.distillation-view input[type="text"],
.distillation-view input[type="number"],
.distillation-view input[type="date"],
.distillation-view input[type="datetime-local"],
.distillation-view textarea{
  box-sizing:border-box;
  width:100%;
  min-height:42px;
  margin:0;
  padding:8px 10px;
  border:1px solid #b9c3bd;
  border-radius:8px;
  background:#fff;
  color:#1d2923;
  font:inherit;
  line-height:1.25;
  box-shadow:none;
}
.distillation-view select{
  height:42px;
  appearance:auto;
  -webkit-appearance:auto;
}
.distillation-view textarea{min-height:78px;resize:vertical}

/* Distillation tank selector: visually identical to the established searchable select,
   not a normal action button. Search + Show empty remain inside the floating panel. */
.distillation-view .tank-combo-trigger{
  position:relative;
  display:block;
  box-sizing:border-box;
  width:100%;
  height:42px;
  min-height:42px;
  margin:0;
  padding:8px 38px 8px 12px;
  border:1px solid #b9c3bd;
  border-radius:8px;
  background:#fff;
  color:#1d2923;
  font:inherit;
  font-weight:400;
  line-height:1.25;
  text-align:left;
  cursor:pointer;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:none;
  outline:0;
}
.distillation-view .tank-combo-trigger:after{
  content:'⌄';
  position:absolute;
  right:13px;
  top:50%;
  transform:translateY(-54%);
  font-size:18px;
  line-height:1;
  color:#263d32;
}
.distillation-view .tank-combo-trigger:hover{border-color:#8fa098;background:#fff}
.distillation-view .tank-combo-trigger:focus{
  outline:2px solid rgba(23,61,43,.16);
  outline-offset:1px;
  border-color:#547363;
  background:#fff;
}
.distillation-view .tank-combo-toolbar .tank-search{
  flex:1 1 auto;
  box-sizing:border-box;
  width:auto!important;
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:7px 10px!important;
  border:1px solid #b9c3bd!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#1d2923!important;
  font:inherit!important;
  font-size:13px!important;
  box-shadow:none!important;
}
.distillation-view .tank-combo-toolbar .batch-check{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#31463b!important;
  font-size:12px!important;
  font-weight:500!important;
  white-space:nowrap!important;
}
.distillation-view .tank-combo-toolbar .batch-check input[type="checkbox"]{
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  margin:0!important;
  padding:0!important;
  box-shadow:none!important;
}

/* Distillation v1.2: quantity + UOM uses the standard control system. */
#distillationView .dist-quantity-pair{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:10px;align-items:end}
#distillationView .dist-quantity-pair label{min-width:0}
#distillationView .dist-quantity-pair input,
#distillationView .dist-quantity-pair select{width:100%;min-height:40px;height:40px;box-sizing:border-box;border:1px solid var(--border,#cbd5e1);border-radius:6px;background:#fff;padding:8px 10px;font:inherit;color:inherit}
@media(max-width:700px){#distillationView .dist-quantity-pair{grid-template-columns:minmax(0,1fr) 92px}}


/* v1.3 — combined quantity/UOM control standard.
   UOM is visually part of the quantity box; existing value/unit behavior is unchanged. */
.quantity-uom-field{display:block;min-width:0;width:100%}
.quantity-uom-control{display:flex;align-items:stretch;width:100%;height:42px;min-height:42px;box-sizing:border-box;border:1px solid #b9c3bd;border-radius:8px;background:#fff;overflow:hidden}
.quantity-uom-control>input,.quantity-uom-control>select{box-sizing:border-box!important;height:40px!important;min-height:40px!important;margin:0!important;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;font:inherit!important}
.quantity-uom-control>input:first-child{flex:1 1 auto;width:100%!important;min-width:0;padding:8px 10px!important}
.quantity-uom-control>select{flex:0 0 auto;width:auto!important;min-width:70px;padding:8px 28px 8px 9px!important;border-left:1px solid #d7dfda!important;cursor:pointer}
.quantity-uom-control>.quantity-uom-text{flex:0 0 72px!important;width:72px!important;min-width:72px!important;padding:8px 7px!important;border-left:1px solid #d7dfda!important;text-align:center}
.quantity-uom-control:focus-within{border-color:#668778;box-shadow:0 0 0 2px rgba(53,107,77,.10)}
#distillationView .quantity-uom-control{height:40px;min-height:40px}
#distillationView .quantity-uom-control>input,#distillationView .quantity-uom-control>select{height:38px!important;min-height:38px!important}
#distillationView .dist-quantity-pair{display:contents}
.batch-ingredient-grid{grid-template-columns:1fr 1.4fr 1.2fr 1.25fr 1fr auto}
.recipe-ing-grid{grid-template-columns:1fr 1.6fr 1.15fr .6fr;gap:8px;align-items:end}
@media(max-width:900px){.batch-ingredient-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.recipe-ing-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.batch-ingredient-grid,.recipe-ing-grid{grid-template-columns:1fr}}

/* Tanks action workflows */
.tank-detail-actions{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}.compact-action-panel{max-width:900px}.compact-action-panel select,.compact-action-panel input,.compact-action-panel textarea{width:100%;box-sizing:border-box}.compact-action-panel select{appearance:auto;min-height:42px;padding:9px 36px 9px 11px;border:1px solid #cfcfcf;border-radius:7px;background:#fff;font:inherit;color:inherit}.tank-detail-actions button{white-space:nowrap}
/* Tanks v1.5: native partial-transfer form */
#partialTransferPanel .quantity-uom-combo{display:flex;align-items:stretch;width:100%;border:1px solid #b9c3bd;border-radius:8px;background:#fff;overflow:hidden}
#partialTransferPanel .quantity-uom-combo>input{border:0!important;border-radius:0!important;min-width:0;flex:1;box-shadow:none!important}
#partialTransferPanel .quantity-uom-combo>select{width:auto;min-width:68px;border:0!important;border-left:1px solid #d7ded9!important;border-radius:0!important;background:#f7f8f7;padding:0 28px 0 10px}
#partialTransferPanel .quantity-uom-static{display:flex;align-items:center;padding:0 12px;border-left:1px solid #d7ded9;background:#f7f8f7;font-size:13px;font-weight:600}
#partialTransferPanel .inline-check{display:flex;align-items:center;gap:6px;margin:5px 0 7px;font-size:13px;font-weight:500}
#partialTransferPanel .inline-check input{width:16px;height:16px;min-height:0}
#partialTransferPanel .text-button{margin-top:7px;border:0;background:transparent;padding:0;color:#244c38;font-weight:700;cursor:pointer}
#partialTransferPanel .source-summary{padding:8px 0;line-height:1.35}
#partialTransferPanel .preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:10px 0}
#partialTransferPanel .preview-grid>div{padding:8px 10px;background:#f5f7f5;border-radius:7px}.preview-grid span{display:block;font-size:12px;color:#66736c}.preview-grid strong{display:block;margin-top:2px}


/* Tanks v1.6 — partial-transfer selector uses the standard integrated tank picker. */
#tankTransferView .tank-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
#tankTransferView .tank-combobox{position:relative;width:100%;min-width:0}
#tankTransferView .tank-combo-trigger{position:relative;display:block;box-sizing:border-box;width:100%;height:42px;min-height:42px;margin:0;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#1d2923;font:inherit;font-weight:400;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none}
#tankTransferView .tank-combo-trigger:hover{border-color:#8fa098;background:#fff}
#tankTransferView .tank-combo-trigger:focus{outline:2px solid rgba(23,61,43,.16);outline-offset:1px;border-color:#547363}
#tankTransferView .tank-combo-toolbar .tank-search{flex:1 1 auto;box-sizing:border-box;width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;box-shadow:none!important}
#tankTransferView .tank-combo-toolbar .batch-check{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;white-space:nowrap!important;font-size:12px!important;font-weight:500!important;color:#31463b!important}
#tankTransferView .tank-combo-toolbar .batch-check input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;box-shadow:none!important}
#tankTransferView .tank-combo-empty{padding:10px;color:#68756e;font-size:13px}

/* Transfer in Bond native module */
.tib-view{max-width:1180px;margin:0 auto}.tib-panel{padding:18px}.tib-view .nested-panel{margin:18px 0;padding:16px;background:#f7f9f7;border:1px solid #dfe5e1;border-radius:8px}.tib-view h3{margin:4px 0 8px}.tib-view h4{margin:12px 0 8px}.tib-view .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;margin:12px 0}.tib-view .form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.tib-view label{font-weight:600}.tib-view input,.tib-view select,.tib-view textarea{width:100%;box-sizing:border-box;min-height:42px;margin-top:5px;padding:8px 10px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;font:inherit}.tib-view textarea{min-height:72px}.tib-view .inline-check,.tib-view .attestation,.tib-view .check-grid label{display:flex;align-items:flex-start;gap:8px;font-weight:400}.tib-view .inline-check input,.tib-view .attestation input,.tib-view .check-grid input{width:16px;min-height:16px;height:16px;margin-top:2px}.tib-view .check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;margin:8px 0 12px}.tib-view .tib-combobox{margin-top:5px}.tib-view .tank-combo-trigger{display:block;position:relative;width:100%;height:42px;padding:8px 38px 8px 12px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#17211c;font:inherit;font-weight:400;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none}.tib-view .tank-combo-trigger:after{content:'⌄';position:absolute;right:12px;top:8px}.tib-view .tank-combo-panel{position:absolute;z-index:80;width:min(620px,calc(100vw - 48px));max-height:330px;overflow:auto;background:#fff;border:1px solid #b9c3bd;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.14);padding:8px}.tib-view .tank-combobox{position:relative}.tib-view .tank-combo-toolbar{position:sticky;top:0;background:#fff;padding-bottom:7px;z-index:2}.tib-view .tank-combo-toolbar .tank-search{margin:0 0 6px}.tib-view .tank-combo-toolbar .batch-check{display:flex;align-items:center;gap:7px;font-weight:400}.tib-view .tank-combo-toolbar .batch-check input{width:16px;height:16px;min-height:16px;margin:0}.tib-view .tank-combo-option{display:block;width:100%;padding:9px 10px;border:0;border-radius:6px;background:#fff;text-align:left;font:inherit}.tib-view .tank-combo-option:hover{background:#eef4ef}.native-hidden-select{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.tib-view .source-summary{margin:10px 0;padding:10px;background:#f5f7f5;border-radius:7px}.tib-view .summary-grid{margin:12px 0}.tib-view .inventory-preview{margin-top:18px}
@media(max-width:760px){.tib-view .form-grid,.tib-view .form-grid.three,.tib-view .check-grid{grid-template-columns:1fr}}


/* Transfer in Bond v1.1 — compact native controls */
.tib-view select,
.tib-view input[type="text"],.tib-view input[type="number"],.tib-view input[type="date"],
.tib-view textarea{box-sizing:border-box;width:100%;min-height:42px;margin-top:5px;padding:8px 10px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#17211c;font:inherit;font-weight:400}
.tib-view select{appearance:auto;-webkit-appearance:menulist}
.tib-view input[type="checkbox"]{appearance:auto!important;-webkit-appearance:checkbox!important;box-sizing:border-box!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:1px 0 0!important;padding:0!important;border:initial!important;border-radius:initial!important;background:initial!important;box-shadow:none!important;flex:0 0 16px!important}
.tib-view .inline-check,.tib-view .attestation,.tib-view .check-grid label{display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;width:auto!important;min-height:20px!important;margin:7px 0!important;padding:0!important;font-weight:500!important}
.tib-view .check-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px 24px!important;margin:8px 0 14px!important}
.tib-view #tibArrivalStatusWrap{display:block;margin:10px 0 14px;max-width:360px}
.tib-view #tibExceptions{margin-top:10px}
.tib-view .nested-panel{margin:16px 0;padding:14px 16px;background:#f8faf8;border:1px solid #dfe5e1;border-radius:8px}
.tib-view .nested-panel>h3{margin:0 0 5px;font-size:16px}.tib-view .nested-panel>h4{margin:10px 0 7px;font-size:14px}
.tib-view .attestation{padding:10px 12px!important;background:#fff;border:1px solid #dfe5e1;border-radius:7px}
.tib-view .tib-combobox{position:relative!important;display:block!important;width:100%!important;min-width:0!important;margin-top:5px!important}
.tib-view .tank-combo-trigger{position:relative!important;display:block!important;box-sizing:border-box!important;width:100%!important;height:42px!important;min-height:42px!important;margin:0!important;padding:8px 38px 8px 12px!important;border:1px solid #b9c3bd!important;border-radius:8px!important;background:#fff!important;color:#17211c!important;font:inherit!important;font-weight:400!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.tib-view .tank-combo-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;line-height:1;color:#263d32}
.tib-view .tank-combo-panel{position:absolute!important;display:block;z-index:1000!important;left:0!important;right:0!important;top:calc(100% + 5px)!important;width:auto!important;max-height:none!important;overflow:hidden!important;padding:0!important;border:1px solid #c8d1cc!important;border-radius:9px!important;background:#fff!important;box-shadow:0 12px 30px rgba(25,45,35,.18)!important}
.tib-view .tank-combo-panel.hidden{display:none!important}
.tib-view .tank-combo-toolbar{display:flex!important;align-items:center!important;gap:10px!important;padding:9px!important;border-bottom:1px solid #e5ebe7!important;background:#fff!important}
.tib-view .tank-combo-toolbar .tank-search{flex:1 1 auto!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;font:inherit!important;font-size:13px!important}
.tib-view .tank-combo-toolbar .batch-check{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;white-space:nowrap!important;font-size:12px!important;font-weight:500!important}
.tib-view .tank-combo-options{display:block!important;max-height:245px!important;overflow-y:auto!important;padding:5px!important;background:#fff!important}
.tib-view .tank-combo-option{display:block!important;box-sizing:border-box!important;width:100%!important;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;font-weight:400!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.tib-view .tank-combo-option:hover,.tib-view .tank-combo-option:focus{background:#f1f5f2!important}.tib-view .tank-combo-option.selected{background:#e7f0ea!important;font-weight:700!important}
.tib-view .native-hidden-select{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;min-height:1px!important;margin:0!important;padding:0!important;opacity:0!important;pointer-events:none!important}
@media(max-width:760px){.tib-view .check-grid{grid-template-columns:1fr!important}.tib-view .tank-combo-panel{right:auto!important;width:min(430px,calc(100vw - 44px))!important}}


/* Cross-app v1.3: safe numeric entry + scrolling sidebar */
input[type="number"]{-moz-appearance:textfield}
input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
@media(min-width:851px){.sidebar{position:sticky;top:58px;height:calc(100vh - 58px);overflow-y:auto;align-self:start}}
.inventory-measurement-bar{display:flex;align-items:center;gap:10px;margin:0 0 12px}.inventory-measurement-bar label{margin:0}.inventory-measurement-bar select{width:auto;min-width:160px;padding:9px 34px 9px 10px;border:1px solid #b8c3bb;border-radius:7px;background:#fff;font:inherit}

/* Native Bottling */
.bottling-panel{max-width:980px}.bottling-panel>label{display:block;margin:14px 0}.bottling-preview{margin-top:20px}.bottling-preview .summary-card small{display:block;margin-top:5px;color:#68746c}.radio-line{display:flex!important;align-items:center;gap:8px;margin-top:8px;font-weight:400}.radio-line input{width:auto}.input-unit{font-size:12px;color:#68746c;margin-left:6px}.bottling-panel select,.bottling-panel input,.bottling-panel textarea{box-sizing:border-box}

/* Bottling v1.1 — match production selector/input standards */
.bottling-view .native-hidden-select{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;min-height:1px!important;margin:0!important;padding:0!important;opacity:0!important;pointer-events:none!important}
.bottling-view .tank-combobox{position:relative!important;display:block!important;width:100%!important;min-width:0!important;margin-top:5px!important}
.bottling-view .tank-combo-trigger{position:relative!important;display:block!important;box-sizing:border-box!important;width:100%!important;height:42px!important;min-height:42px!important;margin:0!important;padding:8px 38px 8px 12px!important;border:1px solid #b9c3bd!important;border-radius:8px!important;background:#fff!important;color:#17211c!important;font:inherit!important;font-weight:400!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important}
.bottling-view .tank-combo-trigger:after{content:'⌄';position:absolute;right:13px;top:50%;transform:translateY(-54%);font-size:18px;line-height:1;color:#263d32}
.bottling-view .tank-combo-panel{position:absolute!important;display:block;z-index:1000!important;left:0!important;right:0!important;top:calc(100% + 5px)!important;width:auto!important;max-height:none!important;overflow:hidden!important;padding:0!important;border:1px solid #c8d1cc!important;border-radius:9px!important;background:#fff!important;box-shadow:0 12px 30px rgba(25,45,35,.18)!important}
.bottling-view .tank-combo-panel.hidden{display:none!important}
.bottling-view .tank-combo-toolbar{display:flex!important;align-items:center!important;gap:10px!important;padding:9px!important;border-bottom:1px solid #e5ebe7!important;background:#fff!important}
.bottling-view .tank-combo-toolbar .tank-search{flex:1 1 auto!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;box-shadow:none!important}
.bottling-view .tank-combo-toolbar .batch-check{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;width:auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;white-space:nowrap!important;font-size:12px!important;font-weight:500!important;color:#31463b!important}
.bottling-view .tank-combo-toolbar .batch-check input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;box-shadow:none!important}
.bottling-view .tank-combo-options{display:block!important;max-height:245px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:5px!important;background:#fff!important;overscroll-behavior:contain}
.bottling-view .tank-combo-option{display:block!important;box-sizing:border-box!important;width:100%!important;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:6px!important;background:#fff!important;color:#1d2923!important;font:inherit!important;font-size:13px!important;font-weight:400!important;line-height:1.35!important;text-align:left!important;cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;box-shadow:none!important;outline:0!important}
.bottling-view .tank-combo-option:hover,.bottling-view .tank-combo-option:focus{background:#f1f5f2!important;color:#173d2b!important}.bottling-view .tank-combo-option.selected{background:#e7f0ea!important;color:#173d2b!important;font-weight:700!important}
.bottling-view select,.bottling-view input[type="text"],.bottling-view input[type="number"],.bottling-view input[type="date"],.bottling-view textarea{display:block;width:100%;box-sizing:border-box;min-height:42px;border:1px solid #b9c3bd;border-radius:8px;background:#fff;color:#17211c;padding:8px 10px;font:inherit}
.bottling-view select{height:42px;padding:8px 34px 8px 10px;appearance:auto}
.bottling-view textarea{min-height:78px;height:auto}
.bottling-view .form-grid label{min-width:0}
@media(max-width:760px){.bottling-view .tank-combo-panel{right:auto!important;width:min(430px,calc(100vw - 44px))!important}}

/* v1.2 per-field weight/volume controls */
.inventory-quantity-uom{min-width:150px;width:100%}
.inventory-quantity-uom input{min-width:0}
.quantity-uom-control>select{flex:0 0 82px;max-width:82px}
/* Unified tank gauge quantity controls */
.inventory-measure-label{font-size:12px;font-weight:600;margin:0 0 4px;color:#3d4b44}

/* Tax Paid native module */
.tax-paid-view{max-width:1180px}.tax-paid-panel{padding:18px}.tax-paid-lines{display:grid;gap:10px;margin:10px 0}.tax-paid-line{padding:12px}.tax-paid-line-grid{display:grid;grid-template-columns:minmax(340px,2.2fr) minmax(100px,.55fr) minmax(150px,.75fr) auto;gap:10px;align-items:end}.tax-paid-line-grid>.secondary-button{min-height:42px}.tax-paid-view input,.tax-paid-view select,.tax-paid-view textarea,.tax-paid-view .search-select-trigger{box-sizing:border-box;width:100%;min-height:42px}.tax-paid-view .taxPaidAvailable{background:#f4f6f5}.tax-paid-preview .summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.tax-paid-preview .summary-card{padding:12px;border:1px solid #dce4df;border-radius:8px;background:#fff}.tax-paid-preview .summary-label{font-size:12px;color:#66766e}.tax-paid-preview .summary-value{font-size:20px;font-weight:700}.tax-paid-preview .muted{font-size:12px;color:#66766e}@media(max-width:820px){.tax-paid-line-grid{grid-template-columns:1fr 1fr}.tax-paid-line-grid>label:first-child{grid-column:1/-1}.tax-paid-preview .summary{grid-template-columns:1fr}}


    .rr-form-sheet{
      background:#fff;
      border:1px solid #777;
      padding:10px;
      margin:14px 0;
      overflow-x:visible;
      width:100%;
      box-sizing:border-box;
    }

    .rr-form-title{text-align:center;font-weight:700;font-size:18px;margin:0 0 4px}

    .rr-form-meta{text-align:center;font-size:12px;margin-bottom:12px}

    .rr-grid{
      border-collapse:collapse;
      width:100%;
      min-width:0;
      table-layout:fixed;
      font-size:10px;
    }

    .rr-grid th,.rr-grid td{
      border:1px solid #777;
      padding:3px 3px;
      vertical-align:middle;
      overflow-wrap:anywhere;
    }

    .rr-grid th{
      background:#f1f1f1;
      text-align:center;
      line-height:1.15;
      white-space:normal;
    }

    .rr-grid .rr-line{
      width:175px;
      text-align:left;
      font-weight:500;
    }

    .rr-grid .rr-num{
      width:28px;
      text-align:right;
    }

    .rr-grid .rr-pg{text-align:right;white-space:nowrap}

    .rr-click{background:none;border:0;padding:1px 2px;text-decoration:underline;cursor:pointer;font:inherit;font-weight:600}

    .rr-click.zero{color:#777;text-decoration:none;font-weight:400}

    .rr-custom{background:#fff8e1}

    .rr-total-row{font-weight:700;background:#f5f5f5}

    .rr-check-ok{background:#edf7ed;border-left:5px solid #3f7d3f}

    .rr-check-bad{background:#fff1f0;border-left:5px solid #b42318}

    .rr-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}

    .rr-modal.hidden{display:none}

    .rr-modal-card{background:#fff;max-width:1100px;width:100%;max-height:85vh;overflow:auto;border-radius:8px;padding:18px}

    .rr-detail-table{width:100%;border-collapse:collapse;font-size:12px}

    .rr-detail-table th,.rr-detail-table td{border:1px solid #ddd;padding:6px}


    .rr-status-banner{
      padding:12px 14px;
      border-radius:6px;
      margin-top:12px;
      border-left:5px solid #777;
    }


    .rr-status-DRAFT{
      background:#f5f5f5;
      border-left-color:#777;
    }


    .rr-status-SAVED,
    .rr-status-AMENDED{
      background:#eef7ee;
      border-left-color:#3d7d3d;
    }


    .rr-status-AMENDMENT_NEEDED{
      background:#fff3e0;
      border-left-color:#d9822b;
    }


      .rr-grid{
        font-size:9px;
      }


      .rr-grid .rr-line{
        width:155px;
      }


      .rr-grid th,
      .rr-grid td{
        padding:2px;
      }


/* =========================================================
   REPORTS — legacy application visual parity
   These values intentionally mirror the original Index.html.
   ========================================================= */

/* The old Reports page deliberately escaped the normal 1250px page width.
   Do the same inside the native shell whenever Reports is visible. */
.main-content:has(#reportsView:not(.hidden)){
  max-width:none;
  width:100%;
  margin:0;
  padding:0;
}

#reportsView{
  max-width:none;
  width:calc(100% - 20px);
  margin:14px 10px 28px;
  padding:0;
  box-sizing:border-box;
  color:#222;
  font-family:Arial,Helvetica,sans-serif;
}

/* Original page header */
#reportsView .page-header{
  display:block;
  margin:0 0 20px;
}
#reportsView .page-header h2{
  margin-top:0;
  font-size:1.5em;
}
#reportsView .muted{
  color:#666;
}

/* Original full-width report control card */
#reportsView > .card{
  background:#fff;
  padding:24px;
  border:0;
  border-radius:8px;
  box-shadow:0 1px 5px rgba(0,0,0,.08);
  max-width:none;
  width:100%;
  box-sizing:border-box;
}

/* In the legacy application page form-grid had no special two-column rule here:
   Reporting Month occupied the normal available row. */
#reportsView .form-grid{
  display:block;
}

/* Exact original two-column Saved By / Notes row */
#reportsView .form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
}

/* Original field typography/geometry */
#reportsView label{
  display:block;
  font-weight:bold;
  margin:16px 0 6px;
}
#reportsView input,
#reportsView select,
#reportsView textarea{
  display:block;
  width:100%;
  box-sizing:border-box;
  min-height:0;
  margin:0;
  padding:10px;
  border:1px solid #bbb;
  border-radius:5px;
  background:#fff;
  color:#222;
  font-family:Arial,Helvetica,sans-serif;
  font-size:15px;
}
#reportsView textarea{min-height:90px}

/* Preserve the original inline checkbox layout instead of native input sizing. */
#reportsView input[type="checkbox"]{
  display:inline-block;
  width:auto;
  min-height:0;
  padding:0;
}

/* Original action row */
#reportsView .form-buttons{
  display:flex;
  gap:10px;
  flex-wrap:nowrap;
  margin-top:22px;
}
#reportsView .primary-button{
  border:0;
  border-radius:6px;
  background:#555;
  color:#fff;
  padding:11px 18px;
  font-weight:700;
  cursor:pointer;
}
#reportsView .secondary-button{
  border:1px solid #aaa;
  background:#fff;
  color:#222;
  border-radius:6px;
  padding:11px 18px;
  font-weight:700;
  cursor:pointer;
}
#reportsView button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* Original message geometry */
#reportsView .message{
  margin-top:15px;
  padding:12px;
  border-radius:5px;
}

/* Original report-sheet CSS, repeated here at higher specificity so native
   card/table rules cannot override the legacy application appearance. */
#reportsView .rr-form-sheet{
  background:#fff;
  border:1px solid #777;
  border-radius:0;
  box-shadow:none;
  padding:10px;
  margin:14px 0;
  overflow-x:visible;
  width:100%;
  max-width:none;
  box-sizing:border-box;
}
#reportsView .rr-form-title{
  text-align:center;
  font-weight:700;
  font-size:18px;
  margin:0 0 4px;
}
#reportsView .rr-form-meta{
  text-align:center;
  font-size:12px;
  margin-bottom:12px;
}
#reportsView .rr-grid{
  border-collapse:collapse;
  border-spacing:0;
  width:100%;
  min-width:0;
  max-width:none;
  table-layout:fixed;
  white-space:normal;
  font-size:10px;
}
#reportsView .rr-grid th,
#reportsView .rr-grid td{
  border:1px solid #777;
  padding:3px 3px;
  vertical-align:middle;
  overflow-wrap:anywhere;
  line-height:normal;
}
#reportsView .rr-grid th{
  background:#f1f1f1;
  color:#222;
  text-align:center;
  font-weight:700;
  line-height:1.15;
  white-space:normal;
}
#reportsView .rr-grid .rr-line{
  width:175px;
  text-align:left;
  font-weight:500;
}
#reportsView .rr-grid .rr-num{
  width:28px;
  text-align:right;
}
#reportsView .rr-grid .rr-pg{
  text-align:right;
  white-space:nowrap;
}
#reportsView .rr-click{
  background:none;
  border:0;
  border-radius:0;
  color:#222;
  padding:1px 2px;
  text-decoration:underline;
  cursor:pointer;
  font:inherit;
  font-weight:600;
}
#reportsView .rr-click.zero{
  color:#777;
  text-decoration:none;
  font-weight:400;
}
#reportsView .rr-custom{background:#fff8e1}
#reportsView .rr-total-row{font-weight:700;background:#f5f5f5}

/* Original status/reconciliation presentation */
#reportsView .rr-check-ok{background:#edf7ed;border-left:5px solid #3f7d3f}
#reportsView .rr-check-bad{background:#fff1f0;border-left:5px solid #b42318}
#reportsView .rr-status-banner{
  padding:12px 14px;
  border-radius:6px;
  margin-top:12px;
  border-left:5px solid #777;
}
#reportsView .rr-status-DRAFT{background:#f5f5f5;border-left-color:#777}
#reportsView .rr-status-SAVED,
#reportsView .rr-status-AMENDED{background:#eef7ee;border-left-color:#3d7d3d}
#reportsView .rr-status-AMENDMENT_NEEDED{background:#fff3e0;border-left-color:#d9822b}

/* Original modal/detail tables */
.rr-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:20px;
}
.rr-modal.hidden{display:none}
.rr-modal-card{
  background:#fff;
  max-width:1100px;
  width:100%;
  max-height:85vh;
  overflow:auto;
  border-radius:8px;
  padding:18px;
}
.rr-detail-table{width:100%;border-collapse:collapse;font-size:12px}
.rr-detail-table th,.rr-detail-table td{border:1px solid #ddd;padding:6px}

/* Same breakpoint used by the legacy application report page. */
@media(max-width:1500px){
  #reportsView{
    width:calc(100% - 12px);
    margin-left:6px;
    margin-right:6px;
  }
  #reportsView .rr-grid{font-size:9px}
  #reportsView .rr-grid .rr-line{width:155px}
  #reportsView .rr-grid th,
  #reportsView .rr-grid td{padding:2px}
}

@media(max-width:700px){
  #reportsView .form-row{grid-template-columns:1fr}
  #reportsView .form-buttons{flex-wrap:wrap}
}


/* Reports v1.2 — Parts III–V are statutory report sections, not dashboard cards. */
#reportsView .rr-production-subpart{
  margin-top:14px;
  margin-bottom:14px;
}
#reportsView .rr-production-subpart-grid{
  width:100%;
  min-width:0 !important;
  table-layout:fixed;
}
#reportsView .rr-production-subpart-grid .rr-num{
  width:28px;
}
#reportsView .rr-production-subpart-grid .rr-line{
  width:175px;
}
#reportsView .rr-production-subpart-grid .rr-pg{
  text-align:right;
}
@media(max-width:1500px){
  #reportsView .rr-production-subpart-grid .rr-line{
    width:155px;
  }
}

/* Every report value remains an actual button, including zero-value cells.
   Zeroes stay visually quiet but are still clickable for an audit showing
   that no transactions / physical inventory contributed. */
#reportsView .rr-click.zero{
  cursor:pointer;
}

/* =========================================================
   ADMIN — original legacy application visual parity
   ========================================================= */
#adminView{max-width:none;width:100%;box-sizing:border-box}
#adminView .page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
#adminView .page-title h2{margin:0}
#adminView #adminSubmenuBar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px;padding:10px;background:#fff;border-radius:8px}
#adminView .card{background:#fff;padding:24px;border-radius:8px;box-shadow:0 1px 5px rgba(0,0,0,.08);box-sizing:border-box}
#adminView .table-card{background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.08)}
#adminView .table-wrapper{overflow-x:auto}
#adminView table{width:100%;border-collapse:collapse}
#adminView th,#adminView td{padding:10px 12px;border-bottom:1px solid #eee;text-align:left;vertical-align:middle}
#adminView th{background:#f7f7f7;font-size:13px}
#adminView .form-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}
#adminView label{display:block;font-weight:700;margin:12px 0 6px}
#adminView input:not([type=checkbox]),#adminView select,#adminView textarea{display:block;width:100%;box-sizing:border-box;padding:10px;border:1px solid #bbb;border-radius:5px;background:#fff;font-size:15px}
#adminView textarea{min-height:90px}
#adminView input[type=checkbox]{width:auto!important;min-height:0!important}
#adminView .form-buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
#adminView .primary-button{border:0;border-radius:6px;background:#555;color:#fff;padding:10px 16px;font-weight:700;cursor:pointer}
#adminView .secondary-button{border:1px solid #aaa;border-radius:6px;background:#fff;color:#222;padding:9px 14px;font-weight:700;cursor:pointer}
#adminView .message{margin-top:12px;border-radius:6px}
#adminView .hidden{display:none!important}
#adminView .admin-subsection{width:100%}
#adminView .admin-subsection>.card,#adminView .admin-subsection>.table-card{max-width:none!important}
@media(max-width:800px){#adminView .form-row{grid-template-columns:1fr}}

/* Daily TTB compliance records */
#reportsView .rr-daily-section{background:#fff;padding:24px;border-radius:8px;box-shadow:0 1px 5px rgba(0,0,0,.08);margin-bottom:22px}
#reportsView .rr-daily-heading h3{margin:0 0 5px;font-size:19px}
#reportsView .rr-daily-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:16px}
#reportsView .rr-daily-controls label{margin:0;min-width:180px}
#reportsView .rr-daily-note{font-size:12px;color:#666;margin-top:10px}
#reportsView .rr-monthly-divider{display:flex;align-items:center;gap:12px;margin:22px 0 12px;font-weight:700;color:#444}
#reportsView .rr-monthly-divider:before,#reportsView .rr-monthly-divider:after{content:"";height:1px;background:#bbb;flex:1}
#reportsView .rr-daily-tabs{display:flex;gap:8px;margin:16px 0 10px;flex-wrap:wrap}
#reportsView .rr-daily-tabs button{border:1px solid #aaa;background:#fff;border-radius:6px;padding:8px 12px;font-weight:700;cursor:pointer}
#reportsView .rr-daily-report-header{text-align:center;border:1px solid #777;border-bottom:0;padding:10px;background:#fafafa}
#reportsView .rr-daily-report-title{font-size:18px;font-weight:700;margin:3px 0}
#reportsView .rr-daily-record{border:1px solid #777;padding:10px;margin:0 0 14px;background:#fff}
#reportsView .rr-daily-record h4{margin:0 0 8px;font-size:15px}
#reportsView .rr-daily-record h5{margin:12px 0 5px}
#reportsView .rr-daily-meta{display:flex;gap:8px 18px;flex-wrap:wrap;font-size:12px;margin:5px 0 8px}
#reportsView .rr-daily-totals{font-size:12px;padding:8px;background:#f5f5f5;margin:8px 0}
#reportsView .rr-daily-empty{border:1px solid #777;padding:16px;background:#fff}
#reportsView .rr-daily-panel .rr-detail-table{font-size:11px}
#reportsView .rr-daily-panel .rr-detail-table th,#reportsView .rr-daily-panel .rr-detail-table td{padding:4px}

#reportsView .rr-section-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px;padding:10px;background:#fff;border-radius:8px;box-shadow:0 1px 5px rgba(0,0,0,.08)}
#reportsView .rr-section-tab{border:1px solid #aaa;background:#fff;color:#222;border-radius:6px;padding:9px 14px;font-weight:700;cursor:pointer}
#reportsView .rr-section-tab.active{background:#555;color:#fff;border-color:#555}
#reportsView .rr-monthly-section-title{font-size:19px;font-weight:700;margin:0 0 12px}

#reportsView .rr-compliance-summary{margin:14px 0}
#reportsView .rr-compliance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin:10px 0}
#reportsView .rr-compliance-card{display:grid;grid-template-columns:1fr auto;gap:2px 8px;text-align:left;border:1px solid #aaa;background:#fff;border-radius:6px;padding:10px;cursor:pointer}
#reportsView .rr-compliance-card span{font-weight:700}
#reportsView .rr-compliance-card strong{font-size:18px}
#reportsView .rr-compliance-card small{grid-column:1/-1;color:#666}
#reportsView .rr-compliance-card.active{border-color:#555;box-shadow:inset 0 0 0 1px #555;background:#f5f5f5}

/* Daily compliance navigation — compact professional segmented cards */
#reportsView .rr-compliance-grid{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 12px}
#reportsView .rr-compliance-card{appearance:none;display:flex;align-items:center;gap:8px;min-height:38px;width:auto;min-width:0;padding:7px 11px;border:1px solid #c7c7c7;border-radius:6px;background:#fff;color:#222;box-shadow:0 1px 2px rgba(0,0,0,.04);font:inherit;cursor:pointer;transition:border-color .12s,background .12s,box-shadow .12s}
#reportsView .rr-compliance-card:hover{background:#f7f7f7;border-color:#999;box-shadow:0 1px 4px rgba(0,0,0,.09)}
#reportsView .rr-compliance-card span{font-size:13px;font-weight:700;white-space:nowrap}
#reportsView .rr-compliance-card strong{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#ededed;font-size:12px;line-height:1}
#reportsView .rr-compliance-card small{display:none}
#reportsView .rr-compliance-card.active{background:#4f4f4f;border-color:#4f4f4f;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.15)}
#reportsView .rr-compliance-card.active strong{background:#fff;color:#333}
#reportsView .rr-compliance-summary>.rr-daily-note{margin-top:5px}
@media(max-width:700px){#reportsView .rr-compliance-card{flex:1 1 auto;justify-content:space-between}}

#reportsView .rr-capture-box{margin:12px 0;border:1px solid #c9c9c9;border-radius:7px;background:#fff}
#reportsView .rr-capture-box>summary{padding:10px 12px;font-weight:750;cursor:pointer;background:#f7f7f7;border-radius:7px}
#reportsView .rr-capture-box[open]>summary{border-bottom:1px solid #ddd;border-radius:7px 7px 0 0}
#reportsView .rr-capture-box>div,#reportsView .rr-capture-box>label{margin:10px 12px}
#reportsView .rr-capture-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px 12px}
#reportsView .rr-capture-grid label,#reportsView .rr-capture-box>label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:650}
#reportsView .rr-capture-grid input,#reportsView .rr-capture-grid select,#reportsView .rr-capture-box textarea{width:100%;box-sizing:border-box;border:1px solid #bbb;border-radius:5px;padding:7px 8px;background:#fff;font:inherit}
#reportsView .rr-capture-actions{display:flex;justify-content:flex-end}

.operation-compliance-details{margin:10px 0;border:1px solid #d0d0d0;border-radius:6px;background:#fafafa}
.operation-compliance-details>summary{cursor:pointer;padding:9px 11px;font-weight:700}
.operation-compliance-details[open]>summary{border-bottom:1px solid #ddd}
.operation-compliance-details>.form-grid,.operation-compliance-details>.help-text{margin:10px 11px}

.rr-compliance-card em{display:block;font-style:normal;font-size:.78rem;font-weight:600;margin-top:2px;opacity:.8}

.rr-audit-details{margin-top:12px;border:1px solid #ddd;border-radius:6px;background:#fafafa}.rr-audit-details>summary{cursor:pointer;padding:8px 10px;font-weight:700}.rr-audit-details[open]>summary{border-bottom:1px solid #ddd}.rr-audit-details>table{margin:8px 10px;width:calc(100% - 20px)}

.rr-specific-records{margin:12px 0;border:1px solid #d7d7d7;border-radius:7px;background:#fff}.rr-specific-records>summary{cursor:pointer;padding:9px 11px;font-weight:800}.rr-record-browser{padding:0 10px 10px}.rr-record-browser-tools{display:flex;gap:8px;margin-bottom:8px}.rr-record-browser-tools input,.rr-record-browser-tools select{height:36px;border:1px solid #bbb;border-radius:5px;padding:0 9px}.rr-record-browser-tools input{flex:1}.rr-record-row{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;padding:8px 9px;border:0;border-top:1px solid #eee;background:#fff;cursor:pointer}.rr-record-row:hover{background:#f7f7f7}.rr-record-row b,.rr-record-row small{display:block}.rr-record-row small{margin-top:2px;font-weight:400;opacity:.72}.rr-record-row strong{white-space:nowrap;margin-left:12px;font-size:.8rem}.rr-individual-print main{max-width:1100px;margin:auto;padding:16px}.rr-print-actions{margin-top:14px}@media print{.rr-print-actions{display:none}.rr-individual-print main{max-width:none;padding:0}.rr-detail-table tr{break-inside:avoid}}

.rr-history-tools{display:flex;align-items:end;gap:8px;padding:0 0 8px}.rr-history-tools label{font-size:.8rem;font-weight:700;display:flex;flex-direction:column;gap:3px}.rr-history-tools input{height:36px;border:1px solid #bbb;border-radius:5px;padding:0 8px}.rr-history-tools button{height:36px;border:1px solid #aaa;border-radius:5px;background:#fff;padding:0 10px;cursor:pointer}.rr-history-tools button:hover{background:#f5f5f5}.rr-history-caption{font-size:.82rem;margin:0 0 9px;opacity:.75}.rr-no-records{padding:14px 8px;border-top:1px solid #eee;opacity:.7}

.rr-reconcile-card,.rr-destruction-block{margin-top:12px;border:1px solid #bbb;border-radius:6px;padding:10px;background:#fff}.rr-reconcile-card h4,.rr-destruction-block h4{margin:0 0 8px}.rr-reconcile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.rr-reconcile-grid>div{border:1px solid #ddd;border-radius:5px;padding:8px}.rr-reconcile-grid span{display:block;font-size:.75rem;font-weight:700;opacity:.7;text-transform:uppercase}.rr-reconcile-grid b{display:block;margin-top:3px;font-size:1.05rem}.rr-reconcile-result{border-width:2px!important}.rr-record-note,.rr-reconcile-card p{font-size:.8rem;margin:8px 0 0;opacity:.78}@media print{.rr-reconcile-card,.rr-destruction-block{break-inside:avoid}.rr-reconcile-grid{grid-template-columns:repeat(3,1fr)}}

/* v6.3 — keep the Daily Records screen compact; individual-record browser is opt-in */
#reportsView .rr-specific-records{margin:10px 0}
#reportsView .rr-specific-records>summary{display:flex;align-items:center;gap:10px;padding:8px 10px;list-style-position:inside}
#reportsView .rr-specific-records>summary span{font-weight:800}
#reportsView .rr-specific-records>summary small{font-weight:500;color:#777}
#reportsView .rr-specific-records:not([open]) .rr-record-browser{display:none}
#reportsView .rr-specific-records[open] .rr-record-browser{padding:10px;border-top:1px solid #e2e2e2}
#reportsView #rrRecordRows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
#reportsView .rr-record-row{border:1px solid #e2e2e2;border-radius:5px;padding:7px 8px;min-width:0}
#reportsView .rr-record-row span{overflow:hidden}
#reportsView .rr-record-row b,#reportsView .rr-record-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#reportsView .rr-record-row strong{font-size:11px}
@media(max-width:850px){#reportsView #rrRecordRows{grid-template-columns:1fr}}
@media print{
  #reportsView .rr-specific-records{display:none!important}
}

/* v6.4 — do not reserve viewport/page height after the compact Specific TTB Records control */
#reportsView,#rrDailyRecords,#rrDailyPanels,.rr-daily-wrap,.rr-report-output{min-height:0!important;height:auto!important}
#reportsView .rr-specific-records{min-height:0!important;height:auto!important}
#reportsView .rr-specific-records:not([open]){padding-bottom:0!important;margin-bottom:10px!important}
#reportsView .rr-specific-records:not([open])>summary{margin-bottom:0!important}
@media print{
  #reportsView,#rrDailyRecords,#rrDailyPanels,.rr-daily-wrap,.rr-report-output{min-height:0!important;height:auto!important}
}

/* v6.5 — bounded historical record picker; never create a giant blank/expanded report region */
#reportsView .rr-record-browser{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
#reportsView #rrRecordRows{height:auto!important;min-height:0!important;max-height:300px!important;overflow-y:auto!important;align-content:start!important;grid-auto-rows:max-content!important}
#reportsView .rr-record-row{height:auto!important;min-height:46px!important}
#reportsView .rr-history-tools,#reportsView .rr-record-browser-tools,#reportsView .rr-history-caption{height:auto!important;min-height:0!important}
#reportsView .rr-specific-records[open]{height:auto!important;min-height:0!important;max-height:430px!important;overflow:hidden!important}
.rr-event-direction{display:flex;align-items:baseline;gap:10px;margin:10px 0;padding:9px 11px;border:2px solid #777;border-radius:6px;width:max-content;max-width:100%}.rr-event-direction span{font-size:12px;font-weight:800}.rr-event-direction b{font-size:18px}
@media print{#reportsView .rr-specific-records{display:none!important}.rr-event-direction{break-inside:avoid}}

/* v6.6 — Specific TTB Records visibility */
#reportsView .rr-specific-records,
#reportsView .rr-specific-records summary,
#reportsView .rr-record-browser,
#reportsView .rr-record-browser-tools,
#reportsView .rr-history-tools,
#reportsView .rr-history-caption,
#reportsView #rrRecordRows{color:#222!important;background:#fff!important}
#reportsView .rr-record-row{color:#222!important;background:#fff!important;border-color:#ddd!important}
#reportsView .rr-record-row b{color:#111!important}
#reportsView .rr-record-row small{color:#666!important;opacity:1!important}
#reportsView .rr-record-row strong{color:#222!important}
#reportsView .rr-record-row:hover{background:#f3f3f3!important}
#reportsView .rr-record-browser input,
#reportsView .rr-record-browser select,
#reportsView .rr-history-tools input,
#reportsView .rr-history-tools button{color:#222!important;background:#fff!important;border-color:#aaa!important}
#reportsView .rr-record-browser input::placeholder{color:#777!important;opacity:1!important}

/* v6.7 — one universal Specific TTB Records filter */
#reportsView .rr-universal-filter{display:block!important;width:100%!important;margin:0 0 8px!important;background:#fff!important}
#reportsView .rr-universal-filter input{display:block!important;width:100%!important;height:38px!important;box-sizing:border-box!important;border:1px solid #aaa!important;border-radius:5px!important;padding:0 10px!important;color:#222!important;background:#fff!important}
#reportsView .rr-universal-filter input::placeholder{color:#777!important;opacity:1!important}
#reportsView .rr-record-browser-tools{display:none!important}

/* v6.8 — top Daily coverage cards drive Specific TTB Records */
#reportsView .rr-history-tools{display:none!important}
#reportsView .rr-coverage-card[data-record-category]{cursor:pointer}
#reportsView .rr-coverage-card[data-record-category]:hover{outline:1px solid #777}
#reportsView .rr-coverage-card.rr-record-category-selected{background:#555!important;color:#fff!important;border-color:#555!important}
#reportsView .rr-coverage-card.rr-record-category-selected *{color:inherit!important}

/* v6.9 — make filtered rows actually collapse in CSS grid */
#reportsView #rrRecordRows .rr-record-row[hidden]{display:none!important}
#reportsView .rr-coverage-card[data-record-category]{cursor:pointer!important}
#reportsView .rr-coverage-card.rr-record-category-selected{background:#555!important;color:#fff!important;border-color:#555!important}

/* v6.11: JS sets display directly for deterministic category/text filtering */
#reportsView #rrRecordRows .rr-record-row{display:flex}

.rr-record-context{margin:10px 0 12px;border:1px solid #bbb;border-radius:6px;padding:9px;background:#fafafa}.rr-record-context h4{margin:0 0 7px;font-size:14px}@media print{.rr-record-context{break-inside:avoid;background:#fff}}

.trace-search-panel h2,.trace-search-panel p{margin-top:0}.trace-search-grid{display:grid;grid-template-columns:1fr 1.4fr 1fr auto;gap:12px;align-items:end}.trace-search-grid label{display:block;font-weight:700;margin-bottom:6px}.trace-optional{font-weight:400;color:#666}.trace-combo{position:relative}.trace-combo-control{width:100%;height:42px;border:1px solid #aaa;border-radius:6px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 11px}.trace-combo-menu{position:absolute;z-index:80;left:0;right:0;top:calc(100% + 4px);background:#fff;border:1px solid #aaa;border-radius:6px;box-shadow:0 8px 24px rgba(0,0,0,.16);padding:7px}.trace-combo-menu input{width:100%;margin-bottom:6px}.trace-combo-results{max-height:260px;overflow:auto}.trace-combo-results button{display:block;width:100%;border:0;background:#fff;text-align:left;padding:8px;border-radius:4px}.trace-combo-results button:hover{background:#eee}.trace-recall-banner{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:8px;margin:0 0 14px}.trace-recall-banner>div{border:1px solid #bbb;border-radius:7px;padding:10px;background:#fff}.trace-recall-banner span{display:block;font-size:12px;color:#666}.trace-recall-banner strong{display:block;margin-top:3px;font-size:18px}.trace-action-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.trace-action-grid>div{border:1px solid #ccc;border-radius:6px;padding:10px}.trace-action-grid strong{font-size:24px;display:block}.trace-action-grid span{font-size:12px;color:#555}.trace-help{color:#666;font-size:13px}.trace-none{color:#666;font-style:italic}.trace-origin{display:flex;gap:12px;align-items:center;border-left:5px solid #333;padding:9px 12px;margin-bottom:10px;background:#f4f4f4}#traceResults .panel h3{margin:15px 0 7px;font-size:15px}@media(max-width:1000px){.trace-search-grid{grid-template-columns:1fr 1fr}.trace-recall-banner{grid-template-columns:1fr 1fr}.trace-action-grid{grid-template-columns:1fr}}@media print{
 body[data-active-nav="traceabilityNav"] *{visibility:hidden}
 body[data-active-nav="traceabilityNav"] #traceabilityView,
 body[data-active-nav="traceabilityNav"] #traceabilityView *{visibility:visible}
 body[data-active-nav="traceabilityNav"] #traceabilityView{position:absolute;left:0;top:0;width:100%}
 body[data-active-nav="traceabilityNav"] .sidebar,
 body[data-active-nav="traceabilityNav"] .topbar,
 body[data-active-nav="traceabilityNav"] .trace-search-panel,
 body[data-active-nav="traceabilityNav"] #tracePrintButton{display:none!important}
}

/* Traceability v1.3 — match native searchable-select/input controls */
#traceabilityView .trace-search-grid input[type="search"],
#traceabilityView .trace-combo-control{
  height:40px;
  min-height:40px;
  width:100%;
  box-sizing:border-box;
  border:1px solid #b8b8b8;
  border-radius:6px;
  background:#fff;
  color:#222;
  font:inherit;
  padding:0 11px;
}
#traceabilityView .trace-search-grid input[type="search"]::placeholder{color:#777;opacity:1}
#traceabilityView .trace-combo-control{display:flex;align-items:center;justify-content:space-between;text-align:left}
#traceabilityView .trace-combo-control,
#traceabilityView .trace-combo-control span{color:#222}
#traceabilityView .trace-combo-menu{
  background:#fff;
  color:#222;
  border:1px solid #b8b8b8;
}
#traceabilityView .trace-combo-menu input[type="search"]{
  background:#fff;
  color:#222;
  border:1px solid #b8b8b8;
}
#traceabilityView .trace-combo-results,
#traceabilityView .trace-combo-results button,
#traceabilityView .trace-combo-empty{color:#222}
#traceabilityView .trace-combo-results button{
  background:#fff;
  border:0;
}
#traceabilityView .trace-combo-results button:hover,
#traceabilityView .trace-combo-results button:focus{
  background:#f1f1f1;
  color:#111;
}

/* Traceability v1.4 readability */
#traceabilityView #traceResults>.panel{padding:18px 20px;margin-bottom:14px}
#traceabilityView #traceResults>.panel>h2{margin:0 0 14px;font-size:20px;border-bottom:2px solid #222;padding-bottom:8px}
.trace-recall-banner{grid-template-columns:minmax(300px,2fr) repeat(4,minmax(110px,1fr))}
.trace-recall-banner>div:first-child{background:#f4f4f4}.trace-recall-banner>div:first-child strong{font-size:18px}.trace-recall-banner>div:first-child strong span{font-weight:800}.trace-recall-banner>div:first-child small{display:block;font-size:12px;font-weight:500;color:#555;margin-top:3px}
.trace-recall-callout{border-left:5px solid #222;background:#f5f5f5;padding:13px 15px;border-radius:4px}.trace-recall-callout>strong{font-size:17px}.trace-recall-callout p{font-size:15px;line-height:1.45;margin:6px 0 10px}.trace-contact{background:#fff;border:1px solid #bbb;border-radius:5px;padding:9px 11px}.trace-contact.safe{border-style:dashed}
.trace-section-label{font-size:11px;font-weight:800;letter-spacing:.07em;color:#555;margin:16px 0 7px}.trace-section-label:first-child{margin-top:0}
.trace-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.trace-item-card,.trace-disposition-card{border:1px solid #c9c9c9;border-radius:7px;background:#fff;padding:11px 12px}.trace-card-title,.trace-disposition-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.trace-card-title strong,.trace-disposition-head strong{font-size:15px}.trace-card-product{font-size:13px;margin:3px 0 9px;color:#444}
.trace-badge{display:inline-block;border:1px solid #aaa;border-radius:999px;background:#f1f1f1;padding:2px 7px;font-size:10px;font-weight:800;white-space:nowrap;color:#222}
.trace-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px;font-size:12px}.trace-meta span{min-width:0;overflow-wrap:anywhere}.trace-meta b{display:block;color:#666;font-size:10px;text-transform:uppercase;letter-spacing:.03em;margin-bottom:1px}
.trace-empty{border:1px dashed #bbb;border-radius:6px;padding:11px;color:#666;background:#fafafa}
.trace-disposition-list{display:grid;gap:8px}.trace-disposition-head span:not(.trace-badge){display:block;font-size:12px;color:#555;margin-top:2px}.trace-disposition-card p{margin:7px 0;font-size:12px}.trace-out{border-left:5px solid #333}
.trace-chain-origin{border:2px solid #333;border-radius:7px;padding:11px 13px;margin-bottom:10px;background:#f5f5f5}.trace-chain-origin>span{display:block;font-size:10px;font-weight:800;letter-spacing:.07em;color:#555}.trace-chain-origin>strong{display:block;font-size:16px;margin:2px 0}.trace-chain-origin small{color:#555}
.trace-timeline{margin-left:18px;border-left:2px solid #aaa;padding-left:20px}.trace-step{position:relative;padding:4px 0 16px}.trace-step:last-child{padding-bottom:2px}.trace-step-dot{position:absolute;left:-34px;top:2px;width:24px;height:24px;border-radius:50%;background:#333;color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800}.trace-step-title{display:flex;gap:8px;align-items:center}.trace-step-title strong{font-size:15px}.trace-step-product{font-size:13px;margin:2px 0}.trace-step small{color:#666}
@media(max-width:900px){.trace-card-grid{grid-template-columns:1fr}.trace-recall-banner{grid-template-columns:1fr 1fr}.trace-recall-banner>div:first-child{grid-column:1/-1}}
@media print{#traceabilityView #traceResults>.panel{break-inside:auto}.trace-item-card,.trace-disposition-card,.trace-step{break-inside:avoid}.trace-card-grid{grid-template-columns:1fr 1fr}}

/* Traceability v1.5 — use the available space; larger readable type */
#traceabilityView{font-size:16px}
#traceabilityView .page-heading h1{font-size:34px}
#traceabilityView .page-heading p{font-size:16px}
#traceabilityView .trace-search-panel h2{font-size:26px}
#traceabilityView .trace-search-panel,
#traceabilityView #traceResults>.panel{padding:20px 22px}
#traceabilityView .trace-help{font-size:15px;line-height:1.45}
#traceabilityView .trace-search-grid label{font-size:16px}
#traceabilityView .trace-search-grid input[type="search"],
#traceabilityView .trace-combo-control{height:44px;min-height:44px;font-size:16px}
#traceabilityView .trace-combo-results button{font-size:16px;padding:10px}
#traceabilityView #traceResults>.panel>h2{font-size:24px}
.trace-recall-banner span{font-size:14px}
.trace-recall-banner strong{font-size:24px}
.trace-recall-banner>div:first-child strong{font-size:22px}
.trace-recall-banner>div:first-child small{font-size:14px}
.trace-recall-callout>strong{font-size:20px}
.trace-recall-callout p{font-size:17px;line-height:1.5}
.trace-contact{font-size:16px;line-height:1.4}
.trace-section-label{font-size:13px;margin:18px 0 9px}
.trace-card-grid{gap:12px}
.trace-item-card,.trace-disposition-card{padding:15px 16px}
.trace-card-title strong,.trace-disposition-head strong{font-size:19px}
.trace-card-product{font-size:16px;margin:5px 0 12px}
.trace-badge{font-size:13px;padding:3px 9px}
.trace-meta{font-size:16px;gap:9px 18px}
.trace-meta b{font-size:12px;margin-bottom:3px}
.trace-empty{font-size:16px;padding:14px}
.trace-disposition-head span:not(.trace-badge){font-size:15px}
.trace-disposition-card p{font-size:16px;line-height:1.4;margin:10px 0}
.trace-chain-origin{padding:14px 16px}
.trace-chain-origin>span{font-size:12px}
.trace-chain-origin>strong{font-size:20px}
.trace-chain-origin small{font-size:15px}
.trace-timeline{margin-left:22px;padding-left:25px}
.trace-step{padding:6px 0 20px}
.trace-step-dot{left:-41px;width:30px;height:30px;font-size:14px}
.trace-step-title strong{font-size:19px}
.trace-step-product{font-size:16px;margin:4px 0}
.trace-step small{font-size:14px}
@media(min-width:1200px){
  .trace-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .trace-disposition-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
@media print{
  #traceabilityView{font-size:11pt}
  #traceabilityView .page-heading h1{font-size:22pt}
  #traceabilityView #traceResults>.panel>h2{font-size:16pt}
  .trace-recall-callout p,.trace-contact,.trace-meta,.trace-disposition-card p{font-size:10.5pt}
  .trace-card-title strong,.trace-disposition-head strong,.trace-step-title strong{font-size:12pt}
  .trace-card-product,.trace-step-product{font-size:10.5pt}
  .trace-section-label,.trace-meta b,.trace-chain-origin>span{font-size:8.5pt}
  .trace-badge{font-size:8.5pt}
}

/* Traceability v1.6 — dispositions/transactions are chronological full-width records */
#traceabilityView .trace-disposition-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#traceabilityView .trace-disposition-card{
  width:100%;
  box-sizing:border-box;
}
@media(min-width:1200px){
  #traceabilityView .trace-disposition-list{
    display:flex;
    flex-direction:column;
  }
}

/* Traceability v1.7 — compact wide cards, attributes on one row */
#traceabilityView .trace-card-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
#traceabilityView .trace-item-card,
#traceabilityView .trace-disposition-card{
  padding:10px 14px;
}
#traceabilityView .trace-card-product{
  margin:2px 0 7px;
}
#traceabilityView .trace-meta{
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:18px;
  width:100%;
}
#traceabilityView .trace-meta span{
  flex:1 1 0;
  min-width:0;
  white-space:nowrap;
}
#traceabilityView .trace-meta b{
  display:inline;
  margin:0 6px 0 0;
}
#traceabilityView .trace-disposition-card .trace-meta{
  margin-top:7px;
}
#traceabilityView .trace-disposition-card{
  width:100%;
}
#traceabilityView .trace-disposition-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
#traceabilityView .trace-disposition-card p{
  margin:5px 0 7px;
}
#traceabilityView .trace-chain-origin{
  padding:10px 14px;
}
#traceabilityView .trace-step{
  padding:3px 0 12px;
}
#traceabilityView .trace-step>div:last-child{
  display:grid;
  grid-template-columns:minmax(220px,1.25fr) minmax(130px,.7fr) minmax(240px,1.2fr);
  align-items:center;
  gap:14px;
}
#traceabilityView .trace-step-title,
#traceabilityView .trace-step-product,
#traceabilityView .trace-step small{
  margin:0;
}
@media(max-width:900px){
  #traceabilityView .trace-card-grid{grid-template-columns:1fr}
  #traceabilityView .trace-meta{flex-wrap:wrap}
  #traceabilityView .trace-meta span{flex:1 1 45%;white-space:normal}
  #traceabilityView .trace-step>div:last-child{display:block}
}
@media print{
  #traceabilityView .trace-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #traceabilityView .trace-meta{display:flex;flex-wrap:nowrap;gap:10px}
  #traceabilityView .trace-meta span{white-space:nowrap}
}

/* Traceability v1.8 — exactly ONE full-width card per row everywhere */
#traceabilityView .trace-card-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  gap:8px;
}
#traceabilityView .trace-item-card{
  width:100%;
  box-sizing:border-box;
}
@media(min-width:1200px){
  #traceabilityView .trace-card-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }
}
@media print{
  #traceabilityView .trace-card-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }
}

/* Traceability v1.9 — polished color-coded one-line card system */
#traceabilityView{
  --tr-blue:#eaf5ff;
  --tr-blue-border:#b8d9f3;
  --tr-green:#eaf8f0;
  --tr-green-border:#b9dfca;
  --tr-purple:#f1efff;
  --tr-purple-border:#cec7f4;
  --tr-amber:#fff5e6;
  --tr-amber-border:#efd1a0;
  --tr-red:#fff0f1;
  --tr-red-border:#efb9bd;
  --tr-ink:#172033;
  --tr-muted:#5d6878;
}
#traceabilityView #traceResults>.panel{
  border-radius:9px;
  overflow:hidden;
  padding:0 10px 10px;
}
#traceabilityView #traceResults>.panel>h2{
  margin:0 -10px 8px;
  padding:10px 14px;
  border:0;
  font-size:22px;
  line-height:1.1;
}
#traceabilityView #traceResults>.panel:nth-of-type(2){border-color:var(--tr-green-border);background:#f9fdfb}
#traceabilityView #traceResults>.panel:nth-of-type(2)>h2{background:var(--tr-green);color:#14543d}
#traceabilityView #traceResults>.panel:nth-of-type(3){border-color:var(--tr-blue-border);background:#fbfdff}
#traceabilityView #traceResults>.panel:nth-of-type(3)>h2{background:var(--tr-blue);color:#174d78}
#traceabilityView #traceResults>.panel:nth-of-type(4){border-color:var(--tr-purple-border);background:#fcfbff}
#traceabilityView #traceResults>.panel:nth-of-type(4)>h2{background:var(--tr-purple);color:#37327a}
#traceabilityView #traceResults>.panel:nth-of-type(5){border-color:var(--tr-amber-border);background:#fffdfa}
#traceabilityView #traceResults>.panel:nth-of-type(5)>h2{background:var(--tr-amber);color:#6d3c13}

#traceabilityView .trace-section-label{
  margin:8px -2px 5px;
  padding:5px 8px;
  border-radius:5px;
  font-size:14px;
  line-height:1;
}
#traceabilityView #traceCurrentInventory .trace-section-label{background:#dff3e8;color:#146044}
#traceabilityView #traceBottleDispositions .trace-section-label{background:#dcefff;color:#18577f}
#traceabilityView #traceBottleDispositions .trace-section-label:last-of-type{background:#ffe2e4;color:#8a2029}

#traceabilityView .trace-card-grid{display:flex!important;flex-direction:column;gap:5px}
#traceabilityView .trace-item-card,
#traceabilityView .trace-disposition-card{
  display:flex;
  align-items:center;
  min-height:48px;
  width:100%;
  padding:7px 10px;
  border-radius:7px;
  box-sizing:border-box;
  background:#fff;
  box-shadow:0 1px 2px rgba(20,35,50,.05);
}
#traceabilityView .trace-item-card .trace-card-title{
  flex:0 0 330px;
  min-width:0;
  align-items:center;
}
#traceabilityView .trace-item-card .trace-card-title strong{font-size:17px;line-height:1.1}
#traceabilityView .trace-card-product{
  flex:0 0 145px;
  margin:0;
  padding:0 12px;
  border-left:1px solid #d7dce2;
  font-size:16px;
  line-height:1.1;
}
#traceabilityView .trace-item-card .trace-meta{
  flex:1 1 auto;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:0;
  min-width:0;
}
#traceabilityView .trace-item-card .trace-meta span{
  flex:1 1 0;
  padding:0 12px;
  border-left:1px solid #d7dce2;
  white-space:nowrap;
  font-size:16px;
  line-height:1.15;
}
#traceabilityView .trace-item-card .trace-meta b{
  display:block;
  margin:0 0 2px;
  color:var(--tr-muted);
  font-size:11px;
  line-height:1;
  text-transform:uppercase;
}
#traceabilityView .trace-badge{
  font-size:13px;
  padding:4px 10px;
  border:0;
  font-weight:800;
}
#traceabilityView .trace-account-fermentation{background:#d8efff;color:#174d78}
#traceabilityView .trace-account-processing{background:#ffe8b8;color:#6b4700}
#traceabilityView .trace-account-production{background:#e2ddff;color:#3d347d}
#traceabilityView .trace-account-storage{background:#ccefdc;color:#155b3e}
#traceabilityView .trace-account-other{background:#eceff2;color:#3e4752}
#traceabilityView .trace-badge-bonded{background:#d4f1df;color:#155c3c}
#traceabilityView .trace-badge-loss{background:#ffd7da;color:#92242c}
#traceabilityView .trace-badge-gain{background:#cef0dd;color:#17603f}
#traceabilityView .trace-badge-removal{background:#d5ebff;color:#165e92}
#traceabilityView .trace-badge-movement{background:#e8e8ef;color:#4c4c61}

/* Full-width dispositions: header zone + info zone, all one line */
#traceabilityView .trace-disposition-list{gap:5px}
#traceabilityView .trace-disposition-card{
  display:grid;
  grid-template-columns:minmax(330px,.95fr) minmax(0,2.35fr);
  gap:0;
  min-height:50px;
}
#traceabilityView .trace-disposition-head{
  height:100%;
  display:flex;
  align-items:center;
  padding-right:14px;
  border-right:1px solid #d7dce2;
}
#traceabilityView .trace-disposition-head strong{font-size:17px}
#traceabilityView .trace-disposition-head span:not(.trace-badge){font-size:14px;margin-top:1px}
#traceabilityView .trace-disposition-card>p{
  display:none;
}
#traceabilityView .trace-disposition-card .trace-meta{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:0;
  margin:0;
  min-width:0;
}
#traceabilityView .trace-disposition-card .trace-meta span{
  flex:1 1 0;
  min-width:0;
  padding:0 11px;
  border-left:1px solid #e0e3e7;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:15px;
}
#traceabilityView .trace-disposition-card .trace-meta span:first-child{border-left:0}
#traceabilityView .trace-disposition-card .trace-meta b{
  display:block;
  margin:0 0 2px;
  font-size:10px;
  line-height:1;
  color:var(--tr-muted);
  text-transform:uppercase;
}
#traceabilityView .trace-kind-loss{border-left:5px solid #dc5962}
#traceabilityView .trace-kind-gain{border-left:5px solid #4aa77b}
#traceabilityView .trace-kind-removal,.trace-taxpaid-card{border-left:5px solid #4f94c8}
#traceabilityView .trace-kind-movement{border-left:5px solid #8a8fa0}

/* Chain: one compact line per descendant */
#traceabilityView .trace-chain-origin{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 7px;
  padding:8px 12px;
  background:#eeecff;
  border-color:#bdb5ed;
}
#traceabilityView .trace-chain-origin>span,
#traceabilityView .trace-chain-origin>strong,
#traceabilityView .trace-chain-origin>small{display:inline;margin:0}
#traceabilityView .trace-chain-origin>strong{font-size:17px}
#traceabilityView .trace-chain-origin small{font-size:14px}
#traceabilityView .trace-timeline{margin-left:15px;padding-left:20px}
#traceabilityView .trace-step{padding:2px 0 6px;min-height:35px}
#traceabilityView .trace-step-dot{left:-34px;top:4px;width:25px;height:25px;font-size:12px}
#traceabilityView .trace-step>div:last-child{
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(130px,.55fr) minmax(260px,1.2fr);
  align-items:center;
  gap:12px;
  min-height:34px;
  padding:3px 10px;
  background:#fff;
  border:1px solid #dddaf1;
  border-radius:6px;
}
#traceabilityView .trace-step-title strong{font-size:16px}
#traceabilityView .trace-step-product{font-size:15px}
#traceabilityView .trace-step small{font-size:13px}

/* Recall summary gets a true header/info treatment too */
#traceabilityView .trace-recall-callout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  align-items:center;
  gap:14px;
  padding:9px 12px;
  background:var(--tr-red);
  border-left-color:#cf4d58;
}
#traceabilityView .trace-recall-callout>strong{font-size:18px;color:#8b1f29}
#traceabilityView .trace-recall-callout p{margin:0;font-size:16px}
#traceabilityView .trace-contact{grid-column:2;margin-top:3px;font-size:15px;padding:6px 9px}

@media(max-width:1150px){
  #traceabilityView .trace-item-card{display:block}
  #traceabilityView .trace-item-card .trace-card-title{margin-bottom:5px}
  #traceabilityView .trace-card-product{border-left:0;padding:0;margin-bottom:7px}
  #traceabilityView .trace-disposition-card{grid-template-columns:1fr}
  #traceabilityView .trace-disposition-head{border-right:0;border-bottom:1px solid #ddd;padding:0 0 6px;margin-bottom:6px}
}
@media print{
  #traceabilityView .trace-item-card,
  #traceabilityView .trace-disposition-card{box-shadow:none}
  #traceabilityView .trace-item-card .trace-card-title{flex-basis:250px}
  #traceabilityView .trace-card-product{flex-basis:110px}
}

/* ==========================================================================
   DOUNDRINS NATIVE UI v2.0
   Global visual system based on approved Traceability v1.9.
   Presentation only: no workflow, validation, calculations, or save logic.
   ========================================================================== */
:root{
  --dd-ink:#172033;
  --dd-muted:#5d6878;
  --dd-line:#cfd6dc;
  --dd-surface:#ffffff;
  --dd-surface-soft:#f7f9fa;
  --dd-blue:#eaf5ff;
  --dd-blue-border:#b8d9f3;
  --dd-blue-ink:#174d78;
  --dd-green:#eaf8f0;
  --dd-green-border:#b9dfca;
  --dd-green-ink:#14543d;
  --dd-purple:#f1efff;
  --dd-purple-border:#cec7f4;
  --dd-purple-ink:#37327a;
  --dd-amber:#fff5e6;
  --dd-amber-border:#efd1a0;
  --dd-amber-ink:#6d3c13;
  --dd-red:#fff0f1;
  --dd-red-border:#efb9bd;
  --dd-red-ink:#8a2029;
  --dd-radius:8px;
}

/* Core typography and page headings */
.main-content{color:var(--dd-ink)}
.page-heading h1,.page-header h1,.page-title h1,.module-header h1{font-size:30px;line-height:1.1;letter-spacing:-.02em;color:var(--dd-ink)}
.page-heading p,.page-header p,.module-header p,.help-text,.field-help,.muted{color:var(--dd-muted)}
.section-heading{font-size:20px;color:var(--dd-ink)}
label{color:var(--dd-ink);font-weight:700}

/* Unified panels: header zone + information zone */
.module-view>.panel,
.module-view>.table-panel,
.module-view>.filter-panel,
.module-view>.summary-card,
.module-view>.table-card,
.module-view>.nested-panel,
.module-view>.compact-action-panel,
.module-view>.saved-record-panel,
.module-view>.batch-form-panel,
.module-view>.recipe-form-panel,
.module-view>.recipes-browser-panel,
.module-view>.dist-form-panel,
.module-view>.bottling-panel,
.module-view>.tax-paid-panel,
.module-view>.tib-panel,
.module-view>.inventory-form-panel{
  border:1px solid var(--dd-line);
  border-radius:var(--dd-radius);
  background:var(--dd-surface);
  box-shadow:0 1px 2px rgba(20,35,50,.045);
}

/* Any direct section title becomes a compact colored header strip */
.module-view>.panel>h2:first-child,
.module-view>.table-panel>h2:first-child,
.module-view>.filter-panel>h2:first-child,
.module-view>.summary-card>h2:first-child,
.module-view>.table-card>h2:first-child,
.module-view>.nested-panel>h2:first-child,
.module-view>.compact-action-panel>h2:first-child,
.module-view>.saved-record-panel>h2:first-child,
.module-view>.batch-form-panel>h2:first-child,
.module-view>.recipe-form-panel>h2:first-child,
.module-view>.recipes-browser-panel>h2:first-child,
.module-view>.dist-form-panel>h2:first-child,
.module-view>.bottling-panel>h2:first-child,
.module-view>.tax-paid-panel>h2:first-child,
.module-view>.tib-panel>h2:first-child,
.module-view>.inventory-form-panel>h2:first-child{
  margin:-1px -1px 12px;
  padding:9px 13px;
  border:0;
  border-radius:var(--dd-radius) var(--dd-radius) 0 0;
  background:var(--dd-blue);
  color:var(--dd-blue-ink);
  font-size:19px;
  line-height:1.15;
}

/* Module identity colors */
#tanksView>.panel>h2:first-child,#tankDetailView>.panel>h2:first-child,
#inventoryView>.panel>h2:first-child{background:var(--dd-green);color:var(--dd-green-ink)}
#batchingView>.panel>h2:first-child,#recipesView>.panel>h2:first-child{background:var(--dd-amber);color:var(--dd-amber-ink)}
#distillationView>.panel>h2:first-child{background:var(--dd-purple);color:var(--dd-purple-ink)}
#tibView>.panel>h2:first-child,#bottlingView>.panel>h2:first-child,#taxPaidView>.panel>h2:first-child{background:var(--dd-blue);color:var(--dd-blue-ink)}
#reportsView>.panel>h2:first-child{background:var(--dd-purple);color:var(--dd-purple-ink)}
#adminView>.panel>h2:first-child{background:var(--dd-green);color:var(--dd-green-ink)}

/* Inputs/search/selects: same readable native control language everywhere */
.module-view input:not([type="checkbox"]):not([type="radio"]),
.module-view select,
.module-view textarea,
.search-select-trigger,
.search-select-search,
.select-search,
.search-field{
  border:1px solid #b8c0c7;
  border-radius:6px;
  background:#fff;
  color:var(--dd-ink);
  font:inherit;
}
.module-view input::placeholder,.module-view textarea::placeholder,.search-select-search::placeholder{color:#78818b;opacity:1}
.module-view input:focus,.module-view select:focus,.module-view textarea:focus,
.search-select-trigger:focus,.search-select-search:focus{
  outline:2px solid rgba(74,135,180,.18);
  outline-offset:1px;
  border-color:#7ea9c8;
}
.search-select-panel,.search-select-options{
  background:#fff;
  color:var(--dd-ink);
  border-color:#b8c0c7;
}
.search-select-options button,.search-select-options [role="option"]{color:var(--dd-ink);background:#fff}
.search-select-options button:hover,.search-select-options [role="option"]:hover{background:#eef5fa}

/* Buttons */
.primary-button,.secondary-button,.danger-button,.linkbtn,.text-button,.menu-button{
  border-radius:6px;
  font-weight:700;
}
.secondary-button{background:#fff;border-color:#aeb8c0;color:var(--dd-ink)}
.secondary-button:hover{background:#f3f6f8}
.danger-button{background:#a8333d;border-color:#a8333d;color:#fff}

/* Status chips/badges */
.status-badge,.pending,.info{
  border-radius:999px;
  padding:3px 8px;
  font-weight:800;
}
.status-badge{background:var(--dd-green);color:var(--dd-green-ink);border:1px solid var(--dd-green-border)}
.pending{background:var(--dd-amber);color:var(--dd-amber-ink);border:1px solid var(--dd-amber-border)}
.info{background:var(--dd-blue);color:var(--dd-blue-ink);border:1px solid var(--dd-blue-border)}

/* Summary cards: compact, large readable value, no wasted vertical space */
.summary-grid{
  gap:8px;
}
.summary-card{
  padding:9px 12px!important;
  min-height:0!important;
}
.summary-card strong,.summary-card .value{
  color:var(--dd-ink);
  font-size:21px;
  line-height:1.05;
}
.summary-card span,.summary-card small{color:var(--dd-muted)}

/* Detail grids: horizontal information rows */
.detail-grid,.recipe-details-grid,.bottling-preview,.tax-paid-preview,.inventory-preview,.batch-preview-grid{
  gap:7px 14px;
}
.detail-grid>div,.recipe-details-grid>div,.batch-preview-grid>div{
  border-left:1px solid #dce1e5;
  padding-left:11px;
}
.detail-grid>div:first-child,.recipe-details-grid>div:first-child,.batch-preview-grid>div:first-child{border-left:0}
.detail-grid dt,.detail-grid label,.recipe-details-grid label,.batch-preview-grid label{
  color:var(--dd-muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.detail-grid dd,.recipe-details-grid .value,.batch-preview-grid .value{
  color:var(--dd-ink);
  font-size:16px;
  font-weight:600;
}

/* Tables: header area + information rows, clearer hierarchy */
.data-table,.responsive-table table,.table-wrapper table,.table-wrap table,.inventory-input-table{
  border-collapse:separate;
  border-spacing:0;
  width:100%;
}
.data-table thead th,.responsive-table thead th,.table-wrapper thead th,.table-wrap thead th,.inventory-input-table thead th{
  background:#edf3f6;
  color:#334150;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.025em;
  border-bottom:1px solid #c7d0d7;
}
.data-table tbody td,.responsive-table tbody td,.table-wrapper tbody td,.table-wrap tbody td,.inventory-input-table tbody td{
  color:var(--dd-ink);
  font-size:15px;
  border-bottom:1px solid #e1e5e8;
}
.data-table tbody tr:hover td,.responsive-table tbody tr:hover td,.table-wrapper tbody tr:hover td,.table-wrap tbody tr:hover td{background:#f7fafb}

/* Repeating operational rows/cards: full width, compact one-row feel */
.batch-ingredients,.dist-source-list,.dist-output-list,.tax-paid-lines,.recipe-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.batch-ingredients>.card,.dist-source-list>.card,.dist-output-list>.card,
.tax-paid-lines>.card,.recipe-list>.card,
.source-summary{
  width:100%;
  box-sizing:border-box;
  border:1px solid #d1d7dc;
  border-radius:7px;
  background:#fff;
  padding:8px 11px;
  box-shadow:0 1px 2px rgba(20,35,50,.035);
}

/* Color accents by operational meaning */
.batch-ingredients>.card,.batch-form-panel{border-left-color:#d5a34e}
.dist-source-list>.card,.dist-output-list>.card,.dist-form-panel{border-left-color:#8a7ed0}
.bottling-panel,.tax-paid-panel,.tib-panel{border-left-color:#6ea7cf}
.inventory-form-panel,.saved-record-panel{border-left-color:#69aa87}

/* Messages/notices */
.message,.notice{
  border-radius:7px;
  padding:9px 12px;
  font-size:15px;
}
.message:not(.error),.notice.info{background:var(--dd-green);border-color:var(--dd-green-border);color:var(--dd-green-ink)}
.message.error,.notice.error{background:var(--dd-red);border-color:var(--dd-red-border);color:var(--dd-red-ink)}

/* Tabs use the same color language */
.tab-bar,.rr-section-tabs{gap:5px}
.tab-button,.rr-section-tab{
  border-radius:6px;
  font-weight:700;
}
.tab-button.active,.rr-section-tab.active{
  background:var(--dd-blue);
  border-color:var(--dd-blue-border);
  color:var(--dd-blue-ink);
}

/* Admin subsections */
.admin-subsection{
  border:1px solid var(--dd-green-border);
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}
.admin-subsection>h2,.admin-subsection>h3{
  margin:0;
  padding:9px 12px;
  background:var(--dd-green);
  color:var(--dd-green-ink);
}

/* Reports retain their document/report styling, while controls/pickers use the app system */
#reportsView .rr-daily-controls,#reportsView .saved-record-controls{
  border:1px solid var(--dd-purple-border);
  border-radius:8px;
  background:#fbfaff;
}
#reportsView .rr-daily-heading,#reportsView .rr-monthly-section-title{
  color:var(--dd-purple-ink);
}

/* Keep density on desktop; wrap only when necessary */
@media(min-width:1100px){
  .form-grid,.check-grid{column-gap:14px;row-gap:9px}
  .form-row{margin-bottom:8px}
  .module-view>.panel,.module-view>.table-panel,.module-view>.filter-panel{margin-bottom:11px}
}
@media(max-width:900px){
  .detail-grid>div,.recipe-details-grid>div,.batch-preview-grid>div{border-left:0;padding-left:0}
}

/* ==========================================================================
   DOUNDRINS ACCOUNT COLOR SYSTEM v2.1
   The approved Traceability account colors now follow the material everywhere.
   Fermentation = blue | Processing = amber | Production = purple | Storage = green
   ========================================================================== */
:root{
  --acct-fermentation-bg:#eaf5ff;
  --acct-fermentation-border:#b8d9f3;
  --acct-fermentation-ink:#174d78;
  --acct-processing-bg:#fff5e6;
  --acct-processing-border:#efd1a0;
  --acct-processing-ink:#6d3c13;
  --acct-production-bg:#f1efff;
  --acct-production-border:#cec7f4;
  --acct-production-ink:#37327a;
  --acct-storage-bg:#eaf8f0;
  --acct-storage-border:#b9dfca;
  --acct-storage-ink:#14543d;
}

/* Exact account fields / chips */
.acct-field.acct-fermentation{background:var(--acct-fermentation-bg)!important;color:var(--acct-fermentation-ink)!important;border-color:var(--acct-fermentation-border)!important}
.acct-field.acct-processing{background:var(--acct-processing-bg)!important;color:var(--acct-processing-ink)!important;border-color:var(--acct-processing-border)!important}
.acct-field.acct-production{background:var(--acct-production-bg)!important;color:var(--acct-production-ink)!important;border-color:var(--acct-production-border)!important}
.acct-field.acct-storage{background:var(--acct-storage-bg)!important;color:var(--acct-storage-ink)!important;border-color:var(--acct-storage-border)!important}

/* Main tank + inventory rows: account color follows each tank */
#tankTableBody tr.acct-fermentation,#inventoryView tbody tr.acct-fermentation{background:var(--acct-fermentation-bg)!important;box-shadow:inset 5px 0 0 var(--acct-fermentation-border)}
#tankTableBody tr.acct-processing,#inventoryView tbody tr.acct-processing{background:var(--acct-processing-bg)!important;box-shadow:inset 5px 0 0 var(--acct-processing-border)}
#tankTableBody tr.acct-production,#inventoryView tbody tr.acct-production{background:var(--acct-production-bg)!important;box-shadow:inset 5px 0 0 var(--acct-production-border)}
#tankTableBody tr.acct-storage,#inventoryView tbody tr.acct-storage{background:var(--acct-storage-bg)!important;box-shadow:inset 5px 0 0 var(--acct-storage-border)}
#tankTableBody tr.acct-colorized:hover td,#inventoryView tbody tr.acct-colorized:hover td{background:rgba(255,255,255,.38)!important}

/* Tank detail inherits the tank's account color */
#tankDetailView.acct-fermentation .detail-card{border-color:var(--acct-fermentation-border);background:var(--acct-fermentation-bg)}
#tankDetailView.acct-processing .detail-card{border-color:var(--acct-processing-border);background:var(--acct-processing-bg)}
#tankDetailView.acct-production .detail-card{border-color:var(--acct-production-border);background:var(--acct-production-bg)}
#tankDetailView.acct-storage .detail-card{border-color:var(--acct-storage-border);background:var(--acct-storage-bg)}

/* Every tank searchable selector: options and selected/closed field use the tank's account */
.tank-combo-option.acct-colorized{
  margin:2px 0!important;
  border-left:5px solid transparent!important;
  border-radius:6px!important;
  color:var(--dd-ink,#172033)!important;
}
.tank-combo-option.acct-fermentation{background:var(--acct-fermentation-bg)!important;border-left-color:var(--acct-fermentation-border)!important}
.tank-combo-option.acct-processing{background:var(--acct-processing-bg)!important;border-left-color:var(--acct-processing-border)!important}
.tank-combo-option.acct-production{background:var(--acct-production-bg)!important;border-left-color:var(--acct-production-border)!important}
.tank-combo-option.acct-storage{background:var(--acct-storage-bg)!important;border-left-color:var(--acct-storage-border)!important}
.tank-combo-option.acct-colorized:hover,.tank-combo-option.acct-colorized:focus{filter:brightness(.97)}
.tank-combo-option.acct-colorized.selected{font-weight:800!important;box-shadow:inset 0 0 0 1px currentColor}

.tank-combo-trigger.acct-fermentation{background:var(--acct-fermentation-bg)!important;border-color:var(--acct-fermentation-border)!important;color:var(--acct-fermentation-ink)!important}
.tank-combo-trigger.acct-processing{background:var(--acct-processing-bg)!important;border-color:var(--acct-processing-border)!important;color:var(--acct-processing-ink)!important}
.tank-combo-trigger.acct-production{background:var(--acct-production-bg)!important;border-color:var(--acct-production-border)!important;color:var(--acct-production-ink)!important}
.tank-combo-trigger.acct-storage{background:var(--acct-storage-bg)!important;border-color:var(--acct-storage-border)!important;color:var(--acct-storage-ink)!important}

/* Monthly Reports drill-down/detail rows and operational cards */
#reportsView tr.acct-colorized,
#reportsView .rr-daily-record.acct-colorized,
#reportsView .rr-detail-summary.acct-colorized,
.source-summary.acct-colorized,.dist-source-row.acct-colorized,.dist-output-row.acct-colorized,
.batch-ingredient-row.acct-colorized,.tax-paid-line.acct-colorized,.tib-item-row.acct-colorized{
  border-left:5px solid transparent!important;
}
#reportsView .acct-fermentation,.source-summary.acct-fermentation,.dist-source-row.acct-fermentation,.dist-output-row.acct-fermentation,.batch-ingredient-row.acct-fermentation,.tax-paid-line.acct-fermentation,.tib-item-row.acct-fermentation{background:var(--acct-fermentation-bg)!important;border-left-color:var(--acct-fermentation-border)!important}
#reportsView .acct-processing,.source-summary.acct-processing,.dist-source-row.acct-processing,.dist-output-row.acct-processing,.batch-ingredient-row.acct-processing,.tax-paid-line.acct-processing,.tib-item-row.acct-processing{background:var(--acct-processing-bg)!important;border-left-color:var(--acct-processing-border)!important}
#reportsView .acct-production,.source-summary.acct-production,.dist-source-row.acct-production,.dist-output-row.acct-production,.batch-ingredient-row.acct-production,.tax-paid-line.acct-production,.tib-item-row.acct-production{background:var(--acct-production-bg)!important;border-left-color:var(--acct-production-border)!important}
#reportsView .acct-storage,.source-summary.acct-storage,.dist-source-row.acct-storage,.dist-output-row.acct-storage,.batch-ingredient-row.acct-storage,.tax-paid-line.acct-storage,.tib-item-row.acct-storage{background:var(--acct-storage-bg)!important;border-left-color:var(--acct-storage-border)!important}

/* A transaction that visibly contains more than one account shows the flow instead of pretending
   it belongs to only one account. */
#reportsView tr.acct-multi,
#reportsView .rr-daily-record.acct-multi{
  background:linear-gradient(90deg,
    rgba(234,245,255,.78) 0 24%,
    rgba(255,245,230,.78) 24% 49%,
    rgba(241,239,255,.78) 49% 74%,
    rgba(234,248,240,.78) 74% 100%)!important;
  border-left-color:#9ca7b0!important;
}

/* Keep report printing legible but preserve the visual account cue. */
@media print{
  .acct-colorized{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .tank-combo-panel{display:none!important}
}

/* ==========================================================================
   ACCOUNT COLOR SYSTEM v2.2
   Account color is a CHIP, not a whole row/cell/card.
   ========================================================================== */

/* Critical module visibility: Traceability must never bleed into other pages. */
.module-view.hidden,
#traceabilityView.hidden{
  display:none !important;
}

/* Undo v2.1 whole-row/card backgrounds. */
#tankTableBody tr.acct-colorized,
#inventoryView tbody tr.acct-colorized,
#reportsView tr.acct-colorized,
#reportsView .rr-daily-record.acct-colorized,
#reportsView .rr-detail-summary.acct-colorized,
.source-summary.acct-colorized,
.dist-source-row.acct-colorized,
.dist-output-row.acct-colorized,
.batch-ingredient-row.acct-colorized,
.tax-paid-line.acct-colorized,
.tib-item-row.acct-colorized,
.acct-field.acct-colorized{
  background:transparent !important;
  box-shadow:none !important;
  border-left-color:inherit !important;
  color:inherit !important;
}

/* One canonical account badge everywhere. */
.acct-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:2px 9px;
  margin:0 2px;
  border:1px solid transparent;
  border-radius:999px;
  font-size:14px;
  line-height:1;
  font-weight:800;
  vertical-align:middle;
  white-space:nowrap;
}
.acct-chip.acct-fermentation{background:var(--acct-fermentation-bg);border-color:var(--acct-fermentation-border);color:var(--acct-fermentation-ink)}
.acct-chip.acct-processing{background:var(--acct-processing-bg);border-color:var(--acct-processing-border);color:var(--acct-processing-ink)}
.acct-chip.acct-production{background:var(--acct-production-bg);border-color:var(--acct-production-border);color:var(--acct-production-ink)}
.acct-chip.acct-storage{background:var(--acct-storage-bg);border-color:var(--acct-storage-border);color:var(--acct-storage-ink)}

/* Tank search results themselves get a subtle account cue.
   This applies ONLY to .tank-combo-option, never product-combo options. */
.tank-combo-option.tank-acct-fermentation{background:var(--acct-fermentation-bg)!important;border-left:5px solid var(--acct-fermentation-border)!important}
.tank-combo-option.tank-acct-processing{background:var(--acct-processing-bg)!important;border-left:5px solid var(--acct-processing-border)!important}
.tank-combo-option.tank-acct-production{background:var(--acct-production-bg)!important;border-left:5px solid var(--acct-production-border)!important}
.tank-combo-option.tank-acct-storage{background:var(--acct-storage-bg)!important;border-left:5px solid var(--acct-storage-border)!important}
.tank-combo-trigger.tank-acct-fermentation{background:var(--acct-fermentation-bg)!important;border-color:var(--acct-fermentation-border)!important}
.tank-combo-trigger.tank-acct-processing{background:var(--acct-processing-bg)!important;border-color:var(--acct-processing-border)!important}
.tank-combo-trigger.tank-acct-production{background:var(--acct-production-bg)!important;border-color:var(--acct-production-border)!important}
.tank-combo-trigger.tank-acct-storage{background:var(--acct-storage-bg)!important;border-color:var(--acct-storage-border)!important}

/* Report pop-outs/details: account chips stay compact and readable. */
#reportsView .acct-chip{font-size:13px;min-height:22px;padding:2px 8px}

/* Tanks + Inventory account mentions use the exact same chip. */
#tanksView .acct-chip,#tankDetailView .acct-chip,#inventoryView .acct-chip{font-size:14px}

/* Print the chip colors too. */
@media print{
 .acct-chip{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* ==========================================================================
   ACCOUNT COLOR SYSTEM v2.3
   Precise semantic account coloring:
   - selector option = entire line
   - selected tank card = whole polished card
   - account field = chip only
   - never color arbitrary account words in names/report prose
   ========================================================================== */

/* Remove any v2.2 generic account-chip effects outside semantic fields. */
.acct-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:2px 10px;
  margin:0;
  border:1px solid transparent;
  border-radius:999px;
  font-size:14px;
  line-height:1;
  font-weight:800;
  vertical-align:middle;
  white-space:nowrap;
}
.acct-chip.acct-fermentation{background:#d8efff;border-color:#a8d3ef;color:#174d78}
.acct-chip.acct-processing{background:#ffe8b8;border-color:#e9c678;color:#6b4700}
.acct-chip.acct-production{background:#e2ddff;border-color:#bdb3ef;color:#3d347d}
.acct-chip.acct-storage{background:#ccefdc;border-color:#9fd5b8;color:#155b3e}

/* TANK SELECTOR OPTIONS — entire result line gets the account family. */
.tank-combo-option.tank-acct-row{
  margin:3px 4px!important;
  padding:9px 11px!important;
  border:1px solid transparent!important;
  border-left-width:6px!important;
  border-radius:7px!important;
  box-shadow:0 1px 2px rgba(25,35,45,.04);
  color:#172033!important;
}
.tank-combo-option.tank-acct-fermentation{background:#eef8ff!important;border-color:#b8d9f3!important;border-left-color:#5da6d8!important}
.tank-combo-option.tank-acct-processing{background:#fff8ec!important;border-color:#efd1a0!important;border-left-color:#d39a37!important}
.tank-combo-option.tank-acct-production{background:#f5f3ff!important;border-color:#cec7f4!important;border-left-color:#897bd2!important}
.tank-combo-option.tank-acct-storage{background:#effaf4!important;border-color:#b9dfca!important;border-left-color:#5eaa7f!important}
.tank-combo-option.tank-acct-row:hover,
.tank-combo-option.tank-acct-row:focus{filter:brightness(.975);box-shadow:0 2px 5px rgba(25,35,45,.08)}
.tank-combo-option.tank-acct-row.selected{font-weight:800;box-shadow:inset 0 0 0 1px currentColor,0 2px 5px rgba(25,35,45,.08)}

/* CLOSED SELECTED TANK CONTROL — soft tint, stronger left account stripe. */
.tank-combo-trigger.tank-acct-selected{
  border-left-width:6px!important;
  font-weight:700;
  box-shadow:0 1px 2px rgba(25,35,45,.04);
}
.tank-combo-trigger.tank-acct-fermentation{background:#f3faff!important;border-color:#a9d1eb!important;color:#174d78!important}
.tank-combo-trigger.tank-acct-processing{background:#fffaf1!important;border-color:#e8c98e!important;color:#6b4700!important}
.tank-combo-trigger.tank-acct-production{background:#f7f5ff!important;border-color:#c5bced!important;color:#3d347d!important}
.tank-combo-trigger.tank-acct-storage{background:#f2fbf6!important;border-color:#add9c0!important;color:#155b3e!important}

/* SELECTED TANK CARDS — whole card, layered shades from the same family. */
.tank-card-colored{
  position:relative;
  overflow:hidden;
  border-width:1px!important;
  border-left-width:7px!important;
  border-radius:9px!important;
  box-shadow:0 2px 7px rgba(25,35,45,.07)!important;
}
.tank-card-colored::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:8px;
  opacity:.8;
  pointer-events:none;
}
.tank-card-fermentation{background:linear-gradient(100deg,#eef8ff 0%,#fbfdff 72%)!important;border-color:#b8d9f3!important;border-left-color:#4c9ed3!important}
.tank-card-fermentation::before{background:#d5edfc}
.tank-card-processing{background:linear-gradient(100deg,#fff7e8 0%,#fffdf9 72%)!important;border-color:#efd1a0!important;border-left-color:#ce9130!important}
.tank-card-processing::before{background:#ffe7b7}
.tank-card-production{background:linear-gradient(100deg,#f3f0ff 0%,#fdfcff 72%)!important;border-color:#cec7f4!important;border-left-color:#7e70cb!important}
.tank-card-production::before{background:#dfd9ff}
.tank-card-storage{background:linear-gradient(100deg,#edf9f2 0%,#fbfefc 72%)!important;border-color:#b9dfca!important;border-left-color:#4e9e72!important}
.tank-card-storage::before{background:#cfeeda}

/* Within selected tank cards, keep subfields readable and use a lighter companion shade. */
.tank-card-colored .detail-grid>div,
.tank-card-colored .source-detail,
.tank-card-colored .tank-detail-field{
  background:rgba(255,255,255,.48);
}

/* Do NOT color whole report rows/cells or ordinary prose. */
#reportsView tr.acct-colorized,
#reportsView td.acct-colorized,
#reportsView .rr-daily-record.acct-colorized,
#reportsView .rr-detail-summary.acct-colorized{
  background:transparent!important;
  border-left-color:inherit!important;
  box-shadow:none!important;
}

/* Traceability visibility safeguard remains authoritative. */
.module-view.hidden,#traceabilityView.hidden{display:none!important}

@media print{
 .tank-card-colored,.acct-chip{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* ==========================================================================
   ACCOUNT COLOR / TANK SELECTOR CORRECTION v2.4
   ========================================================================== */

/* 1) Distillation: neutral source/output cards until a tank is actually selected. */
#distillationView .dist-source-row,
#distillationView .dist-output-row{
  background:#fff!important;
  border:1px solid #d5ddd8!important;
  border-left:1px solid #d5ddd8!important;
  box-shadow:0 1px 2px rgba(25,35,45,.035)!important;
}
#distillationView .dist-source-row.tank-card-colored,
#distillationView .dist-output-row.tank-card-colored{
  border-left-width:7px!important;
}
#distillationView .dist-source-row.tank-card-unselected,
#distillationView .dist-output-row.tank-card-unselected{
  background:#fff!important;
  border-color:#d5ddd8!important;
}

/* 2) ALL tank search boxes use the established Bottling geometry/behavior.
      Color styling is layered on top of this, never changes panel dimensions. */
.tank-combobox{position:relative!important;display:block!important;width:100%!important;min-width:0!important}
.tank-combo-trigger{
  position:relative!important;display:block!important;box-sizing:border-box!important;
  width:100%!important;height:42px!important;min-height:42px!important;margin:0!important;
  padding:8px 38px 8px 12px!important;border:1px solid #b9c3bd!important;border-radius:8px!important;
  background:#fff;color:#17211c;font:inherit!important;font-weight:400!important;text-align:left!important;
  cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  box-shadow:none!important;
}
.tank-combo-panel{
  position:absolute!important;display:block;z-index:1000!important;left:0!important;right:0!important;
  top:calc(100% + 5px)!important;width:auto!important;max-height:none!important;overflow:hidden!important;
  padding:0!important;border:1px solid #c8d1cc!important;border-radius:9px!important;background:#fff!important;
  box-shadow:0 12px 30px rgba(25,45,35,.18)!important;
}
.tank-combo-panel.hidden{display:none!important}
.tank-combo-toolbar{
  display:flex!important;align-items:center!important;gap:10px!important;padding:9px!important;
  border-bottom:1px solid #e5ebe7!important;background:#fff!important;
}
.tank-combo-toolbar .tank-search{
  flex:1 1 auto!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;
  height:36px!important;min-height:36px!important;margin:0!important;padding:7px 10px!important;
  border:1px solid #b9c3bd!important;border-radius:7px!important;background:#fff!important;color:#1d2923!important;
  font:inherit!important;font-size:13px!important;box-shadow:none!important;
}
.tank-combo-toolbar .batch-check{
  display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;width:auto!important;
  margin:0!important;padding:0!important;border:0!important;background:transparent!important;
  white-space:nowrap!important;font-size:12px!important;font-weight:500!important;color:#31463b!important;
}
.tank-combo-toolbar .batch-check input[type=checkbox]{
  appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;
  min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;box-shadow:none!important;
}
.tank-combo-options{
  display:block!important;max-height:245px!important;overflow-y:auto!important;overflow-x:hidden!important;
  padding:5px!important;background:#fff!important;overscroll-behavior:contain;
}
.tank-combo-option{
  display:block!important;box-sizing:border-box!important;width:100%!important;margin:3px 0!important;
  padding:9px 10px!important;border-radius:6px!important;color:#1d2923!important;font:inherit!important;
  font-size:13px!important;font-weight:400!important;line-height:1.35!important;text-align:left!important;
  cursor:pointer!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  outline:0!important;
}

/* Preserve full-row account color in selector results despite older !important rules. */
.tank-combo-option.tank-acct-fermentation{background:#eef8ff!important;border:1px solid #b8d9f3!important;border-left:6px solid #5da6d8!important}
.tank-combo-option.tank-acct-processing{background:#fff8ec!important;border:1px solid #efd1a0!important;border-left:6px solid #d39a37!important}
.tank-combo-option.tank-acct-production{background:#f5f3ff!important;border:1px solid #cec7f4!important;border-left:6px solid #897bd2!important}
.tank-combo-option.tank-acct-storage{background:#effaf4!important;border:1px solid #b9dfca!important;border-left:6px solid #5eaa7f!important}

/* 3) Tanks page behaves like Inventory: entire tank row gets a very light account family,
      while the Account cell itself remains the stronger pill. */
#tankTableBody tr.tank-list-fermentation>td{background:#f4fbff!important}
#tankTableBody tr.tank-list-processing>td{background:#fffbf3!important}
#tankTableBody tr.tank-list-production>td{background:#f9f7ff!important}
#tankTableBody tr.tank-list-storage>td{background:#f5fcf8!important}
#tankTableBody tr.tank-list-fermentation>td:first-child{box-shadow:inset 5px 0 0 #79b7df}
#tankTableBody tr.tank-list-processing>td:first-child{box-shadow:inset 5px 0 0 #dda84e}
#tankTableBody tr.tank-list-production>td:first-child{box-shadow:inset 5px 0 0 #9b8fdd}
#tankTableBody tr.tank-list-storage>td:first-child{box-shadow:inset 5px 0 0 #75b891}

/* 4) Selected tank cards: polished layered treatment, only after selection. */
.tank-card-colored{position:relative;overflow:hidden;border-radius:9px!important;box-shadow:0 2px 7px rgba(25,35,45,.07)!important}
.tank-card-fermentation{background:linear-gradient(100deg,#eef8ff 0%,#fbfdff 76%)!important;border-color:#b8d9f3!important;border-left-color:#4c9ed3!important}
.tank-card-processing{background:linear-gradient(100deg,#fff7e8 0%,#fffdf9 76%)!important;border-color:#efd1a0!important;border-left-color:#ce9130!important}
.tank-card-production{background:linear-gradient(100deg,#f3f0ff 0%,#fdfcff 76%)!important;border-color:#cec7f4!important;border-left-color:#7e70cb!important}
.tank-card-storage{background:linear-gradient(100deg,#edf9f2 0%,#fbfefc 76%)!important;border-color:#b9dfca!important;border-left-color:#4e9e72!important}

/* 5) Reports: restore all normal report wording. Only semantic Account cells/chips in drill-downs
      are colored by JS; report rows and prose are untouched. */
#reportsView .rr-detail-table tr,
#reportsView .rr-detail-table td,
#reportsView .rr-detail-modal tr,
#reportsView .rr-detail-modal td,
#reportsView [role="dialog"] tr,
#reportsView [role="dialog"] td{
  background-color:transparent;
}
#reportsView .acct-chip{background-clip:padding-box}

/* Keep Traceability isolated to its own module. */
.module-view.hidden,#traceabilityView.hidden{display:none!important}

@media(max-width:760px){
 .tank-combo-panel{right:auto!important;width:min(430px,calc(100vw - 44px))!important}
}

/* ==========================================================================
   TANK SELECTOR / INVENTORY PARITY v2.5
   ========================================================================== */

/* Selected distillation source: the dropdown remains an overlay.
   The selected account tint must NEVER change the selector/panel geometry. */
#distillationView .dist-source-row.tank-card-colored,
#distillationView .dist-output-row.tank-card-colored{
  overflow:visible!important;
}
#distillationView .dist-source-row.tank-card-colored::before,
#distillationView .dist-output-row.tank-card-colored::before{
  display:none!important;
}
#distillationView .tank-combobox{
  position:relative!important;
  z-index:auto!important;
}
#distillationView .tank-combobox:focus-within{
  z-index:1200!important;
}
#distillationView .tank-combo-panel{
  z-index:1250!important;
  min-width:100%!important;
  width:100%!important;
  box-sizing:border-box!important;
}
#distillationView .tank-card-colored .tank-combo-panel{
  background:#fff!important;
}
#distillationView .tank-card-colored .tank-combo-toolbar,
#distillationView .tank-card-colored .tank-combo-options{
  background:#fff!important;
}

/* Inventory tank rows now use the exact same visual language as Tanks. */
#invTankTableBody tr.inventory-tank-fermentation>td{background:#f4fbff!important}
#invTankTableBody tr.inventory-tank-processing>td{background:#fffbf3!important}
#invTankTableBody tr.inventory-tank-production>td{background:#f9f7ff!important}
#invTankTableBody tr.inventory-tank-storage>td{background:#f5fcf8!important}
#invTankTableBody tr.inventory-tank-fermentation>td:first-child{box-shadow:inset 5px 0 0 #79b7df}
#invTankTableBody tr.inventory-tank-processing>td:first-child{box-shadow:inset 5px 0 0 #dda84e}
#invTankTableBody tr.inventory-tank-production>td:first-child{box-shadow:inset 5px 0 0 #9b8fdd}
#invTankTableBody tr.inventory-tank-storage>td:first-child{box-shadow:inset 5px 0 0 #75b891}

/* Batching ingredient source-tank selector: same full-line colors as every other tank selector.
   Covers both the shared .tank-combo-option and legacy ingredient selector row names. */
#batchingView .tank-combo-option.tank-acct-fermentation,
#batchingView .batch-tank-option.tank-acct-fermentation{background:#eef8ff!important;border:1px solid #b8d9f3!important;border-left:6px solid #5da6d8!important}
#batchingView .tank-combo-option.tank-acct-processing,
#batchingView .batch-tank-option.tank-acct-processing{background:#fff8ec!important;border:1px solid #efd1a0!important;border-left:6px solid #d39a37!important}
#batchingView .tank-combo-option.tank-acct-production,
#batchingView .batch-tank-option.tank-acct-production{background:#f5f3ff!important;border:1px solid #cec7f4!important;border-left:6px solid #897bd2!important}
#batchingView .tank-combo-option.tank-acct-storage,
#batchingView .batch-tank-option.tank-acct-storage{background:#effaf4!important;border:1px solid #b9dfca!important;border-left:6px solid #5eaa7f!important}

/* DIRECT WORKFLOW FIX v2.6 */
#distillationView .dist-source-row,#distillationView .dist-output-row{overflow:visible!important;background:#fff!important;border:1px solid #d5ddd8!important;border-left-width:1px!important}
#distillationView .dist-source-row.tank-card-colored,#distillationView .dist-output-row.tank-card-colored{overflow:visible!important;border-left-width:7px!important}
#distillationView .dist-source-row.tank-card-fermentation,#distillationView .dist-output-row.tank-card-fermentation{background:linear-gradient(100deg,#eef8ff,#fbfdff 76%)!important;border-color:#b8d9f3!important;border-left-color:#4c9ed3!important}
#distillationView .dist-source-row.tank-card-processing,#distillationView .dist-output-row.tank-card-processing{background:linear-gradient(100deg,#fff7e8,#fffdf9 76%)!important;border-color:#efd1a0!important;border-left-color:#ce9130!important}
#distillationView .dist-source-row.tank-card-production,#distillationView .dist-output-row.tank-card-production{background:linear-gradient(100deg,#f3f0ff,#fdfcff 76%)!important;border-color:#cec7f4!important;border-left-color:#7e70cb!important}
#distillationView .dist-source-row.tank-card-storage,#distillationView .dist-output-row.tank-card-storage{background:linear-gradient(100deg,#edf9f2,#fbfefc 76%)!important;border-color:#b9dfca!important;border-left-color:#4e9e72!important}
#distillationView .tank-combo-panel{z-index:5000!important;background:#fff!important}
#distillationView .tank-combo-toolbar,#distillationView .tank-combo-options{background:#fff!important}

#batchingView .tank-combo-option.tank-acct-fermentation,#distillationView .tank-combo-option.tank-acct-fermentation{background:#eef8ff!important;border:1px solid #b8d9f3!important;border-left:6px solid #5da6d8!important}
#batchingView .tank-combo-option.tank-acct-processing,#distillationView .tank-combo-option.tank-acct-processing{background:#fff8ec!important;border:1px solid #efd1a0!important;border-left:6px solid #d39a37!important}
#batchingView .tank-combo-option.tank-acct-production,#distillationView .tank-combo-option.tank-acct-production{background:#f5f3ff!important;border:1px solid #cec7f4!important;border-left:6px solid #897bd2!important}
#batchingView .tank-combo-option.tank-acct-storage,#distillationView .tank-combo-option.tank-acct-storage{background:#effaf4!important;border:1px solid #b9dfca!important;border-left:6px solid #5eaa7f!important}

#batchingView .tank-combo-trigger.tank-acct-fermentation,#distillationView .tank-combo-trigger.tank-acct-fermentation{background:#f3faff!important;border-color:#a9d1eb!important;color:#174d78!important}
#batchingView .tank-combo-trigger.tank-acct-processing,#distillationView .tank-combo-trigger.tank-acct-processing{background:#fffaf1!important;border-color:#e8c98e!important;color:#6b4700!important}
#batchingView .tank-combo-trigger.tank-acct-production,#distillationView .tank-combo-trigger.tank-acct-production{background:#f7f5ff!important;border-color:#c5bced!important;color:#3d347d!important}
#batchingView .tank-combo-trigger.tank-acct-storage,#distillationView .tank-combo-trigger.tank-acct-storage{background:#f2fbf6!important;border-color:#add9c0!important;color:#155b3e!important}

#invTankBody tr.inventory-tank-fermentation>td{background:#f4fbff!important}
#invTankBody tr.inventory-tank-processing>td{background:#fffbf3!important}
#invTankBody tr.inventory-tank-production>td{background:#f9f7ff!important}
#invTankBody tr.inventory-tank-storage>td{background:#f5fcf8!important}
#invTankBody tr.inventory-tank-fermentation>td:first-child{box-shadow:inset 5px 0 0 #79b7df}
#invTankBody tr.inventory-tank-processing>td:first-child{box-shadow:inset 5px 0 0 #dda84e}
#invTankBody tr.inventory-tank-production>td:first-child{box-shadow:inset 5px 0 0 #9b8fdd}
#invTankBody tr.inventory-tank-storage>td:first-child{box-shadow:inset 5px 0 0 #75b891}

/* ==========================================================================
   SYSTEMIC MODULE ISOLATION + MONTHLY DETAIL ACCOUNT CHIPS v2.7
   ========================================================================== */

/* JS hard guard. This beats any module-specific display/grid/flex rule. */
.module-hard-hidden{display:none!important}

/* CSS second line of defense: only the actively selected module may render.
   The active module attribute is maintained from the actual black/active nav. */
body[data-active-module="tanks"] #inventoryView,
body[data-active-module="tanks"] #batchingView,
body[data-active-module="tanks"] #recipesView,
body[data-active-module="tanks"] #distillationView,
body[data-active-module="tanks"] #tibView,
body[data-active-module="tanks"] #bottlingView,
body[data-active-module="tanks"] #taxPaidView,
body[data-active-module="tanks"] #traceabilityView,
body[data-active-module="tanks"] #reportsView,
body[data-active-module="tanks"] #adminView{display:none!important}

body[data-active-module="inventory"] #tankListView,
body[data-active-module="inventory"] #tankDetailView,
body[data-active-module="inventory"] #tankTransferView,
body[data-active-module="inventory"] #tankGaugeView,
body[data-active-module="inventory"] #batchingView,
body[data-active-module="inventory"] #recipesView,
body[data-active-module="inventory"] #distillationView,
body[data-active-module="inventory"] #tibView,
body[data-active-module="inventory"] #bottlingView,
body[data-active-module="inventory"] #taxPaidView,
body[data-active-module="inventory"] #traceabilityView,
body[data-active-module="inventory"] #reportsView,
body[data-active-module="inventory"] #adminView{display:none!important}

/* For every non-tank module, hard-hide all sibling top-level modules. */
body[data-active-module="batching"] .main-content>section:not(#batchingView),
body[data-active-module="recipes"] .main-content>section:not(#recipesView),
body[data-active-module="distillation"] .main-content>section:not(#distillationView),
body[data-active-module="tib"] .main-content>section:not(#tibView),
body[data-active-module="bottling"] .main-content>section:not(#bottlingView),
body[data-active-module="taxPaid"] .main-content>section:not(#taxPaidView),
body[data-active-module="traceability"] .main-content>section:not(#traceabilityView),
body[data-active-module="reports"] .main-content>section:not(#reportsView),
body[data-active-module="admin"] .main-content>section:not(#adminView){display:none!important}

/* Report modals cannot appear/bleed while another module is selected. */
/* Report overlays are isolated by native-section-isolation.js using .section-isolated-hidden.
   Do not key visibility to the obsolete data-active-module attribute: current navigation
   uses data-active-nav, and this old rule made every report drill-down modal permanently invisible. */

/* Monthly report drill-down: color ONLY actual account descriptions. */
#rrDetailModal .acct-chip{
  display:inline-flex!important;
  align-items:center;
  min-height:23px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:13px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}
#rrDetailModal .acct-chip-fermentation{background:#e8f5ff!important;border-color:#a8d4f0!important;color:#15527d!important}
#rrDetailModal .acct-chip-processing{background:#fff3dc!important;border-color:#e8c47c!important;color:#6e4900!important}
#rrDetailModal .acct-chip-production{background:#efebff!important;border-color:#c0b5ef!important;color:#40347f!important}
#rrDetailModal .acct-chip-storage{background:#e7f7ee!important;border-color:#a9d6bc!important;color:#145c3d!important}
#rrDetailModal .rr-account-arrow{font-weight:900;color:#5f6870;padding:0 2px}

/* ==========================================================================
   REPORT ACCOUNT COLOR SYSTEM v2.8
   Color the reports themselves by DSP account while preserving readability.
   Production = purple | Processing = amber | Storage = green
   ========================================================================== */

/* DAILY REPORT ACCOUNT SECTIONS */
#reportsView .rr-daily-section[data-account="Production"],
#reportsView .rr-production-section,
#reportsView .rr-section-production{
  --rr-accent:#7e70cb;--rr-soft:#f3f0ff;--rr-soft2:#faf9ff;--rr-border:#cec7f4;--rr-ink:#40347f;
}
#reportsView .rr-daily-section[data-account="Processing"],
#reportsView .rr-processing-section,
#reportsView .rr-section-processing{
  --rr-accent:#ce9130;--rr-soft:#fff7e8;--rr-soft2:#fffdf9;--rr-border:#efd1a0;--rr-ink:#6e4900;
}
#reportsView .rr-daily-section[data-account="Storage"],
#reportsView .rr-storage-section,
#reportsView .rr-section-storage{
  --rr-accent:#4e9e72;--rr-soft:#edf9f2;--rr-soft2:#fbfefc;--rr-border:#b9dfca;--rr-ink:#145c3d;
}

/* Generic class attached directly by JS to every report account block. */
#reportsView .rr-account-report{
  border:1px solid var(--rr-border)!important;
  border-left:7px solid var(--rr-accent)!important;
  border-radius:8px!important;
  overflow:hidden;
  background:var(--rr-soft2)!important;
  box-shadow:0 1px 4px rgba(20,35,28,.05);
}
#reportsView .rr-account-report>h2,
#reportsView .rr-account-report>h3,
#reportsView .rr-account-report>h4,
#reportsView .rr-account-report .rr-section-title,
#reportsView .rr-account-report .report-section-title{
  margin-top:0!important;
  padding:9px 12px!important;
  background:var(--rr-soft)!important;
  border-bottom:1px solid var(--rr-border)!important;
  color:var(--rr-ink)!important;
}
#reportsView .rr-account-report table thead th{
  background:var(--rr-soft)!important;
  border-color:var(--rr-border)!important;
  color:#172033!important;
}
#reportsView .rr-account-report table tbody td{border-color:var(--rr-border)!important}
#reportsView .rr-account-report table tbody tr:nth-child(even) td{
  background:color-mix(in srgb,var(--rr-soft) 46%,white)!important;
}

/* MONTHLY REPORT: account Part/section blocks get same family. */
#reportsView .rr-monthly-account-production{
  --rr-accent:#7e70cb;--rr-soft:#f3f0ff;--rr-soft2:#faf9ff;--rr-border:#cec7f4;--rr-ink:#40347f;
}
#reportsView .rr-monthly-account-processing{
  --rr-accent:#ce9130;--rr-soft:#fff7e8;--rr-soft2:#fffdf9;--rr-border:#efd1a0;--rr-ink:#6e4900;
}
#reportsView .rr-monthly-account-storage{
  --rr-accent:#4e9e72;--rr-soft:#edf9f2;--rr-soft2:#fbfefc;--rr-border:#b9dfca;--rr-ink:#145c3d;
}

/* Print the same account distinction, but deliberately lighter. */
@media print{
 #reportsView .rr-account-report{
   box-shadow:none!important;
   -webkit-print-color-adjust:exact;
   print-color-adjust:exact;
 }
}

/* ==========================================================================
   ACTUAL MONTHLY FORM COLORS v2.9
   Applies directly to the regulatory form tables visible in Monthly Reports.
   ========================================================================== */
#reportsView .rr-form-production{
  --form-accent:#7e70cb;--form-head:#e9e5ff;--form-sub:#f5f3ff;--form-line:#b8afe8;--form-ink:#352a78;
}
#reportsView .rr-form-processing{
  --form-accent:#ce9130;--form-head:#fff0cf;--form-sub:#fff8e9;--form-line:#e5bd72;--form-ink:#674300;
}
#reportsView .rr-form-storage{
  --form-accent:#4e9e72;--form-head:#def2e7;--form-sub:#eff9f3;--form-line:#9fcdb3;--form-ink:#125538;
}

/* The entire report/form gets a visible account accent. */
#reportsView .rr-account-form{
  border-top:7px solid var(--form-accent)!important;
}

/* Actual monthly report tables. */
#reportsView table.rr-account-table{
  border:2px solid var(--form-accent)!important;
  border-collapse:collapse!important;
}
#reportsView table.rr-account-table thead th{
  background:var(--form-head)!important;
  border-color:var(--form-line)!important;
  color:#111827!important;
}
#reportsView table.rr-account-table tbody td{
  border-color:var(--form-line)!important;
}
/* Tint transaction/description columns and line-number column lightly, keeping numeric cells white. */
#reportsView table.rr-account-table tbody td:first-child,
#reportsView table.rr-account-table tbody td:nth-child(2){
  background:var(--form-sub)!important;
}
/* Totals/custom highlighted rows retain their existing special meaning but gain account edge. */
#reportsView table.rr-account-table tbody tr:last-child td{
  border-bottom:2px solid var(--form-accent)!important;
}

/* Processing report has Part I / Part II headings; production/storage titles likewise. */
#reportsView .rr-account-form h1,
#reportsView .rr-account-form h2,
#reportsView .rr-account-form h3,
#reportsView .rr-account-form h4{
  color:var(--form-ink)!important;
}

/* Keep interactive monthly detail popout treatment from v2.7 untouched. */
@media print{
 #reportsView .rr-account-form{border-top-width:5px!important}
 #reportsView table.rr-account-table{
   -webkit-print-color-adjust:exact!important;
   print-color-adjust:exact!important;
 }
}

/* COST ANALYSIS v1.0 */
.cost-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.cost-card{min-width:0}.cost-operation-grid{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px}.cost-section-head{display:flex;justify-content:space-between;gap:15px;align-items:start}.cost-table-wrap{overflow:auto;margin-top:12px;max-height:300px}.cost-table{width:100%;border-collapse:collapse;font-size:13px}.cost-table th,.cost-table td{padding:7px 8px;border:1px solid #d9dfdc;text-align:left;white-space:nowrap}.cost-table th{background:#edf3ef}.cost-total-card,.rr-excise-summary{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin:12px 0}.cost-total-card>div,.rr-excise-summary>div{padding:12px;border:1px solid #cfd9d3;border-radius:8px;background:#f7faf8}.cost-total-card span,.rr-excise-summary span{display:block;font-size:12px;color:#5d6a63}.cost-total-card strong,.rr-excise-summary strong{display:block;font-size:20px;margin-top:3px}.cost-warning{padding:10px 12px;background:#fff7e8;border-left:5px solid #ce9130}.cost-status{display:inline-block;padding:2px 7px;border-radius:999px;font-weight:800;font-size:11px}.cost-status.complete{background:#e7f7ee;color:#145c3d}.cost-status.partial{background:#fff3dc;color:#6e4900}.rr-excise-form{padding:12px 14px;border:1px solid #cec7f4;border-left:7px solid #7e70cb;background:#faf9ff;margin:12px 0}.rr-table-wrap{overflow:auto}.rr-table{width:100%;border-collapse:collapse}.rr-table th,.rr-table td{border:1px solid #d4d9d6;padding:7px 8px}.rr-table th{background:#f3f0ff}
@media(max-width:900px){.cost-grid{grid-template-columns:1fr}.cost-operation-grid{grid-template-columns:1fr 1fr}.cost-total-card,.rr-excise-summary{grid-template-columns:1fr 1fr}}

.rr-excise-period{margin:12px 0 4px;padding:9px 12px;border-left:6px solid #7e70cb;background:#f3f0ff;font-size:14px}


/* ==========================================================================
   DEFINITIVE TOP-LEVEL SECTION ISOLATION v1.3
   Recomputed on every sidebar navigation change. This is intentionally
   independent of each module's own .hidden state.
   ========================================================================== */
.section-isolated-hidden{display:none!important}

/* Report sub-sections are controlled only by the Reports tab controller. */
#rrDailySection.hidden,#rrMonthlySection.hidden,#rrExciseSection.hidden{display:none!important}
#rrDailySection:not(.hidden),#rrMonthlySection:not(.hidden),#rrExciseSection:not(.hidden){display:block!important}

/* ADMIN COST INFRASTRUCTURE v2.0 */
.admin-cost-panel{margin:18px 0;padding:14px;border:1px solid #d7dfda;border-left:6px solid #4e9e72;border-radius:7px;background:#f8fbf9}.admin-cost-panel h4{margin:0 0 5px}.admin-cost-grid{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:10px;margin:12px 0}.admin-cost-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.admin-cost-history{margin-top:12px;display:grid;gap:6px}.admin-cost-row,.admin-pack-card{display:flex;align-items:center;gap:14px;padding:8px 10px;border:1px solid #dce3df;border-radius:6px;background:#fff}.admin-cost-row span{flex:1}.admin-cost-row button,.admin-pack-card button{margin-left:auto}.admin-pack-card>div{flex:1}.cost-disabled{opacity:.75}@media(max-width:900px){.admin-cost-grid{grid-template-columns:1fr 1fr}.admin-cost-columns{grid-template-columns:1fr}.admin-cost-row,.admin-pack-card{align-items:flex-start;flex-direction:column}}

/* BROWSER PRINT RECOVERY v2.1 */
@media print{
  html,body{background:#fff!important}
  .sidebar,.topbar{display:none!important}
  .section-isolated-hidden{display:none!important}
  main{margin:0!important;padding:0!important;width:100%!important;max-width:none!important}
  .module-view:not(.section-isolated-hidden):not(.hidden){
    display:block!important;visibility:visible!important;position:static!important;
    width:100%!important;max-width:none!important;
  }
  .module-view:not(.section-isolated-hidden):not(.hidden) *{visibility:visible!important}
}

/* ADMIN COSTING LAYOUT POLISH v2.2
   Strict grid alignment: labels occupy one row, controls share a common baseline/height. */
#adminSectionCosting .card{padding:18px 20px}
#adminSectionCosting .admin-cost-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px 10px;
  align-items:start;
}
#adminSectionCosting .admin-cost-grid>label{
  display:grid;
  grid-template-rows:minmax(34px,auto) 38px;
  align-items:end;
  gap:5px;
  margin:0;
  min-width:0;
}
#adminSectionCosting .admin-cost-grid>label>input,
#adminSectionCosting .admin-cost-grid>label>select{
  width:100%!important;
  height:38px!important;
  min-height:38px!important;
  box-sizing:border-box!important;
  margin:0!important;
}
#adminSectionCosting .card>label{
  display:grid;
  gap:5px;
  margin:12px 0 8px;
}
#adminSectionCosting .card>label>input,
#adminSectionCosting .card>label>select{
  width:100%!important;
  height:38px!important;
  box-sizing:border-box!important;
}
#adminSectionCosting button{min-height:34px}
#adminSectionCosting .admin-cost-columns{align-items:stretch}
#adminSectionCosting .admin-cost-columns>.card{height:100%;box-sizing:border-box}
#adminSectionCosting #acuHistory,
#adminSectionCosting #aclHistory,
#adminSectionCosting #acsHistory{margin-top:14px}

/* Utility form: five fields fit cleanly on one grid with Notes below. */
#adminSectionCosting .admin-cost-columns .card:first-child .admin-cost-grid{
  grid-template-columns:1.05fr 1.05fr 1fr 1.05fr 1.05fr;
}
/* Labor form: labels align despite the wrapped Role / Personnel Type heading. */
#adminSectionCosting .admin-cost-columns .card:nth-child(2) .admin-cost-grid{
  grid-template-columns:1fr 1fr 1fr 1fr;
}
/* Still form uses five equal columns; cooling max stays on the same row. */
#adminSectionCosting>section.card .admin-cost-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

@media(max-width:1100px){
 #adminSectionCosting .admin-cost-columns .card:first-child .admin-cost-grid,
 #adminSectionCosting .admin-cost-columns .card:nth-child(2) .admin-cost-grid,
 #adminSectionCosting>section.card .admin-cost-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
 #adminSectionCosting .admin-cost-grid,
 #adminSectionCosting .admin-cost-columns .card:first-child .admin-cost-grid,
 #adminSectionCosting .admin-cost-columns .card:nth-child(2) .admin-cost-grid,
 #adminSectionCosting>section.card .admin-cost-grid{grid-template-columns:1fr}
}

/* ADMIN COSTING MINOR FIXES v2.3 */
#adminSectionCosting .admin-cost-columns .card:first-child .admin-cost-grid{
  grid-template-columns:minmax(100px,.85fr) minmax(100px,1fr) minmax(95px,.9fr) minmax(100px,.9fr) minmax(120px,1fr)!important;
}
#adminSectionCosting .admin-cost-grid>label,
#adminSectionCosting .admin-cost-grid>label>input,
#adminSectionCosting .admin-cost-grid>label>select{min-width:0!important;max-width:100%!important}
#adminSectionCosting input[type="date"]{width:100%!important;min-width:0!important}

.ca-selector{align-items:stretch;flex-direction:column}.ca-selector label{min-width:0}}.admin-users-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 14px}.admin-users-head h3{margin:0}.admin-users-sub{color:#667085;font-size:13px}.admin-user-modal{position:fixed;inset:0;background:rgba(0,0,0,.42);z-index:10050;display:flex;align-items:center;justify-content:center;padding:24px}.admin-user-modal.hidden{display:none!important}.admin-user-dialog{width:min(620px,100%);background:#fff;border-radius:10px;padding:18px}.admin-user-dialog-head{display:flex;justify-content:space-between;align-items:center}.admin-user-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:12px}.admin-user-grid input,.admin-user-grid select,#adminSectionUsers select{width:100%;min-height:38px}@media(max-width:700px){.admin-user-grid{grid-template-columns:1fr}}.platform-org-bar{position:sticky;top:0;z-index:12000;display:flex;align-items:center;gap:10px;padding:8px 16px;background:#fff;border-bottom:2px solid #111827;box-shadow:0 2px 8px rgba(0,0,0,.08)}.platform-org-bar.hidden{display:none!important}.platform-org-bar select{min-width:280px;height:36px}.platform-org-bar strong{font-size:13px;text-transform:uppercase}.platform-org-bar span{color:#667085;font-size:13px}
.admin-role-card{margin-top:18px}.admin-role-head{padding:14px 16px;border-bottom:1px solid #e5e7eb;display:flex;gap:12px;align-items:baseline}.admin-role-head span{font-size:13px;color:#667085}.admin-roles-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;padding:12px}.admin-role-tile{border:1px solid #e5e7eb;border-radius:8px;padding:12px}.admin-role-tile>div{font-size:13px;margin:5px 0;color:#475467}.admin-role-tile small{color:#667085;line-height:1.5}.admin-supervisor-check{display:flex;gap:8px;align-items:center;margin:14px 0}.admin-supervisor-check input{width:auto}

.admin-role-dialog{max-width:820px}.admin-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.admin-permission-grid fieldset{border:1px solid #e5e7eb;border-radius:8px;padding:10px}.admin-permission-grid legend{font-weight:700;padding:0 5px}.admin-permission-item{display:flex;align-items:flex-start;gap:8px;margin:8px 0}.admin-permission-item input{width:auto;margin-top:3px}.admin-permission-item small{display:block;color:#667085;font-weight:400}.admin-permission-item em{font-size:11px;color:#b42318;font-style:normal}@media(max-width:760px){.admin-permission-grid{grid-template-columns:1fr}}


/* v6.10 — long role/user dialogs must remain fully reachable on any viewport */
.admin-user-modal{
  overflow-y:auto;
  overscroll-behavior:contain;
  align-items:flex-start;
}
.admin-user-dialog{
  max-height:calc(100vh - 48px);
  overflow-y:auto;
  overscroll-behavior:contain;
  margin:auto;
}
.admin-role-dialog{
  width:min(920px,100%);
  max-height:calc(100vh - 48px);
  overflow-y:auto;
}
.admin-role-dialog .admin-user-dialog-head{
  position:sticky;
  top:-18px;
  z-index:3;
  background:#fff;
  padding:18px 0 10px;
  border-bottom:1px solid #e5e7eb;
}
@media(max-height:760px){
  .admin-user-modal{padding:10px}
  .admin-user-dialog,.admin-role-dialog{max-height:calc(100vh - 20px)}
}

/* v6.15 desktop professional alignment pass */
:root{--field-h:38px;--danger:#b42318;--danger-bg:#fff1f0;--muted:#667085;--line:#d0d5dd}
main{max-width:1440px;margin:0 auto;width:100%}.panel,.card,.nested-panel{box-sizing:border-box}label{display:flex;flex-direction:column;gap:5px;min-width:0}input,select,textarea,.search-select-trigger{box-sizing:border-box;width:100%;min-width:0}input:not([type=checkbox]):not([type=radio]),select,.search-select-trigger{height:var(--field-h);min-height:var(--field-h);padding-top:0;padding-bottom:0}textarea{min-height:72px}.form-grid,.form-row{align-items:start}.form-grid>*,.form-row>*{min-width:0}.form-grid label,.form-row label{margin:0}.form-grid input,.form-grid select,.form-row input,.form-row select{margin:0}
.required-mark,.optional-mark{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.02em;margin-left:6px;vertical-align:middle}.required-mark{color:#9b1c1c}.optional-mark{color:var(--muted);font-weight:500}.field-help{display:inline-grid;place-items:center;width:18px;height:18px;border:1px solid #98a2b3;border-radius:50%;font-size:11px;font-weight:800;color:#475467;background:#fff;cursor:pointer;margin-left:6px;padding:0;vertical-align:middle}
/* make split controls share one visual baseline */
.measure-input,.input-with-unit,.quantity-with-uom,.tank-selector-shell{display:flex;align-items:stretch;gap:0}.measure-input>input,.input-with-unit>input,.quantity-with-uom>input{border-radius:6px 0 0 6px}.measure-input>select,.input-with-unit>select,.quantity-with-uom>select{width:auto;min-width:66px;border-radius:0 6px 6px 0;margin-left:-1px}.tank-selector-shell{gap:8px}.tank-selector-shell .search-select-trigger{flex:1;text-align:left}.scan-tank-button{width:auto;white-space:nowrap}
/* desktop tables */
.table-wrap,.table-wrapper{max-width:100%;overflow-x:auto}.inventory-input-table input,.inventory-input-table select{min-width:0}.inventory-input-table td{vertical-align:middle}.inventory-input-table th{white-space:nowrap}
/* destructive actions */
button.danger-button,.danger-button,.taxPaidRemove,.bwRemove{background:var(--danger-bg)!important;border-color:#f0a29a!important;color:var(--danger)!important;font-weight:700}
/* admin editors are dialogs, not long forms under tables */
#bondedPartyEditor:not(.hidden),#adminProductEditor:not(.hidden),#adminIngredientEditor:not(.hidden),#adminProvenanceEditor:not(.hidden),#adminTankEditor:not(.hidden),#adminUomEditor:not(.hidden){position:fixed!important;inset:0!important;z-index:3000!important;max-width:none!important;margin:0!important;border:0!important;border-radius:0!important;background:rgba(16,24,40,.48)!important;padding:5vh max(24px,calc((100vw - 1100px)/2))!important;overflow:auto!important;box-shadow:none!important}
#bondedPartyEditor:not(.hidden)>*,#adminProductEditor:not(.hidden)>*,#adminIngredientEditor:not(.hidden)>*,#adminProvenanceEditor:not(.hidden)>*,#adminTankEditor:not(.hidden)>*,#adminUomEditor:not(.hidden)>*{background:#fff}
#bondedPartyEditor:not(.hidden),#adminProductEditor:not(.hidden),#adminIngredientEditor:not(.hidden),#adminProvenanceEditor:not(.hidden),#adminTankEditor:not(.hidden),#adminUomEditor:not(.hidden){outline:9999px solid rgba(16,24,40,.48);outline-offset:-9999px}
#adminSectionUsers .admin-users-panel,#adminSectionUsers .admin-role-card,#adminSectionUsers .table-card{margin-bottom:20px}.admin-permission-grid{gap:10px}
/* TIB age as one group */
.tib-age-group{border:1px solid var(--line);border-radius:8px;padding:14px;margin:14px 0}.tib-age-group>legend{font-weight:800;padding:0 7px}.tib-age-group .form-grid{margin:0}
/* traceability and recipe controls */
#traceabilityView .form-grid,#recipesView .form-grid{align-items:end}.search-select-combo{min-width:0}
/* scanner */
.tank-scan-modal{position:fixed;inset:0;z-index:5000;background:rgba(0,0,0,.72);display:grid;place-items:center;padding:20px}.tank-scan-dialog{width:min(560px,100%);background:#fff;border-radius:14px;padding:18px;box-shadow:0 24px 80px rgba(0,0,0,.35)}.tank-scan-dialog video{width:100%;aspect-ratio:4/3;background:#111;border-radius:10px;object-fit:cover}.tank-scan-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.tank-scan-head h2{margin:0}.tank-scan-status{margin:10px 0;color:var(--muted)}
@media(min-width:900px){.form-grid{column-gap:16px;row-gap:14px}.panel{padding:18px 20px}.page-heading{margin-bottom:14px}#batchingView .batch-header-grid,#bottlingView .form-grid,#tibView .form-grid{align-items:start}}
.organization-manager-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px}.organization-card{margin:0}.feature-grid{display:flex;gap:18px;flex-wrap:wrap;margin:16px 0}.feature-grid label{flex-direction:row;align-items:center;gap:7px}.feature-grid input{width:auto}
#adminSectionUsers>.table-card,#adminSectionUsers>.admin-role-card,#adminSectionUsers>#adminRoleManager{padding:16px;border:1px solid #dfe3e0;border-radius:10px;background:#fff;margin-top:10px;margin-bottom:24px}#adminSectionUsers>.admin-users-head{padding-top:8px;border-top:1px solid #e5e7eb;margin-top:18px}
.pro-tank-tools{display:flex;gap:8px;margin:5px 0}.pro-tank-tools .select-search{flex:1}.pro-tank-tools .scan-tank-button{width:auto}

/* v6.16.3 isolated admin polish. No global form/label DOM rewriting. */
#adminSectionUsers > .admin-users-head {
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid #d7e2da;
  border-radius: 12px;
  background: #f8faf9;
}
#adminSectionUsers > .admin-users-head:first-child { margin-top: 0; }
#adminSectionUsers > .table-card,
#adminSectionUsers > #adminRoleManager,
#adminSectionUsers > .admin-role-card {
  border-color: #d7e2da;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  margin-bottom: 28px;
}
.organization-manager-grid { grid-template-columns: 1fr; gap: 20px; }
.organization-card-pro { border:1px solid #d7e2da; border-radius:12px; background:#fff; overflow:hidden; box-shadow:0 1px 2px rgba(16,24,40,.05); }
.organization-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding:20px; border-bottom:1px solid #e5ebe7; }
.organization-card-head h3 { margin:0 0 6px; font-size:19px; }
.organization-meta { display:flex; align-items:center; gap:10px; color:#667085; font-size:13px; }
.status-pill { display:inline-flex; padding:3px 8px; border-radius:999px; font-size:11px; font-weight:700; text-transform:uppercase; }
.status-pill.active { background:#e7f6ed; color:#166534; }
.status-pill.inactive { background:#f2f4f7; color:#667085; }
.organization-actions { display:flex; gap:8px; }
.organization-feature-section { padding:18px 20px 20px; }
.organization-feature-head { display:flex; flex-direction:column; gap:3px; margin-bottom:14px; }
.organization-feature-head span { font-size:13px; color:#667085; }
.organization-card-pro .feature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 16px; }
.organization-card-pro .feature-grid label { display:flex; flex-direction:row; align-items:flex-start; gap:10px; border:1px solid #e3e8e4; border-radius:9px; padding:12px; background:#fafbfa; cursor:pointer; }
.organization-card-pro .feature-grid label > span { display:flex; flex-direction:column; gap:2px; }
.organization-card-pro .feature-grid small { color:#667085; font-weight:400; }
.organization-edit-dialog { width:min(760px,calc(100vw - 32px)); }
.modal-actions { display:flex; justify-content:flex-end; margin-top:18px; padding-top:16px; border-top:1px solid #e5e7eb; }
@media(max-width:800px){ .organization-card-head{flex-direction:column}.organization-card-pro .feature-grid{grid-template-columns:1fr}.organization-actions{width:100%;flex-wrap:wrap} }


/* v6.16.4 — field label polish (safe presentation-only pass) */
.optional-mark{display:none!important}
label>.field-help:first-child{margin-left:0;margin-right:6px;vertical-align:middle}
label>.field-help:first-child+.required-mark{margin-left:6px}
.required-mark{white-space:nowrap}

/* v6.16.5 — field label header alignment
   Keep help icon, label text, and Required marker on one vertically-centered row,
   while the associated control remains on the next row at full width. */
label:has(> .field-help) {
  display: grid !important;
  grid-template-columns: 18px max-content minmax(0, 1fr);
  grid-auto-rows: auto;
  column-gap: 6px;
  align-items: center;
}
label:has(> .field-help) > .field-help {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  margin: 0 !important;
  vertical-align: middle;
}
label:has(> .field-help) > .required-mark {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  margin: 0 !important;
  line-height: 18px;
  vertical-align: middle;
}
label:has(> .field-help) > .optional-mark {
  display: none !important;
}
label:has(> .field-help) > input,
label:has(> .field-help) > select,
label:has(> .field-help) > textarea,
label:has(> .field-help) > .input-with-unit,
label:has(> .field-help) > .searchable-select,
label:has(> .field-help) > .selector-shell {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  margin-top: 5px;
}

/* v6.16.6 desktop form/layout correction pass */
/* Required markers share the same header row as their field label. */
label:has(> .required-mark){display:grid!important;grid-template-columns:max-content max-content minmax(0,1fr);grid-auto-rows:auto;column-gap:6px;row-gap:5px;align-items:center}
label:has(> .required-mark)>.required-mark{grid-column:2;grid-row:1;margin:0!important;align-self:center;line-height:18px}
label:has(> .required-mark)>.field-help{grid-column:1;grid-row:1;margin:0!important}
label:has(> .field-help):has(> .required-mark){grid-template-columns:18px max-content max-content minmax(0,1fr)}
label:has(> .field-help):has(> .required-mark)>.required-mark{grid-column:3}
label:has(> .required-mark)>input,label:has(> .required-mark)>select,label:has(> .required-mark)>textarea,label:has(> .required-mark)>.input-with-unit,label:has(> .required-mark)>.measure-input,label:has(> .required-mark)>.quantity-with-uom,label:has(> .required-mark)>.tank-selector-shell,label:has(> .required-mark)>.search-select-combo{grid-column:1/-1;grid-row:2;margin:0!important;width:100%}

/* One-line tank selector: built-in selector/search + QR action. */
.pro-tank-selector{display:flex!important;align-items:stretch!important;gap:8px!important;width:100%}
.pro-tank-selector>select{flex:1 1 auto!important;width:auto!important;min-width:0!important}
.pro-tank-selector>.scan-tank-button{flex:0 0 auto!important;height:var(--field-h)!important;align-self:stretch!important}
#batchingView .tank-tools{display:none!important}

/* Main Tanks page must fit desktop viewport without horizontal scrolling. */
#tankListView .table-wrapper,#tankListView .table-wrap{overflow-x:hidden!important}
#tankListView table{width:100%!important;table-layout:fixed!important}
#tankListView th,#tankListView td{padding-left:8px!important;padding-right:8px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#tankListView th:nth-child(1){width:31%}#tankListView th:nth-child(2){width:8%}#tankListView th:nth-child(3){width:8%}#tankListView th:nth-child(4){width:7%}#tankListView th:nth-child(5){width:7%}#tankListView th:nth-child(6){width:16%}#tankListView th:nth-child(7){width:7%}#tankListView th:nth-child(8){width:7%}#tankListView th:nth-child(9){width:9%}

/* Inventory measured controls: header above a single aligned control row; never clip UOM. */
#inventoryView .inventory-input-table{table-layout:fixed;width:100%}
#inventoryView .inventory-input-table td{overflow:visible!important}
#inventoryView .measure-input,#inventoryView .input-with-unit{display:grid!important;grid-template-columns:minmax(0,1fr) 64px!important;width:100%!important;align-items:stretch!important}
#inventoryView .measure-input>input,#inventoryView .input-with-unit>input{width:100%!important;min-width:0!important}
#inventoryView .measure-input>select,#inventoryView .input-with-unit>select{width:64px!important;min-width:64px!important;max-width:64px!important;margin-left:-1px!important}
#inventoryView .inventory-input-table label{gap:4px!important}

/* Batch/recipe quantity UOM controls cannot overflow their columns. */
#batchingView .quantity-with-uom,#recipesView .quantity-with-uom,#batchingView .input-with-unit,#recipesView .input-with-unit{display:grid!important;grid-template-columns:minmax(0,1fr) 66px!important;width:100%!important}
#batchingView .quantity-with-uom>select,#recipesView .quantity-with-uom>select,#batchingView .input-with-unit>select,#recipesView .input-with-unit>select{width:66px!important;min-width:66px!important;max-width:66px!important}
#recipesView .field-help{appearance:none;-webkit-appearance:none;flex:none}
#recipesView .recipe-ingredient-row label,#recipesView .recipe-ingredient-grid label{align-self:start!important}
#recipesView input,#recipesView select{vertical-align:top}

/* Distillation source rows: common label/control baselines and QR selectors. */
#distillationView .dist-source-row .form-grid,#distillationView .dist-source-row,#distillationView .nested-panel>.form-grid{align-items:start!important}
#distillationView .dist-source-row label,#distillationView #distSources label{margin:0!important;gap:5px!important}
#distillationView #distSources input,#distillationView #distSources select,#distillationView #distSources .tank-selector-shell{margin-top:0!important}

/* TIB: eliminate stacked Required line and keep all label headers equal height. */
#tibView label:has(> .required-mark){row-gap:5px!important}
#tibView .form-grid{align-items:start!important}
#tibView .form-grid>label{align-self:start!important}

/* Bottling needs breathing room and consistent required labels. */
#bottlingView .panel{padding:22px 24px!important}
#bottlingView .form-grid{column-gap:20px!important;row-gap:18px!important;margin-bottom:14px}
#bottlingView label{margin-bottom:14px!important}
#bottlingView .notice{margin-bottom:20px!important}
#bottlingView details{margin:18px 0!important}
#bottlingView .tank-selector-shell{margin-top:0!important}

/* Tax Paid / Bottle Withdrawal / Bulk Removal: aligned destructive actions and labels. */
#taxPaidView .tax-paid-lines .form-grid,#bottleWithdrawalView .form-grid,#bulkRemovalView .form-grid{align-items:start!important}
#taxPaidView .taxPaidRemove,#bottleWithdrawalView .bwRemove{height:var(--field-h)!important;align-self:end!important;margin:0!important}
#bottleWithdrawalView .bw-line .form-grid{display:grid!important;grid-template-columns:minmax(0,1.4fr) minmax(160px,1fr) auto!important;gap:14px!important;align-items:end!important}
#bottleWithdrawalView .bw-line .form-grid>label:last-child{align-self:end!important}
#bottleWithdrawalView .bw-line .form-grid>label:last-child .bwRemove{width:auto!important;min-width:92px!important}
#bulkRemovalView label:has(> .required-mark),#bottleWithdrawalView label:has(> .required-mark){align-self:start!important}

/* Users & Permissions: each section stands alone; remove the visual mega-container. */
#adminSectionUsers{border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important}
#adminSectionUsers>.admin-users-head,#adminSectionUsers>.table-card,#adminSectionUsers>#adminRoleManager,#adminSectionUsers>.admin-role-card{margin-left:0!important;margin-right:0!important}
#adminSectionUsers>.admin-users-head{background:#f7faf8!important;border:1px solid #d5e3da!important;border-bottom:3px solid #b8d3c1!important}

/* Admin Tanks: same account color language as operational Tanks + clean search controls. */
#adminSectionTanks .table-wrapper{overflow-x:hidden!important}
#adminSectionTanks table{width:100%!important;table-layout:fixed!important}
#adminSectionTanks #adminTankTableBody tr.admin-tank-fermentation>td{background:#f4fbff!important}#adminSectionTanks #adminTankTableBody tr.admin-tank-processing>td{background:#fffbf3!important}#adminSectionTanks #adminTankTableBody tr.admin-tank-production>td{background:#f9f7ff!important}#adminSectionTanks #adminTankTableBody tr.admin-tank-storage>td{background:#f5fcf8!important}
#adminSectionTanks #adminTankTableBody tr.admin-tank-fermentation>td:first-child{box-shadow:inset 5px 0 0 #79b7df}#adminSectionTanks #adminTankTableBody tr.admin-tank-processing>td:first-child{box-shadow:inset 5px 0 0 #dda84e}#adminSectionTanks #adminTankTableBody tr.admin-tank-production>td:first-child{box-shadow:inset 5px 0 0 #9b8fdd}#adminSectionTanks #adminTankTableBody tr.admin-tank-storage>td:first-child{box-shadow:inset 5px 0 0 #75b891}
#adminSectionTanks #adminTankSearch{height:var(--field-h)!important}

/* Admin editors: real centered modal cards. The editor itself is the card; no split white strips. */
#bondedPartyEditor:not(.hidden),#adminProductEditor:not(.hidden),#adminIngredientEditor:not(.hidden),#adminProvenanceEditor:not(.hidden),#adminTankEditor:not(.hidden),#adminUomEditor:not(.hidden){position:fixed!important;inset:auto!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(980px,calc(100vw - 48px))!important;max-width:980px!important;max-height:88vh!important;margin:0!important;padding:22px!important;overflow:auto!important;z-index:3000!important;border:1px solid #d0d5dd!important;border-radius:14px!important;background:#fff!important;outline:0!important;box-shadow:0 0 0 100vmax rgba(16,24,40,.58),0 24px 70px rgba(16,24,40,.28)!important}
#bondedPartyEditor:not(.hidden)>*,#adminProductEditor:not(.hidden)>*,#adminIngredientEditor:not(.hidden)>*,#adminProvenanceEditor:not(.hidden)>*,#adminTankEditor:not(.hidden)>*,#adminUomEditor:not(.hidden)>*{background:transparent!important}
#adminUomEditor .form-grid,#bondedPartyEditor .form-grid,#adminProductEditor .form-grid,#adminIngredientEditor .form-grid,#adminProvenanceEditor .form-grid,#adminTankEditor .form-grid{align-items:start!important;column-gap:16px!important;row-gap:14px!important}
#adminUomEditor table{width:100%!important}
#bottleWithdrawalView .bw-remove-cell{align-self:end;display:flex;align-items:flex-end;height:100%}#bottleWithdrawalView .bw-remove-cell .bwRemove{width:auto!important;min-width:92px!important}
#adminSectionUoms .admin-section-titlebar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 14px}#adminSectionUoms .admin-section-titlebar h3{margin:0 0 3px}#adminUomEditor .admin-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}#adminUomEditor .admin-modal-head h3{margin:0}.checkbox-field{display:flex;align-items:flex-end;padding-bottom:8px}.checkbox-field label{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important}.checkbox-field input{width:auto!important;height:auto!important}

/* v6.16.7 — batching + recipe required-field and integrated selector corrections */
#batchingView .batch-tank-field>.tank-selector-shell{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:start!important;width:100%!important}
#batchingView .batch-tank-field>.tank-selector-shell>.tank-native-select{display:none!important}
#batchingView .batch-tank-field>.tank-selector-shell>.tank-combobox{grid-column:1!important;min-width:0!important}
#batchingView .batch-tank-field>.tank-selector-shell>.scan-tank-button{grid-column:2!important;align-self:start!important;height:42px!important;min-height:42px!important;white-space:nowrap!important}
#batchingView .batch-required-note{margin:2px 0 0!important;font-size:12px!important}
#batchingView .batch-ingredient-grid label:has(>.required-mark),#recipesView .recipe-ing-grid label:has(>.required-mark){align-self:start!important}
#recipesView .recipe-regulatory-help{display:block!important;width:auto!important;height:auto!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--muted)!important;font-size:11px!important;font-weight:400!important;line-height:1.35!important;margin:3px 0 0!important;padding:0!important;cursor:default!important}
#recipesView .recipe-details-grid>label{display:grid!important;grid-template-columns:max-content max-content minmax(0,1fr)!important;grid-auto-rows:auto!important;column-gap:6px!important;row-gap:5px!important;align-items:center!important}
#recipesView .recipe-details-grid>label>input,#recipesView .recipe-details-grid>label>select,#recipesView .recipe-details-grid>label>.search-select-combo,#recipesView .recipe-details-grid>label>.recipe-regulatory-help{grid-column:1/-1!important}
#recipesView .recipe-details-grid>label>.required-mark,#recipesView .recipe-details-grid>label>.optional-mark{grid-row:1!important;margin:0!important}

/* v6.16.8 — precise desktop field-label and measurement alignment fixes */
@media (min-width: 901px){
  /* Required markers belong on the same text baseline as their field label.
     Do not turn labels themselves into CSS grids; that displaced anonymous label text. */
  #batchingView label:has(> .required-mark),
  #recipesView label:has(> .required-mark){
    display:block!important;
    width:100%!important;
    min-width:0!important;
    font-size:13px!important;
    font-weight:650!important;
    line-height:18px!important;
    text-transform:none!important;
    letter-spacing:normal!important;
  }
  #batchingView label:has(> .required-mark)>.required-mark,
  #recipesView label:has(> .required-mark)>.required-mark,
  #recipesView label>.optional-mark{
    display:inline!important;
    margin-left:5px!important;
    vertical-align:baseline!important;
    line-height:inherit!important;
    font-size:10px!important;
  }
  #batchingView label:has(> .required-mark)>input,
  #batchingView label:has(> .required-mark)>select,
  #batchingView label:has(> .required-mark)>textarea,
  #batchingView label:has(> .required-mark)>.quantity-uom-control,
  #batchingView label:has(> .required-mark)>.tank-selector-shell,
  #batchingView label:has(> .required-mark)>.search-select-combo,
  #recipesView label:has(> .required-mark)>input,
  #recipesView label:has(> .required-mark)>select,
  #recipesView label:has(> .required-mark)>textarea,
  #recipesView label:has(> .required-mark)>.quantity-uom-control,
  #recipesView label:has(> .required-mark)>.search-select-combo{
    display:flex!important;
    width:100%!important;
    margin-top:5px!important;
  }
  #batchingView label:has(> .required-mark)>input,
  #batchingView label:has(> .required-mark)>select,
  #batchingView label:has(> .required-mark)>textarea,
  #recipesView label:has(> .required-mark)>input,
  #recipesView label:has(> .required-mark)>select,
  #recipesView label:has(> .required-mark)>textarea{display:block!important}

  /* Batching: enough room for Quantity + Required without colliding with UOM. */
  #batchingView .batch-ingredient-grid{
    grid-template-columns:minmax(125px,.9fr) minmax(180px,1.25fr) minmax(180px,1.05fr) minmax(155px,.9fr) minmax(150px,.9fr) minmax(140px,.8fr)!important;
    align-items:start!important;
  }
  #batchingView .quantity-uom-field{min-width:180px!important}
  #batchingView .quantity-uom-control{margin-top:5px!important}
  #batchingView .nested-panel>.form-grid{align-items:start!important}
  #batchingView #batchFinalAmountLabel{vertical-align:baseline!important}

  /* Recipes: use the same normal field-label typography as the rest of the app. */
  #recipesView .recipe-details-grid label,
  #recipesView .recipe-formula-grid label,
  #recipesView .recipe-ing-grid label,
  #recipesView .recipe-notes-field{
    color:var(--text,#111827)!important;
    font-size:13px!important;
    font-weight:650!important;
    text-transform:none!important;
    letter-spacing:normal!important;
    line-height:18px!important;
  }
  #recipesView .recipe-details-grid>label{display:block!important}
  #recipesView .recipe-details-grid>label>.recipe-regulatory-help{display:block!important;margin-top:3px!important}
  #recipesView .recipe-ing-grid{grid-template-columns:minmax(150px,1fr) minmax(240px,1.6fr) minmax(190px,1.05fr) minmax(120px,.6fr)!important;align-items:start!important}
  #recipesView .quantity-uom-field{min-width:190px!important}
  #recipesView .quantity-uom-control{margin-top:5px!important}
  #recipesView .recipe-ing-grid>label>input,
  #recipesView .recipe-ing-grid>label>select{margin-top:5px!important}

  /* Inventory: Gross Weight/Net Volume remains above its compound control;
     align Measured Proof's input with that control and keep the UOM border intact. */
  #inventoryView .inventory-input-table td[data-label="Measured Amount"]{vertical-align:top!important}
  #inventoryView .inventory-measure-label{display:block!important;height:18px!important;line-height:18px!important;margin:0 0 4px!important;font-size:11px!important;white-space:nowrap!important}
  #inventoryView .inventory-quantity-uom{display:flex!important;width:100%!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box!important}
  #inventoryView .inventory-quantity-uom>.invMeasuredQuantity{flex:1 1 auto!important;width:0!important;min-width:0!important}
  #inventoryView .inventory-quantity-uom>.invMeasuredUom{flex:0 0 64px!important;width:64px!important;min-width:64px!important;max-width:64px!important;margin:0!important;border-left:1px solid #d7dfda!important}
  #inventoryView .inventory-input-table td[data-label="Measured proof"]{vertical-align:top!important;padding-top:42px!important}
  #inventoryView .inventory-input-table .invMeasuredProof{width:100%!important;min-width:0!important;box-sizing:border-box!important;margin:0!important}
}

/* v6.16.9 — inventory final alignment + recipe regulatory controls */
@media (min-width:901px){
  #inventoryView .inventory-input-table th:nth-child(1){width:10%}
  #inventoryView .inventory-input-table th:nth-child(2){width:8%}
  #inventoryView .inventory-input-table th:nth-child(3){width:26%}
  #inventoryView .inventory-input-table th:nth-child(4){width:7%}
  #inventoryView .inventory-input-table th:nth-child(5){width:10%}
  #inventoryView .inventory-input-table th:nth-child(6){width:9%}
  #inventoryView .inventory-input-table th:nth-child(7){width:8%}
  #inventoryView .inventory-input-table th:nth-child(8){width:13%}
  #inventoryView .inventory-input-table th:nth-child(9){width:9%}
  #inventoryView .inventory-quantity-uom>.invMeasuredUom{flex:0 0 72px!important;width:72px!important;min-width:72px!important;max-width:72px!important;padding-left:7px!important;padding-right:22px!important}
  #inventoryView .inventory-input-table td[data-label="Measured proof"]{vertical-align:top!important;padding-top:31px!important}

  #recipesView .recipes-browser-tools{align-items:stretch!important}
  #recipesView .recipes-browser-tools>input,#recipesView .recipes-browser-tools>select{box-sizing:border-box!important;height:38px!important;min-height:38px!important;margin:0!important;align-self:stretch!important}
  #recipesView .recipe-ing-grid{align-items:start!important}
  #recipesView .ri-proof-field{display:flex!important;flex-direction:column!important;align-self:start!important}
  #recipesView .ri-proof-field>.optional-mark{display:inline!important;min-height:18px!important;margin:0 0 5px!important;font-size:10px!important;line-height:18px!important}
  #recipesView .ri-proof-field>input{margin-top:0!important;height:38px!important;min-height:38px!important}
}
#recipesView .ri-regulatory-fields{margin:14px 0 10px;padding:14px;background:#f7f9f7;border:1px solid #e0e6e2;border-radius:8px}
#recipesView .ri-regulatory-fields>strong{display:block;margin-bottom:10px;font-size:14px}
#recipesView .ri-regulatory-checks{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:12px}
#recipesView .ri-regulatory-checks label{display:flex!important;flex-direction:row!important;align-items:center!important;gap:7px!important;font-weight:600!important}
#recipesView .ri-regulatory-checks input{width:auto!important;height:auto!important;min-height:0!important;margin:0!important}
#recipesView .ri-regulatory-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#recipesView .ri-regulatory-grid label{display:block!important;font-size:13px!important;font-weight:650!important}
#recipesView .ri-regulatory-grid input,#recipesView .ri-regulatory-grid select{width:100%!important;margin-top:5px!important;box-sizing:border-box!important}
#recipesView .ri-source-material{grid-column:1/-1}
#recipesView .ri-regulatory-fields.hidden{display:none!important}
#batchingView .base-density-required{display:inline!important;margin-left:5px!important;vertical-align:baseline!important}
#batchingView .base-density-required.hidden{display:none!important}
@media(max-width:720px){#recipesView .ri-regulatory-grid{grid-template-columns:1fr}#recipesView .ri-source-material{grid-column:auto}}


/* v6.16.10 — recipe proof alignment + recipe Part II allocation defaults */
@media(min-width:721px){
  #recipesView .ri-proof-field{display:block!important;align-self:start!important}
  #recipesView .ri-proof-field>.optional-mark{display:inline!important;min-height:0!important;margin-left:5px!important;line-height:18px!important;vertical-align:baseline!important}
  #recipesView .ri-proof-field>input{display:block!important;margin-top:5px!important;height:38px!important;min-height:38px!important}
}
#recipesView .ri-partii-allocation-wrap.hidden{display:none!important}
#recipesView .ri-partii-allocation-wrap input{width:100%!important}

/* v6.16.13 batching polish */
.batch-ingredient-grid > label,
.batch-ingredient-grid > .batch-field { align-self:start; }
.batch-ingredient-grid .field-label { display:block; font:inherit; font-weight:600; margin:0 0 6px; line-height:1.2; }
.batch-ingredient-grid .bi-supplier-wrap,
.batch-ingredient-grid .bi-density-wrap,
.batch-ingredient-grid .bi-cost-wrap { font-size:inherit; font-weight:normal; }
.batch-ingredient-grid .bi-supplier-wrap select,
.batch-ingredient-grid .bi-density-wrap input,
.batch-ingredient-grid .bi-cost-wrap input { width:100%; }

/* 2026-09-22 batching ingredient label normalization */
@media (min-width: 901px){
  #batchingView .batch-ingredient-grid .bi-supplier-wrap,
  #batchingView .batch-ingredient-grid .bi-density-wrap,
  #batchingView .batch-ingredient-grid .bi-cost-wrap{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    align-self:start!important;
    color:var(--text,#111827)!important;
    font-size:13px!important;
    font-weight:650!important;
    line-height:18px!important;
    text-transform:none!important;
    letter-spacing:normal!important;
  }
  #batchingView .batch-ingredient-grid .bi-supplier-wrap>.field-label,
  #batchingView .batch-ingredient-grid .bi-density-wrap>.field-label,
  #batchingView .batch-ingredient-grid .bi-cost-wrap>.field-label{
    display:block!important;
    margin:0!important;
    padding:0!important;
    color:inherit!important;
    font:inherit!important;
    line-height:18px!important;
  }
  #batchingView .batch-ingredient-grid .bi-supplier-wrap>select,
  #batchingView .batch-ingredient-grid .bi-density-wrap>input,
  #batchingView .batch-ingredient-grid .bi-cost-wrap>input{
    display:block!important;
    width:100%!important;
    margin-top:5px!important;
  }
}


/* 2026-09-22 distillation/batching alignment fixes */
#distillationView .tank-selector-action-row,
#batchingView .tank-selector-action-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:end!important;
  width:100%!important;
}
#distillationView .tank-selector-action-row .tank-combobox,
#batchingView .tank-selector-action-row .tank-combobox{min-width:0!important;width:100%!important;grid-column:1!important;grid-row:1!important}
#distillationView .tank-selector-action-row .scan-tank-button,
#batchingView .tank-selector-action-row .scan-tank-button{grid-column:2!important;grid-row:1!important;align-self:stretch!important;width:auto!important;white-space:nowrap!important;margin:0!important}
#distillationView .dist-run-main-grid{margin-bottom:12px!important}
#distillationView .dist-utility-percent-grid{margin-top:0!important;margin-bottom:12px!important}
#batchingView .batch-duration-row{margin:12px 0!important}
.cost-preview-breakdown{margin-top:12px;padding:12px;border:1px solid var(--border,#d7dde3);border-radius:6px;background:#fafbfc}
.cost-preview-breakdown h3{margin:0 0 8px}
.cost-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.cost-preview-grid>div{padding:8px;border:1px solid var(--border,#e1e5e9);border-radius:5px;background:#fff}
.cost-preview-grid span{display:block;font-size:.82rem;color:var(--muted,#5f6b76)}
.cost-preview-grid strong{display:block;margin-top:2px}
@media(max-width:760px){.cost-preview-grid{grid-template-columns:1fr 1fr}}

/* TIB polish 2026-09-22 */
.tib-view .tib-tank-selector-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start;margin-top:5px}
.tib-view .tib-tank-selector-row>select,.tib-view .tib-tank-selector-row>.tib-combobox{margin-top:0!important;min-width:0}
.tib-view .tib-tank-selector-row>.scan-tank-button{height:42px;min-height:42px;margin:0!important;align-self:start;white-space:nowrap}
.tib-view .tib-bold-check{display:flex!important;align-items:center!important;gap:8px!important;font-weight:700!important}
.tib-view .tib-bold-check input{flex:0 0 16px!important;width:16px!important;height:16px!important;min-height:16px!important;margin:0!important}
.tib-view .tib-bold-check span{display:inline!important;font-weight:700!important}
.field-help-wrap{position:relative;display:inline-flex;align-items:center;grid-column:1;grid-row:1;width:18px;height:18px}
.field-help-wrap>.field-help{margin:0!important}
.field-help-tooltip{display:none;position:absolute;left:0;bottom:calc(100% + 7px);z-index:500;width:290px;padding:9px 10px;border:1px solid #aeb8b2;border-radius:7px;background:#fff;color:#17211c;font-size:12px;font-weight:400;line-height:1.35;box-shadow:0 6px 18px rgba(0,0,0,.16);pointer-events:none}
.field-help-wrap:hover>.field-help-tooltip,.field-help-wrap:focus-within>.field-help-tooltip{display:block}
@media(max-width:760px){.field-help-tooltip{left:0;width:min(280px,calc(100vw - 54px))}}

/* TIB final alignment corrections — 2026-09-22 */
.tib-view .tib-tank-selector-row{align-items:center!important}
.tib-view .tib-tank-selector-row>.tib-combobox{margin:0!important}
.tib-view .tib-qr-button{box-sizing:border-box!important;width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important}
.tib-view .field-label-line{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:5px!important;width:100%!important;min-height:18px!important}
.tib-view .field-label-line .field-help-wrap{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;margin:0!important}
.tib-view .field-label-line .field-help{margin:0!important;vertical-align:middle!important}
.tib-view .tib-bold-check,.tib-view .inline-check.tib-bold-check,.tib-view .attestation.tib-bold-check,.tib-view .check-grid label.tib-bold-check{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;width:auto!important;margin:7px 0!important;padding-left:0!important;font-weight:700!important}
.tib-view .attestation.tib-bold-check{padding:10px 12px!important}
.tib-view .tib-bold-check input[type=checkbox]{display:block!important;flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important}
.tib-view .tib-bold-check span{display:inline!important;margin:0!important;line-height:1.25!important}


/* 2026-09-22 — tank label modal + inventory measured columns */
.tl-modal{
  position:fixed!important;
  inset:0!important;
  z-index:10000!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
  background:rgba(15,23,42,.58)!important;
  box-sizing:border-box!important;
}
.tl-modal.hidden{display:none!important}
.tl-modal-card{
  width:min(94vw,720px)!important;
  max-height:94vh!important;
  overflow:auto!important;
  background:#fff!important;
  border:1px solid #cfd8d3!important;
  border-radius:12px!important;
  box-shadow:0 24px 70px rgba(0,0,0,.28)!important;
  padding:18px!important;
  box-sizing:border-box!important;
}
.tl-modal-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:14px!important}
.tl-modal-head h2{margin:0!important}
.tl-preview{width:min(100%,384px)!important;min-height:576px!important;margin:0 auto 14px!important;background:#fff!important;border:1px solid #d7dfda!important;border-radius:8px!important;overflow:hidden!important;box-sizing:border-box!important}
.tl-preview>*{max-width:100%!important;box-sizing:border-box!important}
.tl-preview svg,.tl-preview canvas{display:block!important;max-width:100%!important;height:auto!important}
.tl-modal-actions{display:flex!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;margin-top:12px!important}
.tl-history-panel{margin-top:14px!important;border-top:1px solid #e2e8e5!important;padding-top:12px!important}
body.tank-label-open{overflow:hidden!important}

@media (min-width:901px){
  #inventoryView #invTankTable{table-layout:fixed!important;width:100%!important}
  #inventoryView #invTankTable th:nth-child(1),#inventoryView #invTankTable td:nth-child(1){width:9%!important}
  #inventoryView #invTankTable th:nth-child(2),#inventoryView #invTankTable td:nth-child(2){width:7%!important}
  #inventoryView #invTankTable th:nth-child(3),#inventoryView #invTankTable td:nth-child(3){width:24%!important}
  #inventoryView #invTankTable th:nth-child(4),#inventoryView #invTankTable td:nth-child(4){width:6%!important}
  #inventoryView #invTankTable th:nth-child(5),#inventoryView #invTankTable td:nth-child(5){width:9%!important}
  #inventoryView #invTankTable th:nth-child(6),#inventoryView #invTankTable td:nth-child(6){width:8%!important}
  #inventoryView #invTankTable th:nth-child(7),#inventoryView #invTankTable td:nth-child(7){width:7%!important}
  #inventoryView #invTankTable th:nth-child(8),#inventoryView #invTankTable td:nth-child(8){width:18%!important}
  #inventoryView #invTankTable th:nth-child(9),#inventoryView #invTankTable td:nth-child(9){width:12%!important}
  #inventoryView #invTankTable th:nth-child(9){white-space:normal!important;overflow:visible!important;line-height:1.15!important}
  #inventoryView #invTankTable td[data-label="Measured proof"]{vertical-align:bottom!important;padding-top:9px!important}
  #inventoryView #invTankTable .invMeasuredProof{display:block!important;margin:22px 0 0!important;height:38px!important;box-sizing:border-box!important}
}

/* Inventory attestation: checkbox and text remain on one horizontal line. */
#inventoryView .attestation{display:flex!important;align-items:center!important;gap:8px!important;margin:16px 0!important;}
#inventoryView .attestation input[type=checkbox]{width:auto!important;height:auto!important;min-height:0!important;margin:0!important;flex:0 0 auto!important;}
#inventoryView .attestation span{display:inline!important;margin:0!important;line-height:1.25!important;}

/* Inventory attestation row: explicit sibling layout avoids global label rules. */
#inventoryView .inventory-attestation-row{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;margin:16px 0!important;width:100%!important;}
#inventoryView .inventory-attestation-row input[type="checkbox"]{display:block!important;position:static!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;flex:0 0 16px!important;}
#inventoryView .inventory-attestation-row label{display:block!important;width:auto!important;margin:0!important;padding:0!important;line-height:16px!important;font-weight:600!important;}


/* Bottling source tank + Tank Heel alignment — 2026-09-22 */
#bottlingView .bottling-source-field{display:block!important;width:100%!important;margin:0 0 14px!important}
#bottlingView .bottling-source-label{display:flex!important;align-items:baseline!important;gap:5px!important;margin:0 0 6px!important;font-weight:650!important;line-height:1.2!important}
#bottlingView .bottling-tank-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:stretch!important;gap:8px!important;width:100%!important}
#bottlingView .bottling-tank-row>.tank-native-select{grid-column:1!important;grid-row:1!important}
#bottlingView .bottling-tank-row>.tank-combobox{grid-column:1!important;grid-row:1!important;width:100%!important;min-width:0!important;margin:0!important}
#bottlingView .bottling-tank-row>.bottling-qr-button{grid-column:2!important;grid-row:1!important;align-self:stretch!important;width:auto!important;min-width:86px!important;height:42px!important;min-height:42px!important;margin:0!important;white-space:nowrap!important}
#bottlingView .bottling-heel-notice{padding:14px 16px!important}
#bottlingView .bottling-heel-check{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;margin:0!important;padding:0!important}
#bottlingView .bottling-heel-check>input[type="checkbox"]{display:block!important;position:static!important;flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important}
#bottlingView .bottling-heel-check>label{display:block!important;width:auto!important;margin:0!important;padding:0!important;font-weight:700!important;line-height:1.25!important}
#bottlingView .bottling-heel-notice>.help-text{margin:8px 0 0 24px!important;padding:0!important;text-align:left!important}

/* 2026-09-22 Tax Paid polish */
#taxPaidView .tax-paid-line-grid{align-items:end!important}
#taxPaidView .taxPaidRemove{height:42px!important;min-height:42px!important;align-self:end!important;margin:0 0 1px 0!important}
#taxPaidView .tax-paid-field-label-line{display:inline-flex!important;align-items:center!important;gap:5px!important;min-height:18px!important}
#taxPaidView .tax-paid-field-label-line .field-help-wrap{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;margin:0!important}
#taxPaidView .operation-compliance-details .field-help-tooltip{left:0!important;bottom:calc(100% + 7px)!important}


/* 2026-09-22 Tax Paid remove column: reserve the same label row as neighboring fields. */
#taxPaidView .tax-paid-remove-cell{display:flex!important;flex-direction:column!important;align-self:stretch!important;justify-content:flex-start!important;min-width:82px!important;}
#taxPaidView .tax-paid-remove-spacer{display:block!important;height:20px!important;min-height:20px!important;line-height:20px!important;margin:0 0 6px!important;visibility:hidden!important;}
#taxPaidView .tax-paid-remove-cell .taxPaidRemove{display:block!important;width:100%!important;height:42px!important;min-height:42px!important;margin:0!important;align-self:auto!important;}

/* 2026-09-22 Tax Paid remove button final vertical alignment.
   Relative offset does not change the grid track; it only aligns the button with the input controls. */
#taxPaidView .tax-paid-remove-cell .taxPaidRemove{position:relative!important;top:18px!important;}

/* Bulk Spirits Removal — standardized field/row spacing — 2026-09-22 */
#bulkRemovalView .panel > .form-grid{
  margin:0 0 16px!important;
  gap:14px 18px!important;
  align-items:start!important;
}
#bulkRemovalView .panel > .form-grid > label{
  display:block!important;
  margin:0!important;
  padding:0!important;
  line-height:1.25!important;
}
#bulkRemovalView .panel > .form-grid > label > input,
#bulkRemovalView .panel > .form-grid > label > select{
  display:block!important;
  width:100%!important;
  margin-top:7px!important;
}
#bulkRemovalView .panel > label{
  margin-top:0!important;
  margin-bottom:16px!important;
}
#bulkRemovalView #brTankInfo{
  margin-top:0!important;
  margin-bottom:16px!important;
}


/* 2026-09-22 mobile Tanks validation pass */
#partialTransferPanel .partial-destination-action-row{display:flex;align-items:stretch;gap:8px;width:100%;min-width:0}
#partialTransferPanel .partial-destination-action-row>.tank-combobox{flex:1 1 auto;min-width:0}
#partialTransferPanel .partial-qr-button{flex:0 0 auto;width:46px;min-width:46px;height:42px;min-height:42px;padding:0 8px;align-self:flex-start}

@media(max-width:700px){
  /* Keep the 4x6 label dialog completely inside the usable phone viewport. */
  .tl-modal{padding:8px!important;align-items:flex-start!important;overflow:hidden!important}
  .tl-modal-card{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;height:auto!important;max-height:calc(100dvh - 16px)!important;padding:12px!important;border-radius:10px!important;overflow:auto!important}
  .tl-modal-head{gap:8px!important;margin-bottom:8px!important;position:sticky!important;top:-12px!important;z-index:4!important;background:#fff!important;padding:8px 0!important}
  .tl-modal-head h2{font-size:18px!important}
  .tl-preview{width:min(100%,calc((100dvh - 190px) * .6667))!important;min-height:0!important;aspect-ratio:2/3!important;margin:0 auto 8px!important;overflow:hidden!important}
  .tl-preview>.tl-sheet{width:100%!important;height:100%!important;min-height:0!important;transform-origin:top left!important}
  .tl-modal-actions{margin-top:8px!important;gap:6px!important}
  .tl-modal-actions button{flex:1 1 0;min-width:0!important}

  /* All three Tank detail actions use the same mobile dimensions. */
  #tankDetailView .tank-detail-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:10px!important}
  #tankDetailView .tank-detail-actions button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;margin:0!important;padding:8px 12px!important;box-sizing:border-box!important}

  #partialTransferPanel .partial-destination-action-row{gap:8px!important}
  #partialTransferPanel .partial-qr-button{width:46px!important;min-width:46px!important;height:42px!important;min-height:42px!important;padding:0 7px!important}
}


/* 2026-09-22 mobile Tanks pass 2 — label viewport + software-admin overlay */
body.tank-label-open .platform-org-bar{visibility:hidden!important;pointer-events:none!important}
@media(max-width:700px){
  .tl-modal{z-index:20050!important;padding:6px!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
  .tl-modal-card{display:flex!important;flex-direction:column!important;width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;height:calc(100dvh - 12px)!important;max-height:calc(100dvh - 12px)!important;padding:10px!important;overflow:hidden!important}
  .tl-modal-head{position:static!important;flex:0 0 auto!important;top:auto!important;padding:0 0 6px!important;margin:0 0 6px!important}
  .tl-preview{flex:1 1 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;min-height:0!important;aspect-ratio:2/3!important;margin:0 auto 6px!important;overflow:hidden!important}
  .tl-preview>.tl-sheet{font-size:clamp(10px,2.7vw,14px)!important;line-height:1.12!important;overflow:hidden!important}
  .tl-preview .tl-tank,.tl-preview .tl-product,.tl-preview .tl-proof{line-height:1.05!important}
  .tl-preview .tl-grid{line-height:1.08!important}
  .tl-preview .tl-bottom{line-height:1.08!important}
  .tl-preview .tl-qr svg,.tl-preview .tl-qr canvas{max-height:42%!important;width:auto!important;margin:auto!important}
  .tl-modal-actions{flex:0 0 auto!important;margin:0!important}
  .tl-history-panel{max-height:35dvh!important;overflow:auto!important}
}

/* 2026-09-22 mobile Tanks pass 3 — true 4x6 preview and hard viewport containment */
.tl-modal,.tl-modal *{box-sizing:border-box!important}
.tl-preview>.tl-sheet{
  width:100%!important;height:100%!important;padding:17px!important;background:#fff!important;color:#000!important;
  display:flex!important;flex-direction:column!important;font-family:Arial,sans-serif!important;overflow:hidden!important;
}
.tl-preview .tl-top{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:10px!important;border-bottom:4px solid #000!important;padding-bottom:6px!important}
.tl-preview .tl-tank{font-size:34px!important;font-weight:900!important;line-height:1!important}
.tl-preview .tl-account{font-size:13px!important;font-weight:800!important;text-transform:uppercase!important;text-align:right!important}
.tl-preview .tl-product{font-size:26px!important;font-weight:900!important;line-height:1.02!important;margin-top:12px!important;text-transform:uppercase!important}
.tl-preview .tl-proof{font-size:40px!important;font-weight:900!important;line-height:1!important;margin:8px 0 12px!important}
.tl-preview .tl-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px 12px!important}
.tl-preview .tl-grid>div{border-top:1px solid #777!important;padding-top:3px!important;min-width:0!important}
.tl-preview .tl-grid span{display:block!important;font-size:8px!important;font-weight:700!important;text-transform:uppercase!important;letter-spacing:0!important}
.tl-preview .tl-grid strong{display:block!important;font-size:13px!important;line-height:1.1!important;overflow-wrap:anywhere!important}
.tl-preview .tl-bottom{margin-top:auto!important;border-top:3px solid #000!important;padding-top:7px!important;font-size:9px!important;display:flex!important;align-items:flex-end!important;gap:8px!important;min-height:0!important}
.tl-preview .tl-bottom>div:first-child{flex:1 1 auto!important;min-width:0!important}
.tl-preview .tl-qr{width:110px!important;height:110px!important;margin-left:auto!important;flex:0 0 110px!important;background:#fff!important;padding:4px!important}
.tl-preview .tl-qr svg,.tl-preview .tl-qr canvas{display:block!important;width:100%!important;height:100%!important;max-height:none!important}
.tl-preview .tl-idbox{display:none!important}
.tl-preview .tl-version{text-align:center!important;font-size:7px!important;margin-top:4px!important;line-height:1.1!important}

@media(max-width:700px){
  .tl-modal{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;padding:8px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
  .tl-modal.hidden{display:none!important}
  .tl-modal-card{width:min(94vw,460px)!important;max-width:calc(100vw - 16px)!important;height:auto!important;max-height:calc(100dvh - 16px)!important;padding:10px!important;margin:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .tl-modal-head{width:100%!important;display:flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto!important;margin:0 0 8px!important;padding:0!important}
  .tl-modal-head h2{font-size:20px!important;line-height:1.05!important;flex:1 1 auto!important;margin:0!important}
  .tl-modal-head #tankLabelClose{width:auto!important;min-width:76px!important;height:40px!important;min-height:40px!important;flex:0 0 auto!important;margin:0!important;padding:7px 12px!important}
  .tl-preview{flex:0 0 auto!important;width:min(384px,calc(100vw - 52px),calc((100dvh - 170px) * .6666667))!important;height:auto!important;min-height:0!important;aspect-ratio:2/3!important;margin:0 auto 8px!important;border-radius:4px!important;overflow:hidden!important}
  .tl-preview>.tl-sheet{padding:clamp(7px,2.1vw,14px)!important}
  .tl-preview .tl-tank{font-size:clamp(20px,7vw,34px)!important}
  .tl-preview .tl-account{font-size:clamp(8px,2.7vw,13px)!important}
  .tl-preview .tl-product{font-size:clamp(15px,5.3vw,26px)!important;margin-top:clamp(5px,1.6vw,10px)!important}
  .tl-preview .tl-proof{font-size:clamp(22px,8vw,40px)!important;margin:clamp(4px,1.3vw,8px) 0 clamp(6px,1.8vw,11px)!important}
  .tl-preview .tl-grid{gap:clamp(3px,1vw,7px) clamp(5px,1.5vw,10px)!important}
  .tl-preview .tl-grid span{font-size:clamp(6px,1.7vw,8px)!important}
  .tl-preview .tl-grid strong{font-size:clamp(8px,2.5vw,13px)!important}
  .tl-preview .tl-bottom{font-size:clamp(6px,1.8vw,9px)!important;padding-top:clamp(3px,1vw,6px)!important}
  .tl-preview .tl-qr{width:clamp(62px,20vw,105px)!important;height:clamp(62px,20vw,105px)!important;flex-basis:clamp(62px,20vw,105px)!important}
  .tl-preview .tl-version{font-size:clamp(5px,1.5vw,7px)!important}
  .tl-modal-actions{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;flex:0 0 auto!important;margin:0!important}
  .tl-modal-actions button{width:100%!important;min-width:0!important;height:40px!important;min-height:40px!important;padding:6px!important}
}

/* 2026-09-22 mobile tank QR scanner — hard viewport containment */
@media(max-width:700px){
  .tank-scan-modal{
    position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;
    padding:8px!important;box-sizing:border-box!important;display:flex!important;
    align-items:center!important;justify-content:center!important;overflow:hidden!important;
    z-index:21000!important;
  }
  .tank-scan-dialog{
    box-sizing:border-box!important;width:min(94vw,520px)!important;max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;padding:12px!important;margin:0!important;
    border-radius:12px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;
  }
  .tank-scan-head{
    display:flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto!important;
    width:100%!important;margin:0 0 10px!important;
  }
  .tank-scan-head h2{
    flex:1 1 auto!important;min-width:0!important;margin:0!important;font-size:clamp(22px,7vw,30px)!important;
    line-height:1.05!important;
  }
  .tank-scan-head button{
    flex:0 0 auto!important;width:auto!important;min-width:92px!important;height:40px!important;min-height:40px!important;
    margin:0!important;padding:7px 12px!important;
  }
  .tank-scan-dialog video{
    flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:0!important;
    max-height:calc(100dvh - 190px)!important;aspect-ratio:auto!important;object-fit:cover!important;
    border-radius:9px!important;
  }
  .tank-scan-status{
    flex:0 0 auto!important;margin:10px 0 0!important;font-size:clamp(14px,4vw,18px)!important;
    line-height:1.25!important;
  }
}

/* Mobile pass: navigation visibility + batching final-measurement UOM */
@media (max-width:850px){
  /* Keep the app navigation available while the document scrolls. */
  .topbar{position:sticky!important;top:0!important;z-index:12010!important}
  .sidebar{top:58px!important;bottom:0!important;max-height:calc(100dvh - 58px)!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding-top:10px!important;padding-bottom:18px!important}
  .sidebar nav{padding-bottom:18px!important}

  /* Final measured batch: reserve only a compact unit column so the numeric value remains visible. */
  #batchingView .quantity-uom-control{display:flex!important;width:100%!important}
  #batchingView .quantity-uom-control>input:first-child{flex:1 1 0!important;width:0!important;min-width:0!important}
  #batchingView #batchFinalUom{flex:0 0 68px!important;width:68px!important;min-width:68px!important;max-width:68px!important;padding-left:10px!important;padding-right:24px!important}
}

/* 2026-09-22 mobile batching pass 2 — drawer layering, persistent header, final gross layout */
@media (max-width:850px){
  /* The green app header must remain available throughout long mobile forms. */
  .topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    z-index:13010!important;
  }
  /* Reserve header space once the page is in mobile mode. The software-admin bar
     remains in normal flow and is not allowed to cover the app navigation. */
  .app-layout{padding-top:58px!important}
  body>.platform-org-bar:not(.hidden){margin-top:58px!important;position:relative!important;top:auto!important;z-index:1!important}

  /* Drawer sits above BOTH the app header and Software Admin banner. This prevents
     Tanks/Inventory from being hidden behind either header. */
  .sidebar{
    position:fixed!important;
    top:58px!important;
    left:0!important;
    bottom:0!important;
    z-index:13020!important;
    width:min(300px,78vw)!important;
    max-height:calc(100dvh - 58px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    padding:10px 12px 20px!important;
  }
  .sidebar.open{display:block!important}
  .sidebar nav{display:grid!important;gap:5px!important;padding:0 0 20px!important;margin:0!important}
  .sidebar .nav-item{flex:0 0 auto!important}

  /* Final Gross Weight follows the same mobile pattern as the fields below it:
     complete label first, then the compound value/UOM control on the next line. */
  #batchingView .nested-panel .form-grid>label:has(#batchFinalGrossWeight){
    display:block!important;
    width:100%!important;
    margin:0!important;
  }
  #batchingView .nested-panel .form-grid>label:has(#batchFinalGrossWeight)>#batchFinalAmountLabel,
  #batchingView .nested-panel .form-grid>label:has(#batchFinalGrossWeight)>.required-mark{
    display:inline!important;
  }
  #batchingView .nested-panel .form-grid>label:has(#batchFinalGrossWeight)>.quantity-uom-control{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 58px!important;
    width:100%!important;
    margin:7px 0 0!important;
  }
  #batchingView #batchFinalGrossWeight{
    width:100%!important;
    min-width:0!important;
    grid-column:1!important;
  }
  #batchingView #batchFinalUom{
    width:58px!important;
    min-width:58px!important;
    max-width:58px!important;
    grid-column:2!important;
    padding-left:8px!important;
    padding-right:18px!important;
  }
}

/* 2026-09-22 mobile batching final-measure UOM readability */
@media (max-width: 760px){
  #batchingView .nested-panel .form-grid>label:has(#batchFinalGrossWeight)>.quantity-uom-control{
    grid-template-columns:minmax(0,1fr) 88px!important;
  }
  #batchingView #batchFinalUom{
    width:88px!important;
    min-width:88px!important;
    max-width:88px!important;
    padding-left:12px!important;
    padding-right:30px!important;
    text-overflow:clip!important;
  }
}

/* Desktop Tanks table sizing: prioritize account/product; cap numeric columns. */
@media (min-width: 769px){
  #tankListView #tankTable{width:100%!important;table-layout:fixed!important}
  #tankListView #tankTable th,#tankListView #tankTable td{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  #tankListView #tankTable th:nth-child(1),#tankListView #tankTable td:nth-child(1){width:26%!important;max-width:50ch!important}
  #tankListView #tankTable th:nth-child(2),#tankListView #tankTable td:nth-child(2){width:150px!important;min-width:150px!important}
  #tankListView #tankTable th:nth-child(3),#tankListView #tankTable td:nth-child(3){width:200px!important}
  #tankListView #tankTable th:nth-child(4),#tankListView #tankTable td:nth-child(4){width:118px!important}
  #tankListView #tankTable th:nth-child(5),#tankListView #tankTable td:nth-child(5){width:70px!important;max-width:70px!important}
  #tankListView #tankTable th:nth-child(6),#tankListView #tankTable td:nth-child(6),
  #tankListView #tankTable th:nth-child(7),#tankListView #tankTable td:nth-child(7),
  #tankListView #tankTable th:nth-child(8),#tankListView #tankTable td:nth-child(8){width:88px!important;max-width:88px!important}
  #tankListView #tankTable th:nth-child(9),#tankListView #tankTable td:nth-child(9){width:82px!important;max-width:82px!important}
  #tankListView #tankTable td .cell-value{display:block!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
}

/* 2026-09-22 desktop tanks: preserve complete account badges and cap tank identifiers. */
@media (min-width:769px){
 #tankListView #tankTable td:nth-child(2){overflow:visible!important;text-overflow:clip!important}
 #tankListView #tankTable td:nth-child(2) .cell-value{overflow:visible!important;text-overflow:clip!important}
 #tankListView #tankTable td:nth-child(2) .account-badge,#tankListView #tankTable td:nth-child(2) .badge{max-width:none!important;white-space:nowrap!important}
}

/* 2026-09-22 mobile Inventory: measurement controls get a full row below their labels. */
@media (max-width:760px){
  #inventoryView .inventory-input-table td[data-label="Measured amount"],
  #inventoryView .inventory-input-table td[data-label="Measured proof"]{
    display:block!important;
    width:100%!important;
    padding:12px 10px!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured amount"]::before,
  #inventoryView .inventory-input-table td[data-label="Measured proof"]::before{
    display:block!important;
    width:100%!important;
    margin:0 0 8px!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured amount"] .cell-value,
  #inventoryView .inventory-input-table td[data-label="Measured proof"] .cell-value{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    overflow:visible!important;
    text-align:left!important;
    white-space:normal!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured amount"] .measure-input,
  #inventoryView .inventory-input-table td[data-label="Measured amount"] .input-with-unit{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 88px!important;
    width:100%!important;
    max-width:none!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured amount"] .measure-input>select,
  #inventoryView .inventory-input-table td[data-label="Measured amount"] .input-with-unit>select{
    width:88px!important;
    min-width:88px!important;
    max-width:88px!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured proof"] .invMeasuredProof,
  #inventoryView .inventory-input-table td[data-label="Measured proof"] input{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    box-sizing:border-box!important;
    text-align:right!important;
  }
}

/* 2026-09-22 mobile Inventory: Measured Amount uses the same full-row layout as Measured Proof. */
@media (max-width:760px){
  #inventoryView .inventory-input-table td[data-label="Measured Amount"]{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    padding:12px 10px!important;
    box-sizing:border-box!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured Amount"]::before{
    display:block!important;
    width:100%!important;
    margin:0 0 8px!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured Amount"] .inventory-measure-label{
    display:block!important;
    width:100%!important;
    height:auto!important;
    margin:0 0 8px!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured Amount"] .inventory-quantity-uom{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 88px!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
  #inventoryView .inventory-input-table td[data-label="Measured Amount"] .invMeasuredQuantity{width:100%!important;min-width:0!important;}
  #inventoryView .inventory-input-table td[data-label="Measured Amount"] .invMeasuredUom{width:88px!important;min-width:88px!important;max-width:88px!important;}
}

/* Mobile Recipes: keep per-ingredient Remove action compact instead of full-width. */
@media (max-width: 720px){
  #recipesView .recipe-ing-head .ri-remove{
    width:auto!important;
    min-width:96px!important;
    max-width:120px!important;
    min-height:36px!important;
    height:36px!important;
    padding:6px 14px!important;
    flex:0 0 auto!important;
  }
}

/* 2026-09-22 Recipes: keep ingredient Remove button compact.
   Deliberately not breakpoint-scoped so the generic mobile .secondary-button{width:100%}
   rule can never stretch this action across the ingredient header. */
#recipesView .recipe-ing .recipe-ing-head > button.ri-remove.secondary-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:104px!important;
  min-width:104px!important;
  max-width:104px!important;
  height:36px!important;
  min-height:36px!important;
  padding:6px 12px!important;
  margin:0!important;
  flex:0 0 104px!important;
}

/* 2026-09-22 mobile Recipes: compact ingredient regulatory controls. */
@media (max-width:720px){
  #recipesView .ri-regulatory-fields{
    margin:10px 0 8px!important;
    padding:12px!important;
  }
  #recipesView .ri-regulatory-fields>strong{
    margin-bottom:8px!important;
    line-height:1.2!important;
  }
  #recipesView .ri-regulatory-checks{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin:0 0 10px!important;
  }
  #recipesView .ri-regulatory-checks label{
    min-height:34px!important;
    margin:0!important;
    padding:0!important;
    gap:8px!important;
    line-height:1.2!important;
  }
  #recipesView .ri-regulatory-checks input[type="checkbox"]{
    width:22px!important;
    height:22px!important;
    min-width:22px!important;
    flex:0 0 22px!important;
  }
  #recipesView .ri-regulatory-grid{
    gap:9px!important;
  }
  #recipesView .ri-regulatory-grid label{
    margin:0!important;
  }
  #recipesView .ri-regulatory-grid input,
  #recipesView .ri-regulatory-grid select{
    margin-top:4px!important;
    min-height:42px!important;
    height:42px!important;
  }
  #recipesView .ri-partii-allocation-wrap{
    margin-top:0!important;
  }
  #recipesView .ri-regulatory-fields .help-text,
  #recipesView .ri-regulatory-fields .field-help{
    margin-top:5px!important;
    margin-bottom:0!important;
    line-height:1.3!important;
  }
}

/* 2026-09-22 mobile global viewport/header cleanup. */
@media (max-width:850px){
  html,body{width:100%;max-width:100%;overflow-x:hidden!important;}
  .topbar{
    left:0!important;right:0!important;width:100%!important;max-width:100vw!important;
    box-sizing:border-box!important;
  }
  .topbar-brand{min-width:0!important;flex:1 1 auto!important;justify-content:center!important;}
  .topbar .user{flex:0 0 auto!important;min-width:0!important;}
  .topbar .user form{margin:0!important;min-width:0!important;}
  .topbar .user .linkbtn{white-space:nowrap!important;padding-left:6px!important;padding-right:0!important;}
  body>.platform-org-bar:not(.hidden){
    width:100%!important;max-width:100vw!important;min-width:0!important;
    box-sizing:border-box!important;margin-left:0!important;margin-right:0!important;
    padding:8px 12px!important;gap:8px!important;
    display:grid!important;grid-template-columns:auto auto minmax(0,1fr)!important;
    align-items:center!important;
  }
  body>.platform-org-bar:not(.hidden) strong,
  body>.platform-org-bar:not(.hidden) span{min-width:0!important;}
  body>.platform-org-bar:not(.hidden) select{
    width:100%!important;min-width:0!important;max-width:100%!important;
    box-sizing:border-box!important;
  }
  .app-layout,.main-content{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;}
}

/* 2026-09-23 TIB mobile tooltip viewport containment */
@media(max-width:760px){
  .tib-view .field-help-tooltip{position:fixed!important;right:auto!important;bottom:auto!important;max-width:calc(100vw - 24px)!important;box-sizing:border-box!important;z-index:5000!important;}
}

/* 2026-09-23 Tax Paid compact bottled-lot cards */
#taxPaidView .tax-paid-lines{gap:8px!important;margin:8px 0!important;}
#taxPaidView .tax-paid-line{padding:10px!important;}
#taxPaidView .tax-paid-line-grid{gap:8px!important;align-items:end!important;}
#taxPaidView .tax-paid-remove-cell{align-self:end!important;justify-content:flex-end!important;min-width:82px!important;}
#taxPaidView .tax-paid-remove-spacer{display:none!important;height:0!important;min-height:0!important;margin:0!important;}
#taxPaidView .tax-paid-remove-cell .taxPaidRemove{position:static!important;top:auto!important;margin:0!important;height:42px!important;min-height:42px!important;}
@media(max-width:820px){
  #taxPaidView .tax-paid-line{padding:10px!important;}
  #taxPaidView .tax-paid-line-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important;}
  #taxPaidView .tax-paid-line-grid>label:first-child{grid-column:1/-1!important;}
  #taxPaidView .tax-paid-line-grid label{margin:0!important;}
  #taxPaidView .tax-paid-line-grid input,
  #taxPaidView .tax-paid-line-grid select,
  #taxPaidView .tax-paid-line-grid .search-select-trigger{min-height:42px!important;height:42px!important;}
  #taxPaidView .tax-paid-remove-cell{grid-column:1/-1!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;min-width:0!important;margin-top:0!important;}
  #taxPaidView .tax-paid-remove-cell .taxPaidRemove{width:auto!important;min-width:112px!important;height:38px!important;min-height:38px!important;padding:6px 16px!important;}
}

/* Case labels / tax-paid case entry */
.case-label-panel{margin-top:14px}.case-label-actions{display:flex;gap:10px;flex-wrap:wrap}.case-label-actions .secondary-button{width:auto}.case-label-admin-card{margin-bottom:18px}
.tax-paid-line-grid{align-items:end}.tax-paid-line-grid .tax-paid-remove-cell{align-self:end}
@media(max-width:700px){.case-label-panel{padding:14px!important}.case-label-panel .section-heading{margin-bottom:8px!important}.case-label-actions{margin-top:8px!important}.tax-paid-line-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}.tax-paid-line-grid>label:first-child{grid-column:1/-1}.tax-paid-line-grid .tax-paid-remove-cell{grid-column:1/-1!important}.tax-paid-line-grid .taxPaidRemove{width:auto!important;min-width:104px!important}.tax-paid-remove-spacer{display:none!important}.tax-paid-view .section-heading{align-items:flex-start!important;gap:10px!important;flex-wrap:wrap}.tax-paid-view #taxPaidScanCase{width:auto!important}}

/* 2026-09-23 Case label settings: Plant/Regulatory help + preview */
.case-label-field-title{display:flex;align-items:center;gap:5px;min-height:22px}
.case-help{position:relative;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:1px solid #9aa6a0;border-radius:50%;font-size:11px;line-height:1;color:#31443a;background:#fff;cursor:help;flex:0 0 auto}
.case-help-tip{display:none;position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);z-index:6000;width:290px;max-width:calc(100vw - 32px);padding:10px 11px;border:1px solid #aeb8b2;border-radius:7px;background:#fff;color:#17211c;font-size:12px;font-weight:400;line-height:1.4;box-shadow:0 6px 18px rgba(0,0,0,.18);pointer-events:none}
.case-help:hover .case-help-tip,.case-help:focus .case-help-tip{display:block}
.case-label-admin-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.case-label-preview-panel{margin-top:16px;padding:16px;border:1px solid #ccd5d0;border-radius:9px;background:#f7faf8;overflow:auto}
.case-preview-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.case-preview-sheet{display:grid;align-content:start;width:max-content;max-width:none;padding:16px;background:#fff;border:1px solid #adb8b2;box-shadow:0 3px 12px rgba(0,0,0,.08)}
.case-preview-label{border:1px dashed #52645a;background:#fff;padding:10px;display:grid;grid-template-columns:minmax(0,1fr) 64px;gap:8px;overflow:hidden;color:#111}
.case-preview-product{font-weight:800;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.case-preview-serial{font-size:19px;font-weight:800;margin:2px 0 4px}
.case-preview-meta{font-size:10px;line-height:1.3}
.case-preview-qr{width:60px;height:60px;border:3px solid #111;background:repeating-linear-gradient(45deg,#111 0 4px,#fff 4px 8px);align-self:start}
.case-preview-note{font-size:12px;color:#58645e;margin-top:10px}
@media(max-width:700px){.case-help-tip{position:fixed;left:16px!important;right:16px!important;bottom:auto!important;top:22%;transform:none!important;width:auto!important;max-width:none!important}.case-label-admin-actions>*{width:100%!important}.case-label-preview-panel{padding:10px}.case-preview-sheet{transform-origin:top left}}

.case-preview-page{display:inline-block;background:#fff;border:2px solid #9aa6a0;box-shadow:0 2px 10px rgba(0,0,0,.10);min-width:max-content}

.case-sheet-start-modal{position:fixed;inset:0;z-index:10060;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:20px}
.case-sheet-start-card{background:#fff;border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.24);width:min(620px,100%);max-height:90vh;overflow:auto;padding:22px}
.case-sheet-start-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.case-sheet-start-head h3{margin:0 0 6px}.case-sheet-start-head p{margin:0;color:#59636e;line-height:1.4}
.case-sheet-position-key{display:grid;gap:10px}.case-sheet-position{min-height:62px;border:1px solid #aab5ae;background:#fff;border-radius:9px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1.15rem}.case-sheet-position:hover,.case-sheet-position:focus{outline:2px solid #174d37;outline-offset:1px}.case-sheet-start-foot{margin-top:14px;color:#59636e;font-size:.9rem}
.case-preview-label{position:relative}.case-preview-position{position:absolute;top:4px;right:6px;font-size:11px;font-weight:800;color:#6b7280}
@media(max-width:700px){.case-sheet-start-modal{padding:10px}.case-sheet-start-card{padding:16px}.case-sheet-start-head{flex-direction:column}.case-sheet-start-head .secondary-button{width:auto}.case-sheet-position-key{gap:7px}.case-sheet-position{min-height:52px}}

/* Case-label printable safe zone: intentionally keeps critical content away from
   physical label edges so common rounded-corner stock does not clip text/QR. */
.case-preview-label{padding:21px!important;overflow:hidden}
.case-preview-product{font-size:clamp(10px,1.5vw,15px)!important;line-height:1.08!important;overflow-wrap:anywhere}
.case-preview-serial{font-size:clamp(11px,1.7vw,17px)!important;line-height:1.08!important;overflow-wrap:anywhere}
.case-preview-meta{font-size:clamp(8px,1.1vw,11px)!important;line-height:1.2!important}
/* Barrel Management */
.barrel-warehouse{margin:0 0 22px}.barrel-row{border-top:1px solid #ddd;padding:10px 0}.barrel-bays{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}.barrel-bay{border:1px solid #ccc;border-radius:8px;padding:8px;min-width:150px}.barrel-bay>span{display:block;font-size:12px;font-weight:700;margin-bottom:6px}.barrel-bay button{display:flex;width:100%;justify-content:space-between;gap:8px;align-items:center;margin:4px 0;padding:7px;border:1px solid #aaa;background:#fff;border-radius:6px;text-align:left}.barrel-bay button small{font-size:10px}.barrel-due{display:flex;width:100%;justify-content:space-between;padding:10px;border:0;border-bottom:1px solid #ddd;background:transparent;text-align:left}.barrel-log{padding:10px 0;border-bottom:1px solid #ddd}.clickable-row{cursor:pointer}.clickable-row:hover{background:rgba(0,0,0,.04)}
@media(max-width:700px){.barrel-bays{display:block}.barrel-bay{margin-bottom:8px}.barrel-due{display:block}.barrel-due span{display:block;margin-top:3px}}


/* Barrel Management modal is intentionally independent of Reports (.rr-modal).
   Report isolation hides .rr-modal outside Reports, so Barrel Management uses
   its own overlay class. */
.barrel-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10050;
  padding:20px;
}
.barrel-modal.hidden{display:none!important}
.barrel-modal .rr-modal-card{
  background:#fff;
  width:100%;
  max-height:85vh;
  overflow:auto;
  border-radius:8px;
  padding:18px;
}
@media(max-width:700px){
  .barrel-modal{padding:10px}
  .barrel-modal .rr-modal-card{max-height:92vh;padding:14px}
}

/* Barrel rackhouse editor */
.rackhouse-active-label{display:flex!important;align-items:center;gap:8px;justify-content:flex-start}.rackhouse-active-label input{width:auto!important;margin:0!important}

.barrel-modal-titleline{display:flex;align-items:center;gap:18px}.barrel-modal-titleline h3{margin:0}.rackhouse-active-label{display:inline-flex!important;align-items:center!important;gap:6px!important;font-weight:700!important}.rackhouse-active-label input{width:16px!important;height:16px!important;margin:0!important}.barrel-rule-card{border:1px solid #d9dee3;border-radius:8px;padding:12px;margin:10px 0}.barrel-rule-card .section-heading{margin:0}

/* Barrel modal header Active control: keep label and checkbox on one horizontal line. */
.barrel-modal-titleline .rackhouse-active-label{display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;margin:0!important;white-space:nowrap!important;}
.barrel-modal-titleline .rackhouse-active-label span{display:inline!important;margin:0!important;}
.barrel-modal-titleline .rackhouse-active-label input[type="checkbox"]{display:inline-block!important;position:static!important;flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;}

/* Barrel Management modal form controls — keep native selects contained and legible. */
.barrel-modal .form-grid>label{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:6px!important;
  margin:0!important;
  min-width:0!important;
}
.barrel-modal .form-grid>label>input,
.barrel-modal .form-grid>label>select,
.barrel-modal .form-grid>label>textarea{
  display:block!important;
  position:static!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
}
.barrel-modal .form-grid>label>select{
  height:42px!important;
  min-height:42px!important;
  padding:8px 34px 8px 10px!important;
  border:1px solid #b8c3bb!important;
  border-radius:7px!important;
  background-color:#fff!important;
  color:#17211b!important;
  font:inherit!important;
  line-height:1.2!important;
  appearance:auto!important;
  -webkit-appearance:menulist!important;
  overflow:hidden!important;
}
.barrel-modal .form-grid>label>select option{
  position:static!important;
  display:block!important;
  font:inherit!important;
  line-height:normal!important;
}
.barrel-modal .form-grid>label>.field-help{
  display:block!important;
  position:static!important;
  width:100%!important;
  min-height:0!important;
  margin:0!important;
  color:#68746c!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.35!important;
}

/* 2026-09-25 bulk tank/barrel actions */
.tank-bulk-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}
.bulk-select-head,.bulk-select-cell{width:30px!important;min-width:30px!important;max-width:30px!important;padding-left:6px!important;padding-right:4px!important;text-align:center!important}
.bulk-select-head input,.bulk-select-cell input{width:14px!important;height:14px!important;min-width:14px!important;margin:0!important;vertical-align:middle}
@media (max-width:760px){.tank-bulk-actions{width:100%;justify-content:flex-start}.bulk-select-cell{display:table-cell!important}}


/* 2026-09-25 authoritative tank-list account coloring after bulk-select column. */
#tankTableBody tr.tank-list-fermentation>td{background:#f4fbff!important}
#tankTableBody tr.tank-list-processing>td{background:#fffbf3!important}
#tankTableBody tr.tank-list-production>td{background:#f9f7ff!important}
#tankTableBody tr.tank-list-storage>td{background:#f5fcf8!important}
#tankTableBody tr.tank-list-fermentation>td:first-child{box-shadow:inset 5px 0 0 #79b7df!important}
#tankTableBody tr.tank-list-processing>td:first-child{box-shadow:inset 5px 0 0 #dda84e!important}
#tankTableBody tr.tank-list-production>td:first-child{box-shadow:inset 5px 0 0 #9b8fdd!important}
#tankTableBody tr.tank-list-storage>td:first-child{box-shadow:inset 5px 0 0 #75b891!important}
#batchingView .batch-source-preview{margin-top:9px;padding:8px 10px;border:1px solid #e0e6e2;border-radius:7px;background:#f7f9f7;color:#46534c;line-height:1.45}
\n\n/* 2026-09-25 tank bulk layout + source-gauge integrity correction */
/* The bulk checkbox is a utility column, not a data column. These rules intentionally
   override the pre-bulk nth-child widths above. */
#tankListView #tankTable th:nth-child(1),#tankListView #tankTable td:nth-child(1){width:28px!important;min-width:28px!important;max-width:28px!important;padding-left:5px!important;padding-right:3px!important;text-align:center!important}
#tankListView #tankTable th:nth-child(2),#tankListView #tankTable td:nth-child(2){width:26%!important;min-width:0!important;max-width:50ch!important}
#tankListView #tankTable th:nth-child(3),#tankListView #tankTable td:nth-child(3){width:150px!important;min-width:120px!important;max-width:150px!important}
#tankListView #tankTable th:nth-child(4),#tankListView #tankTable td:nth-child(4){width:200px!important;min-width:0!important;max-width:200px!important}
#tankListView #tankTable th:nth-child(5),#tankListView #tankTable td:nth-child(5){width:118px!important;min-width:0!important;max-width:118px!important}
#tankListView #tankTable th:nth-child(6),#tankListView #tankTable td:nth-child(6){width:70px!important;max-width:70px!important}
#tankListView #tankTable th:nth-child(7),#tankListView #tankTable td:nth-child(7),
#tankListView #tankTable th:nth-child(8),#tankListView #tankTable td:nth-child(8),
#tankListView #tankTable th:nth-child(9),#tankListView #tankTable td:nth-child(9){width:88px!important;max-width:88px!important}
#tankListView #tankTable th:nth-child(10),#tankListView #tankTable td:nth-child(10){width:82px!important;max-width:82px!important}
#tankListView #tankTable .bulk-select-head,#tankListView #tankTable .bulk-select-cell{box-sizing:border-box!important}
#tankListView #tankTable .bulk-select-head input,#tankListView #tankTable .bulk-select-cell input{display:inline-block!important;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;margin:0!important;padding:0!important}
/* Selected source tanks are gauge-controlled: proof and density live in the tank info line,
   not in editable ingredient fields. */
#batchingView .batch-ingredient-row .bi-proof-wrap.hidden,
#batchingView .batch-ingredient-row .bi-density-wrap.hidden{display:none!important}


/* 2026-09-25 final tank bulk selector width lock. */
#tankListView #tankTable col.tank-select-col{width:28px!important;min-width:28px!important;max-width:28px!important}
#tankListView #tankTable th.bulk-select-head,#tankListView #tankTable td.bulk-select-cell{width:28px!important;min-width:28px!important;max-width:28px!important;padding-left:4px!important;padding-right:4px!important}

/* Multi-destination tank/barrel fill */
.multi-fill-rows{display:flex;flex-direction:column;gap:10px;margin:14px 0}
.multi-fill-row{display:grid!important;grid-template-columns:minmax(260px,1.5fr) minmax(210px,1fr) auto;gap:12px;align-items:end;margin:0!important}
.multi-fill-row>label,.multi-fill-destination>label{display:block!important;margin:0!important}
.multi-fill-row select,.multi-fill-row input{width:100%}
.multi-fill-remove{align-self:end;min-height:42px}
.multi-fill-preview-list{display:flex;flex-direction:column;gap:6px;margin:12px 0}
.multi-fill-preview-list>div{display:flex;justify-content:space-between;gap:18px;padding:7px 0;border-bottom:1px solid #e4e8e5}
@media(max-width:760px){.multi-fill-row{grid-template-columns:1fr}.multi-fill-remove{justify-self:start}.multi-fill-preview-list>div{display:block}}

/* Multi-destination fill: standard searchable/color-coded tank selector + QR */
.multi-fill-selector-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:stretch!important;width:100%!important;margin-top:5px}
.multi-fill-selector-row>.tank-combobox{min-width:0!important;width:100%!important;position:relative}
.multi-fill-selector-row>.multi-fill-qr{width:auto!important;min-width:48px!important;height:42px!important;margin:0!important;padding:0 12px!important;align-self:start}
.multi-fill-selector-row .tank-combo-panel{z-index:5000!important;background:#fff!important}
.multi-fill-selector-row .tank-combo-toolbar,.multi-fill-selector-row .tank-combo-options{background:#fff!important}
.multi-fill-selector-row .tank-combo-option.acct-fermentation{background:var(--acct-fermentation-bg)!important;border-left-color:var(--acct-fermentation-border)!important}
.multi-fill-selector-row .tank-combo-option.acct-processing{background:var(--acct-processing-bg)!important;border-left-color:var(--acct-processing-border)!important}
.multi-fill-selector-row .tank-combo-option.acct-production{background:var(--acct-production-bg)!important;border-left-color:var(--acct-production-border)!important}
.multi-fill-selector-row .tank-combo-option.acct-storage{background:var(--acct-storage-bg)!important;border-left-color:var(--acct-storage-border)!important}
@media(max-width:760px){.multi-fill-selector-row{grid-template-columns:minmax(0,1fr) auto!important}}

/* Multi-destination batching */
.batch-additional-destinations{grid-column:1/-1;display:grid;gap:10px}
.batch-destination-split-row{display:grid;grid-template-columns:minmax(260px,1fr) minmax(150px,220px) auto;gap:10px;align-items:end;padding:12px;border:1px solid var(--border,#d7dce2);border-radius:10px;background:var(--panel,#fff)}
.batch-destination-split-row .tank-selector-shell{min-width:0}
.batch-destination-split-row .batch-split-remove{margin-bottom:1px}
.batch-multi-destination-actions{display:flex;align-items:end}
@media(max-width:760px){.batch-destination-split-row{grid-template-columns:1fr}.batch-destination-split-row .batch-split-remove{width:100%}}

/* 2026-09-25 Batching: final measured output is recorded per destination tank. */
#batchingView .batch-final-destinations{display:grid;gap:14px}
#batchingView .batch-final-destination-row{border:1px solid var(--border,#d6ddd9);border-radius:8px;padding:12px;background:var(--panel-bg,#fff)}
#batchingView .batch-final-destination-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
#batchingView .batch-final-destination-heading h3{margin:0;font-size:1rem}
#batchingView .batch-final-destination-grid{align-items:end}
#batchingView .batch-destination-code{background:#f5f7f6}
#batchingView .batch-final-measured-section>.section-heading{align-items:flex-start;margin-bottom:12px}

/* 2026-09-25: Tank name must remain inside its column after bulk-select column was added. */
#tankListView #tankTable td:nth-child(2),
#tankListView #tankTable td:nth-child(2) .cell-value{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  min-width:0!important;
}

/* 2026-09-25 Barrel Management: field explanations use standard subdued help text. */
#barrelModal .barrel-field-note{
  display:block;
  margin:5px 0 0;
  color:#68746c;
  font-size:13px;
  line-height:1.4;
  font-weight:400;
}

/* 2026-09-25 Rackhouse Map — floor/level operational map */
#barrelMapPanel{overflow:hidden}
.rackmap-toolbar{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;margin-bottom:12px}
.rackmap-toolbar>label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;min-width:120px}
.rackmap-toolbar select,.rackmap-toolbar input[type="number"]{height:38px;border:1px solid #b9c2cc;border-radius:7px;background:#fff;padding:0 10px;font:inherit;color:#152238}
.rackmap-toolbar .rackmap-check{display:flex;flex-direction:row;align-items:center;gap:7px;min-width:auto;height:38px;padding:0 4px;white-space:nowrap}
.rackmap-toolbar .rackmap-check input{width:16px;height:16px;margin:0}
.rackmap-toolbar .rackmap-days{display:grid;grid-template-columns:auto 64px auto;grid-template-rows:auto 38px;column-gap:6px;align-items:center;min-width:auto}
.rackmap-toolbar .rackmap-days>span{grid-column:3;grid-row:2;font-weight:400}
.rackmap-toolbar .rackmap-days>input{grid-column:2;grid-row:2;width:64px;padding:0 6px}
.rackmap-summary{padding:9px 11px;margin:0 0 10px;border:1px solid #d9e0e6;border-radius:7px;background:#f8fafb;font-size:13px;color:#4b5563}
.rackmap-summary strong{color:#152238}
.rackmap-legend{display:flex;flex-wrap:wrap;gap:7px 12px;align-items:center;margin:0 0 12px;padding:8px 10px;border:1px solid #e0e5ea;border-radius:7px;background:#fff}
.rackmap-legend-item{display:inline-flex;flex-direction:row!important;align-items:center!important;gap:6px!important;font-size:12px!important;font-weight:600!important;margin:0!important;min-width:0!important}
.rackmap-legend-item input[type="color"]{width:26px!important;height:22px!important;min-width:26px!important;padding:1px!important;border:1px solid #aeb7c0!important;border-radius:4px!important;background:#fff!important;cursor:pointer}
.rackmap-grid-wrap{width:100%;overflow:auto;border:1px solid #d8dee5;border-radius:8px;background:#fff}
.rackmap-grid{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;table-layout:fixed}
.rackmap-grid th,.rackmap-grid td{border-right:1px solid #dde3e8;border-bottom:1px solid #dde3e8;vertical-align:top}
.rackmap-grid thead th{position:sticky;top:0;z-index:3;background:#eef3f6;padding:8px 10px;text-align:center;font-size:12px;min-width:165px}
.rackmap-grid .rackmap-rowhead{position:sticky;left:0;z-index:2;min-width:52px!important;width:52px!important;background:#eef3f6;text-align:center;padding:10px 6px;font-size:13px}
.rackmap-grid thead .rackmap-rowhead{z-index:4}
.rackmap-grid tr:last-child th,.rackmap-grid tr:last-child td{border-bottom:0}
.rackmap-grid th:last-child,.rackmap-grid td:last-child{border-right:0}
.rackmap-bay{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:5px;padding:6px;min-width:165px}
.rackmap-slot{position:relative;min-height:82px;border:1px dashed #cbd3da;border-radius:7px;padding:7px;text-align:left;overflow:hidden}
.rackmap-slot.empty{display:flex;align-items:flex-start;justify-content:flex-end;background:#fafbfc;color:#a0a8b0;font-size:10px}
button.rackmap-slot.occupied{display:flex;flex-direction:column;gap:2px;width:100%;border:1px solid rgba(20,34,56,.20);background:var(--barrel-bg,#fff);color:#152238;cursor:pointer;box-shadow:none;font:inherit}
button.rackmap-slot.occupied:hover{filter:brightness(.97);box-shadow:0 1px 4px rgba(0,0,0,.12)}
button.rackmap-slot.occupied.sample-soon,button.rackmap-slot.occupied.sample-due{box-shadow:inset 0 0 0 4px var(--sample-color)}
.rackmap-slot strong{font-size:12px;line-height:1.15;padding-right:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.rackmap-slot>span:not(.rackmap-pos){font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.rackmap-slot small{font-size:9px;line-height:1.25;color:#59636e;margin-top:auto}
.rackmap-pos{position:absolute;right:5px;top:4px;font-size:9px!important;font-weight:700;opacity:.6}
.rackmap-selected{position:absolute;right:5px;bottom:4px;display:flex;width:17px;height:17px;border-radius:50%;align-items:center;justify-content:center;background:#153f2e;color:#fff;font-style:normal;font-size:11px}
@media(max-width:700px){.rackmap-toolbar>label{min-width:calc(50% - 8px)}.rackmap-toolbar .rackmap-check{min-width:100%}.rackmap-grid thead th{min-width:145px}.rackmap-bay{min-width:145px;grid-template-columns:1fr}.rackmap-slot{min-height:70px}}

/* Rackhouse Map custom color-rule editor */
.rackmap-presets{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 12px}
.rackmap-rule-head{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.rackmap-rule-list{display:grid;gap:7px;width:100%}
.rackmap-rule{display:grid;grid-template-columns:20px 28px minmax(180px,1fr) auto auto;gap:8px;align-items:center;padding:7px 9px;border:1px solid #d8dee4;border-radius:7px;background:#fff}
.rackmap-rule.is-off{opacity:.55}
.rackmap-rule small{display:block;color:#667085;font-weight:400;margin-top:2px}
.rackmap-swatch{display:block;width:24px;height:24px;border-radius:5px;border:1px solid rgba(0,0,0,.18)}
.rackmap-condition{display:grid;grid-template-columns:minmax(150px,1fr) 110px minmax(150px,1fr) 40px;gap:8px;align-items:center;margin:8px 0}
.rackmap-toolbar input[type="color"]{width:54px;min-width:54px;height:38px;padding:3px}
@media(max-width:700px){.rackmap-rule{grid-template-columns:20px 28px 1fr}.rackmap-rule button{grid-column:auto}.rackmap-condition{grid-template-columns:1fr 90px}.rackmap-condition input{grid-column:1/-1}}

/* 2026-09-26 Rackhouse Map filter editor alignment + toolbar alignment */
.rackmap-toolbar{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(120px,max-content));
  gap:12px 14px!important;
  align-items:end!important;
}
.rackmap-toolbar>label{margin:0!important;align-self:end!important}
.rackmap-toolbar>button{height:38px!important;align-self:end!important;margin:0!important}
.rackmap-toolbar .rackmap-days{display:grid!important;grid-template-columns:64px auto!important;grid-template-rows:auto 38px!important;column-gap:7px!important;align-items:center!important}
.rackmap-toolbar .rackmap-days::before{content:'Due soon';grid-column:1/-1;grid-row:1;font-size:12px;font-weight:700}
.rackmap-toolbar .rackmap-days>input{grid-column:1!important;grid-row:2!important;width:64px!important;height:38px!important;margin:0!important}
.rackmap-toolbar .rackmap-days>span{grid-column:2!important;grid-row:2!important;align-self:center!important}
.rackmap-condition{
  display:grid!important;
  grid-template-columns:minmax(180px,1.15fr) 110px minmax(220px,1.15fr) 40px!important;
  gap:8px!important;
  align-items:stretch!important;
  margin:8px 0!important;
}
.rackmap-condition>select,
.rackmap-condition>input,
.rackmap-condition .rackmap-condition-value>select,
.rackmap-condition .rackmap-condition-value>input,
.rackmap-condition>.rackmap-remove-cond{
  height:38px!important;
  min-height:38px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.rackmap-condition .rackmap-condition-value{display:block!important;min-width:0!important;height:38px!important}
.rackmap-condition .rackmap-condition-value>select,
.rackmap-condition .rackmap-condition-value>input{width:100%!important}
.rackmap-condition>.rackmap-remove-cond{width:40px!important;padding:0!important;align-self:stretch!important}
@media(max-width:1100px){.rackmap-toolbar{grid-template-columns:repeat(3,minmax(120px,1fr))!important}}
@media(max-width:700px){.rackmap-toolbar{grid-template-columns:1fr 1fr!important}.rackmap-condition{grid-template-columns:1fr 90px!important}.rackmap-condition .rackmap-condition-value{grid-column:1/-1!important}.rackmap-condition>.rackmap-remove-cond{grid-column:2!important}}

/* Rackhouse Map toolbar alignment + saved schemes */
.rackmap-toolbar{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(120px,max-content))!important;
  gap:12px 14px!important;
  align-items:end!important;
}
.rackmap-toolbar>label{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-end!important;
  gap:5px!important;
  height:100%!important;
  margin:0!important;
  align-self:stretch!important;
}
.rackmap-toolbar>button{height:38px!important;align-self:end!important;margin:0!important}
.rackmap-toolbar .rackmap-days{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  min-width:118px!important;
}
.rackmap-toolbar .rackmap-days::before{content:none!important}
.rackmap-control-label{display:block!important;font-size:12px!important;font-weight:700!important;line-height:1.2!important}
.rackmap-days-control{display:flex!important;align-items:center!important;gap:7px!important;height:38px!important}
.rackmap-days-control input{width:64px!important;height:38px!important;margin:0!important;padding:0 8px!important}
.rackmap-days-control span{font-weight:400!important;white-space:nowrap!important}
.rackmap-saved-schemes{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.rackmap-saved-schemes .active{font-weight:700;box-shadow:inset 0 -2px 0 currentColor}
@media(max-width:1100px){.rackmap-toolbar{grid-template-columns:repeat(3,minmax(120px,1fr))!important}}
@media(max-width:700px){.rackmap-toolbar{grid-template-columns:1fr 1fr!important}}

/* 2026-09-26 Rackhouse Map control alignment — authoritative */
.rackmap-toolbar{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(138px,1fr))!important;
  gap:12px 14px!important;
  align-items:end!important;
}
.rackmap-toolbar>label{
  display:grid!important;
  grid-template-rows:18px 38px!important;
  gap:5px!important;
  height:auto!important;
  min-width:0!important;
  margin:0!important;
  align-self:end!important;
}
.rackmap-toolbar>label>.rackmap-control-label,
.rackmap-toolbar>label>span:first-child{
  display:flex!important;
  align-items:flex-end!important;
  height:18px!important;
  margin:0!important;
  font-size:12px!important;
  line-height:18px!important;
  font-weight:700!important;
}
.rackmap-toolbar>label>select,
.rackmap-toolbar>label>input,
.rackmap-toolbar .rackmap-days-control{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  box-sizing:border-box!important;
  margin:0!important;
}
.rackmap-toolbar .rackmap-default-color input[type="color"],
.rackmap-toolbar>label>input[type="color"]{
  width:100%!important;
  min-width:138px!important;
  height:38px!important;
  padding:3px!important;
}
.rackmap-toolbar .rackmap-days{min-width:0!important}
.rackmap-toolbar .rackmap-days-control{
  display:grid!important;
  grid-template-columns:minmax(64px,1fr) auto!important;
  gap:7px!important;
  align-items:center!important;
}
.rackmap-toolbar .rackmap-days-control input{
  width:100%!important;
  min-width:64px!important;
  height:38px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.rackmap-toolbar>button{height:38px!important;margin:0!important;align-self:end!important}
@media(max-width:1100px){.rackmap-toolbar{grid-template-columns:repeat(3,minmax(138px,1fr))!important}}
@media(max-width:700px){.rackmap-toolbar{grid-template-columns:1fr 1fr!important}}

/* Rackhouse Map toolbar final alignment: one consistent label row + full-width controls. */
#barrelMap .rackmap-toolbar{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(150px,1fr))!important;
  gap:12px 14px!important;
  align-items:end!important;
}
#barrelMap .rackmap-toolbar>label{
  display:grid!important;
  grid-template-rows:18px 38px!important;
  gap:5px!important;
  min-width:0!important;
  margin:0!important;
  align-self:end!important;
}
#barrelMap .rackmap-toolbar>label>span:first-child{
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:18px!important;
  white-space:nowrap!important;
}
#barrelMap .rackmap-toolbar>label>select,
#barrelMap .rackmap-toolbar>label>input{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
#barrelMap .rackmap-toolbar .rackmap-default-color input[type="color"]{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  padding:4px!important;
}
#barrelMap .rackmap-toolbar>button{height:38px!important;margin:0!important;align-self:end!important}
@media(max-width:1100px){#barrelMap .rackmap-toolbar{grid-template-columns:repeat(3,minmax(150px,1fr))!important}}
@media(max-width:700px){#barrelMap .rackmap-toolbar{grid-template-columns:1fr 1fr!important}}

/* 2026-09-27 Rackhouse Map final toolbar + precision color controls */
#barrelMap .rackmap-toolbar{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:14px!important;
  width:100%!important;
  align-items:end!important;
}
#barrelMap .rackmap-toolbar>label{
  display:grid!important;
  grid-template-rows:18px 40px!important;
  gap:5px!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  justify-self:stretch!important;
  align-self:end!important;
}
#barrelMap .rackmap-toolbar>label>span:first-child{
  display:flex!important;
  align-items:flex-end!important;
  height:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  line-height:18px!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
#barrelMap .rackmap-toolbar>label>select,
#barrelMap .rackmap-toolbar>label>input,
#barrelMap .rackmap-color-control{
  display:flex!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:40px!important;
  box-sizing:border-box!important;
  margin:0!important;
}
#barrelMap .rackmap-toolbar>button{
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  margin:0!important;
}
.rackmap-color-control{
  align-items:center!important;
  gap:10px!important;
  padding:4px 10px!important;
  border:1px solid #b9c2cc!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#152238!important;
  cursor:pointer!important;
  text-align:left!important;
}
.rackmap-color-control>span{
  display:block!important;
  flex:1 1 auto!important;
  height:28px!important;
  border:1px solid #8b949e!important;
  background:var(--rackmap-color,#fff)!important;
  border-radius:3px!important;
}
.rackmap-color-control>code{font:12px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace!important;white-space:nowrap!important}
.rackmap-color-overlay{position:fixed;inset:0;z-index:11000;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:20px}
.rackmap-color-dialog{width:min(520px,100%);background:#fff;border-radius:10px;padding:18px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.rackmap-color-dialog .section-heading{margin:0 0 14px}
.rackmap-color-preview{height:58px;border:1px solid #aab3bd;border-radius:7px;margin-bottom:14px}
.rackmap-color-dialog>label{display:grid!important;grid-template-columns:90px 1fr!important;gap:12px!important;align-items:center!important;margin:10px 0!important;font-weight:700!important}
.rackmap-color-dialog input[type="range"]{width:100%!important;cursor:ew-resize!important}
.rackmap-color-dialog input[type="text"]{height:38px!important;width:100%!important;box-sizing:border-box!important}
@media(max-width:1100px){#barrelMap .rackmap-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:700px){#barrelMap .rackmap-toolbar{grid-template-columns:1fr 1fr!important}.rackmap-color-control>code{display:none!important}}

/* 2026-09-27 Rackhouse Map preset/session UI v2 */
#barrelMap .rackmap-toolbar{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
  width:100%!important;
  align-items:end!important;
}
#barrelMap .rackmap-field{
  display:grid!important;
  grid-template-rows:18px 42px!important;
  gap:5px!important;
  min-width:0!important;
  width:100%!important;
  margin:0!important;
}
#barrelMap .rackmap-field>label{
  display:flex!important;
  align-items:flex-end!important;
  width:100%!important;
  height:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  font-size:12px!important;
  line-height:18px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
#barrelMap .rackmap-field>select,
#barrelMap .rackmap-field>.rackmap-color-control{
  display:flex!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:42px!important;
  min-height:42px!important;
  box-sizing:border-box!important;
  margin:0!important;
  justify-self:stretch!important;
}
#barrelMap .rackmap-actions{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:12px!important;
  margin-top:12px!important;
}
#barrelMap .rackmap-actions>button{width:100%!important;height:40px!important;margin:0!important;min-width:0!important}
#barrelMap .rackmap-color-control{
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  padding:5px 9px!important;
  border:1px solid #b9c2cc!important;
  border-radius:7px!important;
  background:#fff!important;
  cursor:pointer!important;
}
#barrelMap .rackmap-color-control .rackmap-color-chip{
  display:block!important;
  flex:1 1 auto!important;
  min-width:36px!important;
  height:28px!important;
  border:1px solid #8b949e!important;
  border-radius:4px!important;
  background:var(--rackmap-color,#fff)!important;
}
#barrelMap .rackmap-color-control>strong{font:12px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace!important;font-weight:500!important;white-space:nowrap!important}
.rackmap-color-dialog{width:min(500px,100%)!important}
.rackmap-sv{
  --hue:0;
  position:relative!important;
  height:260px!important;
  border-radius:8px!important;
  border:1px solid #9aa4af!important;
  cursor:crosshair!important;
  touch-action:none!important;
  background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--hue),100%,50%))!important;
  overflow:hidden!important;
}
.rackmap-sv>i{
  position:absolute!important;
  width:16px!important;
  height:16px!important;
  border:2px solid #fff!important;
  border-radius:50%!important;
  box-shadow:0 0 0 1px #111,0 1px 4px rgba(0,0,0,.45)!important;
  transform:translate(-50%,-50%)!important;
  pointer-events:none!important;
}
.rackmap-hue{margin:14px 0!important}
.rackmap-hue input[type="range"]{width:100%!important;cursor:ew-resize!important}
.rackmap-color-bottom{display:grid!important;grid-template-columns:70px 1fr auto!important;gap:10px!important;align-items:center!important}
.rackmap-color-bottom .rackmap-color-preview{height:40px!important;margin:0!important;border-radius:6px!important}
.rackmap-color-bottom input{height:40px!important;width:100%!important;box-sizing:border-box!important}
.rackmap-color-bottom button{height:40px!important;white-space:nowrap!important}
@media(max-width:1100px){#barrelMap .rackmap-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))!important}#barrelMap .rackmap-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:700px){#barrelMap .rackmap-toolbar{grid-template-columns:1fr 1fr!important}#barrelMap .rackmap-actions{grid-template-columns:1fr 1fr!important}#barrelMap .rackmap-color-control>strong{display:none!important}.rackmap-color-bottom{grid-template-columns:54px 1fr!important}.rackmap-color-bottom button{grid-column:1/-1!important}}

/* 2026-09-29 bulk barrel movement + bulk tank creator */
.bulk-move-meta{display:grid;grid-template-columns:minmax(220px,1fr) minmax(320px,2fr);gap:14px;margin:14px 0}.bulk-move-meta label{display:flex;flex-direction:column;gap:6px;font-weight:600}.bulk-move-table{min-width:1180px}.bulk-move-table th,.bulk-move-table td{vertical-align:middle}.bulk-move-table select{width:100%;min-width:88px}.bulk-move-table .bm-current{min-width:210px;max-width:280px;white-space:normal}.bulk-create-preview{margin:14px 0;padding:12px;border:1px solid #d7e0dc;border-radius:8px;background:#f8fbfa;max-height:180px;overflow:auto;line-height:1.7}.rackmap-compare{display:grid;grid-template-columns:minmax(210px,1fr) minmax(210px,1fr) minmax(260px,2fr);gap:12px;align-items:end;margin:12px 0}.rackmap-compare label{display:flex;flex-direction:column;gap:6px;font-weight:600}.rackmap-compare input{width:100%}@media(max-width:900px){.bulk-move-meta,.rackmap-compare{grid-template-columns:1fr}.bulk-move-table{min-width:1050px}}

.rackmap-history-controls{display:grid;grid-template-columns:repeat(3,minmax(190px,1fr)) auto;gap:12px;align-items:end;margin:14px 0 6px}.rackmap-history-controls label{display:flex;flex-direction:column;gap:6px;font-weight:600}.rackmap-history-controls input{width:100%}.rackmap-history-help{margin:0 0 12px}@media(max-width:1000px){.rackmap-history-controls{grid-template-columns:1fr 1fr}.rackmap-history-controls button{align-self:end}}@media(max-width:650px){.rackmap-history-controls{grid-template-columns:1fr}}


/* Plant tare-weight mode */
body.tare-weights-disabled .tare-weight-field{display:none!important}
.bulk-create-table{width:100%;border-collapse:collapse;margin-top:10px}.bulk-create-table th,.bulk-create-table td{text-align:left;padding:8px;border-bottom:1px solid #dfe5e1}.bulk-create-table input{width:100%;min-width:120px}

/* 2026-09-28 Rackhouse historical position rules + bulk movement workspace */
.rackmap-condition-historical{grid-template-columns:minmax(180px,1.3fr) minmax(90px,.45fr) minmax(150px,1fr) minmax(190px,1fr) 42px!important;align-items:end!important}
.rackmap-condition-date{display:flex;flex-direction:column;gap:4px;margin:0!important;font-weight:600;font-size:12px}
.rackmap-condition-date input{width:100%;height:38px}
.rackmap-historical-position{display:block!important;margin-top:5px;padding-top:4px;border-top:1px solid rgba(0,0,0,.14);font-size:10px!important;line-height:1.25;font-weight:600}
.bulk-move-meta{display:grid;grid-template-columns:minmax(240px,1fr) minmax(300px,2fr);gap:12px;margin:14px 0}
.bulk-move-meta label,.bulk-move-filters label{display:flex;flex-direction:column;gap:5px;font-weight:600;margin:0}
.bulk-move-filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:14px 0 16px}
.bulk-move-filters input,.bulk-move-filters select{width:100%;min-width:0;height:38px}
.bulk-move-grid{width:100%;overflow:visible;border:1px solid #d8e1e6;border-radius:8px}
.bulk-move-grid-head,.bulk-move-grid-row{display:grid;grid-template-columns:minmax(76px,.7fr) minmax(145px,1.45fr) minmax(110px,1.15fr) minmax(64px,.6fr) minmax(64px,.6fr) minmax(64px,.6fr) minmax(64px,.6fr) minmax(72px,.7fr);gap:8px;align-items:center;padding:9px 10px}
.bulk-move-grid-head{background:#edf4f7;font-size:12px;font-weight:800;text-transform:uppercase;border-radius:8px 8px 0 0}
.bulk-move-grid-row{border-top:1px solid #d8e1e6}
.bulk-move-grid-row select{width:100%;min-width:0;height:38px;padding-left:7px;padding-right:22px}
.bulk-move-grid-row .bm-current{font-size:12px;line-height:1.25;overflow-wrap:anywhere}
@media(max-width:1050px){.bulk-move-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.bulk-move-grid-head{display:none}.bulk-move-grid-row{grid-template-columns:repeat(4,minmax(0,1fr))}.bulk-move-grid-row .bm-current{grid-column:span 3}}
@media(max-width:700px){.bulk-move-meta,.bulk-move-filters{grid-template-columns:1fr}.bulk-move-grid-row{grid-template-columns:repeat(2,minmax(0,1fr))}.bulk-move-grid-row .bm-current{grid-column:span 1}.rackmap-condition-historical{grid-template-columns:1fr!important}}

/* 2026-09-28 alignment polish: historical rule date + bulk movement filters */
.rackmap-condition-historical{
  align-items:center!important;
}
.rackmap-condition-historical .rackmap-condition-date{
  position:relative!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  align-self:center!important;
}
.rackmap-condition-historical .rackmap-condition-date>span{
  position:absolute!important;
  left:0!important;
  bottom:calc(100% + 5px)!important;
  line-height:1!important;
  white-space:nowrap!important;
  font-size:12px!important;
  font-weight:600!important;
}
.rackmap-condition-historical .rackmap-condition-date input{
  display:block!important;
  width:100%!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.rackmap-condition-historical .rackmap-remove-cond{
  align-self:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  margin:0!important;
  padding:0!important;
  color:#b42318!important;
  border-color:#f0a29a!important;
  background:#fff5f4!important;
  font-weight:800!important;
  font-size:18px!important;
}
.rackmap-condition-historical .rackmap-remove-cond:hover{
  color:#8f160f!important;
  border-color:#dc6b62!important;
  background:#fee4e2!important;
}
.bulk-move-filters{
  align-items:start!important;
}
.bulk-move-filters label{
  display:grid!important;
  grid-template-rows:20px 40px!important;
  gap:5px!important;
  align-items:stretch!important;
}
.bulk-move-filters label>input,
.bulk-move-filters label>select{
  display:block!important;
  width:100%!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  box-sizing:border-box!important;
  align-self:stretch!important;
}

/* 2026-09-28 ONLY change after alignment patch: destructive styling for every color-rule condition remove button. */
.rackmap-condition > .rackmap-remove-cond,
.rackmap-condition > button.rackmap-remove-cond {
  color:#b42318!important;
  border-color:#f0a29a!important;
  background:#fff5f4!important;
  font-weight:800!important;
}
.rackmap-condition > .rackmap-remove-cond:hover,
.rackmap-condition > button.rackmap-remove-cond:hover {
  color:#fff!important;
  border-color:#b42318!important;
  background:#b42318!important;
}

/* 2026-09-29 Rackhouse history Current Map alignment. */
.rackmap-history-controls .rackmap-history-action{display:flex!important;flex-direction:column!important;gap:6px!important;align-self:stretch!important}
.rackmap-history-controls .rackmap-history-action>span{font-weight:600!important;visibility:hidden!important;line-height:normal!important}
.rackmap-history-controls .rackmap-history-action>button{height:40px!important;min-height:40px!important;margin:0!important;align-self:stretch!important;white-space:nowrap!important}

/* 2026-09-29 Current Map button: align to the datetime INPUT row, not the label row. */
.rackmap-history-controls .rackmap-history-action{
  display:flex!important;
  flex-direction:column!important;
  align-self:end!important;
  gap:0!important;
  height:40px!important;
  min-height:40px!important;
  justify-content:flex-end!important;
}
.rackmap-history-controls .rackmap-history-action>span{
  display:none!important;
}
.rackmap-history-controls .rackmap-history-action>button{
  display:block!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  align-self:auto!important;
  white-space:nowrap!important;
}


/* 2026-09-29 tax-paid / tasting-room inventory */
#inventoryTaxPaidPanel .section-heading{align-items:flex-start}
#inventoryTaxPaidPanel .inventory-attestation-row{margin:0}
#inventoryTaxPaidPanel .tpActual{min-width:90px}
#inventoryTaxPaidPanel .tpCustomer{white-space:nowrap}
@media(max-width:820px){#inventoryTaxPaidPanel .tpCustomer{white-space:normal}}
/* Import Wizard */
.iw-steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:0 0 14px}.iw-steps button{border:1px solid #bcc8c2;background:#fff;border-radius:6px;padding:9px 6px;font-weight:700;cursor:pointer}.iw-steps button.active{background:#e4f1ea;border-color:#0e5136;color:#0e5136}.iw-row{margin:10px 0!important;padding:12px!important}.iw-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.iw-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.iw-grid label,.iw-prov-row label{min-width:0}.iw-prov{margin-top:12px;padding-top:10px;border-top:1px solid #d8e0dc}.iw-prov-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px;background:#f7faf8;border:1px solid #dce5e0;border-radius:6px;margin:7px 0}.iw-check{display:flex!important;align-items:center;gap:7px}.iw-check input{width:auto!important}.iw-recon{display:grid;grid-template-columns:2fr 1fr 1fr 1.2fr;gap:10px;padding:9px;border-bottom:1px solid #ddd}.iw-recon.ok{background:#f2faf5}.iw-recon.bad{background:#fff5f2}@media(max-width:900px){.iw-steps{grid-template-columns:repeat(2,1fr)}.iw-grid,.iw-prov-row{grid-template-columns:1fr 1fr}.iw-recon{grid-template-columns:1fr 1fr}}@media(max-width:600px){.iw-grid,.iw-prov-row,.iw-recon{grid-template-columns:1fr}}
\n\n/* Bottling observed-proof correction disclosure — 2026-10-04 */
#bottlingView .g-correction-trigger{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 width:17px!important;height:17px!important;min-width:17px!important;padding:0!important;margin:0 0 0 4px!important;
 border:1px solid #60736b!important;border-radius:50%!important;background:#fff!important;color:#174b3a!important;
 font-size:12px!important;font-weight:700!important;line-height:1!important;vertical-align:middle!important;cursor:pointer!important;
}
#bottlingView .g-instrument-corrections{display:none!important;width:100%!important;margin:7px 0 0!important;padding:0!important;border:0!important;}
#bottlingView .g-instrument-corrections[open]{display:block!important;}
#bottlingView .g-instrument-corrections>summary{display:none!important;}
#bottlingView .g-instrument-corrections .g-correction-grid{margin:0!important;padding:8px!important;border:1px solid #cbd8d0!important;border-radius:6px!important;background:#f7faf8!important;}
