/* Warehouse EXP Date — Master module visual owner.
   v21.26 root-first ownership: module-specific selectors live here once. */

/* Migrated from app/app.css; source-order preserved inside this owner. */
.master-toolbar{padding: 18px;
            display: grid;
            grid-template-columns: 1.25fr .95fr 1fr;
            gap: 14px;
            align-items: stretch;}
.master-toolbar .toolbar-panel{min-height: 150px;}
.master-file-card{min-height: 76px;
            border-style: solid;
            background: linear-gradient(135deg, rgba(239,246,255,.96), rgba(238,242,255,.94));}
body[data-theme="dark"] .master-file-card{background: linear-gradient(135deg, rgba(15,32,57,.96), rgba(28,25,60,.90));}
.master-file-card .custom-file-icon{background: linear-gradient(135deg, rgba(194,24,117,.18), rgba(157,44,125,.17));
            color: #4f46e5;}
.master-action-stack{display: grid;
            grid-template-columns: 1fr;
            gap: 10px;}
.master-search-panel{justify-content: space-between;}
.master-count-card{display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 13px 14px;
            border: 1px solid var(--border);
            border-radius: 15px;
            background: color-mix(in srgb, var(--bg-main) 88%, var(--secondary) 12%);}
.master-count-card span:first-child{color: var(--text-muted);
            font-size: 11px;
            font-weight: 900;}
.master-count-value{min-width: 50px;
            text-align: center;
            color: var(--secondary);
            font-family: Arial,Tahoma,sans-serif;
            font-size: 25px;
            font-weight: 900;
            direction: ltr;
            unicode-bidi: isolate;}
.master-danger-btn{background: rgba(220,38,38,.06);
            color: var(--danger);
            border: 1px solid rgba(220,38,38,.22);
            box-shadow: none;}
.master-danger-btn:hover{background: rgba(220,38,38,.11);}
@media (max-width: 1320px){
.master-toolbar{grid-template-columns: 1fr 1fr;}
.master-search-panel{grid-column: 1 / -1;}
}
@media (max-width: 880px){
.master-toolbar{grid-template-columns: 1fr;}
.master-search-panel{grid-column: auto;}
}
.master-table-card{margin-top: 2px;}
.master-table{min-width: 900px;}
.master-table th:first-child,.master-table td:first-child{width: 58px; text-align: center;}
.master-index-chip{width: 30px;
            height: 30px;
            display: inline-grid;
            place-items: center;
            border-radius: 9px;
            color: var(--text-muted);
            background: color-mix(in srgb, var(--bg-main) 91%, var(--secondary) 9%);
            border: 1px solid var(--border);
            font: 900 11px/1 Arial,Tahoma,sans-serif;
            direction: ltr;
            unicode-bidi: isolate;}
.master-code-chip{max-width: 220px;
            color: #c21875;
            background: linear-gradient(180deg, rgba(194,24,117,.08), rgba(237,28,145,.045));
            border-color: rgba(194,24,117,.13);}
body[data-theme="dark"] .master-code-chip{color: #ff9ed1;}
.master-item-cell{min-width: 240px;}
.master-name-wrap{display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;}
.master-name-mark{width: 34px;
            height: 34px;
            flex: 0 0 34px;
            display: grid;
            place-items: center;
            border-radius: 11px;
            color: var(--purple);
            background: rgba(157,44,125,.09);
            border: 1px solid rgba(157,44,125,.10);
            font-size: 14px;}
.master-item-name{display: block;
            color: var(--primary);
            font-size: 12.8px;
            font-weight: 900;
            line-height: 1.55;}
.master-item-caption{display: block;
            margin-top: 2px;
            color: var(--text-muted);
            font-size: 9.5px;
            font-weight: 700;}
.master-category-badge{padding: 6px 10px;
            color: var(--purple);
            background: rgba(157,44,125,.09);
            border: 1px solid rgba(157,44,125,.08);
            border-radius: 999px;
            font-size: 10.5px;
            font-weight: 800;
            white-space: nowrap;}
.master-location-tag{padding: 6px 10px;
            color: var(--text-main);
            background: color-mix(in srgb, var(--bg-main) 94%, var(--secondary) 6%);
            border: 1px solid var(--border);
            border-radius: 999px;
            font-size: 10.5px;
            font-weight: 800;
            white-space: nowrap;}
.master-row-actions{justify-content: flex-start;}
.master-table tbody tr:hover .master-name-mark{background: rgba(157,44,125,.14);
            border-color: rgba(157,44,125,.16);}
.master-form-modal-overlay{z-index:11500;}
.master-form-modal .modal-header{margin:0; padding:18px 20px; background:linear-gradient(135deg,rgba(157,44,125,.08),rgba(194,24,117,.04));}

.master-form-summary{     margin-bottom:14px;   }
.master-form-icon{inline-size:42px; block-size:42px;      font-size:19px;}
.master-form-summary strong{display:block; }
.master-form-summary small{display:block; margin-top:3px; }
.master-form-code-note{display:block; margin-top:5px; }
.master-form-icon[data-ui-icon],.master-name-mark[data-ui-icon]{display:grid; place-items:center;}
.master-form-icon[data-ui-icon]{--ui-icon-size: 27px;}
.master-name-mark[data-ui-icon]{--ui-icon-size: 17px;}
.master-location-tag .ui-icon{width:13px; height:13px; margin-inline-end:4px; vertical-align:-2px;}
/* Migrated from app/styles/architecture-system.css; source-order preserved inside this owner. */
.warehouse-app .master-count-card,.warehouse-app .master-file-card{color:var(--text-main); background:var(--surface); border-color:var(--border); box-shadow:var(--shadow-card);}
.warehouse-app .master-code-chip{color:var(--brand-strong); background:var(--brand-soft); border-color:color-mix(in srgb,var(--brand-strong) 15%,var(--border));}
body[data-theme="dark"].warehouse-app .master-file-card,body[data-theme="dark"].warehouse-app .master-count-card{color:var(--text-main); background:var(--surface); border-color:var(--border);}
body[data-theme="dark"].warehouse-app .master-code-chip{color:#ff81c6; background:#351d2b; border-color:#543044;}
.warehouse-app .master-file-card .custom-file-icon{color:var(--brand-strong);
  background:var(--brand-soft);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand-strong) 12%,transparent);}
.warehouse-app .master-table{border-collapse:separate;border-spacing:0}
.master-form-modal{position:relative;max-height:var(--dlg-max-h);min-height:0;margin:auto;
  display:flex;flex-direction:column;color:var(--dlg-text);background:var(--dlg-canvas);border:1px solid color-mix(in srgb,var(--dlg-border-strong) 88%,#fff 12%);
  border-radius:var(--dlg-radius);box-shadow:var(--dlg-shadow);isolation:isolate;}
.master-form-icon{display:grid;place-items:center;flex:0 0 auto;width:50px;height:50px;border-radius:16px;color:var(--dlg-brand);
  background:linear-gradient(145deg,color-mix(in srgb,var(--dlg-brand) 12%,var(--dlg-surface)),color-mix(in srgb,var(--dlg-brand-2) 5%,var(--dlg-surface)));
  border:1px solid color-mix(in srgb,var(--dlg-brand) 18%,var(--dlg-border));box-shadow:0 14px 28px -23px color-mix(in srgb,var(--dlg-brand) 60%,transparent);}
.master-form-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--dlg-brand) 24%,var(--dlg-border)) transparent;}
.master-form-body{flex:1 1 auto;padding:24px var(--dlg-pad-x) 26px;background:var(--dlg-canvas)}
.master-form-summary{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin:0 0 20px;padding:16px 17px;
  color:var(--dlg-text);background:linear-gradient(135deg,color-mix(in srgb,var(--dlg-brand) 7%,var(--dlg-surface)),var(--dlg-surface));
  border:1px solid color-mix(in srgb,var(--dlg-brand) 14%,var(--dlg-border));border-radius:var(--dlg-section-radius);box-shadow:0 14px 32px -30px rgba(45,26,39,.45);}
.master-form-summary::after{content:"";width:8px;height:8px;border-radius:999px;background:var(--dlg-success);box-shadow:0 0 0 5px color-mix(in srgb,var(--dlg-success) 10%,transparent)}
.master-form-summary>div:last-child{display:grid;gap:3px;min-width:0}
.master-form-summary strong{font-size:14.5px;font-weight:790;color:var(--dlg-text);line-height:1.45;overflow-wrap:anywhere}
.master-form-summary small{font-size:12px;font-weight:560;color:var(--dlg-muted);line-height:1.55}
.master-form-code-note{color:var(--dlg-muted);font-size:11.5px;font-weight:540;line-height:1.55}
.master-barcode-manager{counter-reset:barcode-row;margin:22px 0 0;padding:0;overflow:hidden;background:var(--dlg-surface);border:1px solid var(--dlg-border);border-radius:22px;box-shadow:0 16px 34px -34px rgba(45,26,39,.50)}
.master-barcode-manager-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0;padding:17px 18px 15px;background:linear-gradient(135deg,color-mix(in srgb,var(--dlg-brand) 5%,var(--dlg-surface)),var(--dlg-surface));border-bottom:1px solid var(--dlg-border)}
.master-barcode-manager-head strong{display:block;color:var(--dlg-text);font-size:14px;font-weight:780}
.master-barcode-manager-head small{display:block;margin-top:4px;color:var(--dlg-muted);font-size:11.5px;font-weight:540;line-height:1.6}
.master-barcode-manager-head>span{flex:0 0 auto;padding:6px 10px;color:var(--dlg-brand);background:color-mix(in srgb,var(--dlg-brand) 7%,var(--dlg-surface));border:1px solid color-mix(in srgb,var(--dlg-brand) 18%,var(--dlg-border));border-radius:999px;font-size:11px;font-weight:780;font-variant-numeric:tabular-nums}
.master-barcode-editor-list{display:grid;gap:0;padding:5px 12px 0}
.master-barcode-editor-row{counter-increment:barcode-row;position:relative;display:grid;grid-template-columns:34px minmax(190px,1fr) minmax(128px,.40fr) auto 42px;gap:9px;align-items:center;padding:12px 4px;border-bottom:1px solid var(--dlg-border)}
.master-barcode-editor-row:last-child{border-bottom:0}
.master-barcode-editor-row::before{content:counter(barcode-row);display:grid;place-items:center;width:28px;height:28px;border-radius:9px;color:var(--dlg-muted);background:var(--dlg-surface-3);border:1px solid var(--dlg-border);font-size:10px;font-weight:800;font-variant-numeric:tabular-nums}
.master-barcode-editor-row input,.master-barcode-editor-row select{min-height:44px}
.master-barcode-active{display:flex;align-items:center;gap:8px;white-space:nowrap;color:var(--dlg-muted);font-size:11.5px;font-weight:640;cursor:pointer}
.modal-card .master-barcode-active input[type="checkbox"]{appearance:none;-webkit-appearance:none;position:relative;width:38px;min-width:38px;height:22px;min-height:22px;padding:0;border:1px solid var(--dlg-border-strong);border-radius:999px;background:var(--dlg-surface-3);box-shadow:none;transition:.16s ease}
.master-barcode-active input::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:var(--dlg-muted);transition:.16s ease}
.modal-card .master-barcode-active input[type="checkbox"]:checked{background:color-mix(in srgb,var(--dlg-success) 18%,var(--dlg-surface));border-color:color-mix(in srgb,var(--dlg-success) 45%,var(--dlg-border))}
.master-barcode-active input:checked::after{left:19px;background:var(--dlg-success)}
.master-barcode-remove{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--dlg-border);border-radius:12px;background:var(--dlg-surface-2);color:var(--dlg-muted);font-size:20px;cursor:pointer;transition:.15s ease}
.master-barcode-remove:hover{color:var(--dlg-danger);border-color:color-mix(in srgb,var(--dlg-danger) 28%,var(--dlg-border));background:color-mix(in srgb,var(--dlg-danger) 6%,var(--dlg-surface));transform:translateY(-1px)}
.master-barcode-editor-empty{margin:12px;padding:22px;text-align:center;color:var(--dlg-muted);border:1px dashed var(--dlg-border-strong);border-radius:15px;background:var(--dlg-surface-2)}
.master-barcode-add{margin:10px 14px 14px}
.master-form-modal{max-width:650px; padding:0; overflow:hidden;width:min(900px,calc(100vw - 36px))}
.master-barcode-value{direction:ltr;text-align:left;font-variant-numeric:tabular-nums}
@media (max-width:760px){
.master-form-modal{width:100%;max-width:none;max-height:96dvh;margin:0;border-radius:24px 24px 0 0;border-bottom:0}
.master-form-body{padding:18px 16px calc(20px + env(safe-area-inset-bottom))}
.master-form-summary{grid-template-columns:auto minmax(0,1fr)}
.master-form-summary::after{display:none}
.master-barcode-editor-list{padding-inline:10px}
.master-barcode-editor-row{grid-template-columns:28px minmax(0,1fr) minmax(105px,.48fr);gap:8px}
.master-barcode-active{grid-column:2}
.master-barcode-remove{grid-column:3;grid-row:2;justify-self:end}
.master-barcode-editor-row::before{width:26px;height:26px}
}
@media (max-width:460px){
.master-form-icon{width:44px;height:44px;border-radius:14px}
.master-barcode-manager-head{gap:10px}
.master-barcode-manager-head small{font-size:11px}
}
.modal-card.has-promoted-action-dock>.master-form-body{padding-bottom:24px}
.modal-card.has-promoted-action-dock>.master-form-body form{margin:0}
@media (max-width:760px){
.warehouse-app .master-toolbar{grid-template-columns:1fr;gap:9px;}
.warehouse-app .master-table{display:block;width:100%;min-width:0;border:0;}
.warehouse-app .master-table thead{display:none;}
.warehouse-app .master-table tbody{display:grid;gap:9px;padding:9px;background:var(--surface-soft);}
.warehouse-app .master-table tbody tr{display:grid;width:100%;min-width:0;margin:0;padding:11px;border:1px solid var(--border);border-radius:15px;background:var(--surface);box-shadow:0 10px 24px -25px rgba(40,24,35,.5);overflow:hidden;}
.warehouse-app .master-table td{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0;padding:6px 0;border:0;text-align:start;overflow:visible;}
.warehouse-app .master-table td::before{content:attr(data-mobile-label);flex:0 0 86px;color:var(--text-muted);font-size:8px;font-weight:800;line-height:1.45;}
.warehouse-app .master-table tbody tr{grid-template-columns:1fr;}
.warehouse-app .master-table td:first-child{display:none;}
.warehouse-app .master-name-wrap{min-width:0;}
.warehouse-app .master-item-name{font-size:11px;white-space:normal;overflow-wrap:anywhere;}
.warehouse-app .master-item-caption{display:none;}
.warehouse-app .master-barcode-chips{justify-content:flex-end;flex-wrap:wrap;}
.warehouse-app .master-row-actions{width:100%;justify-content:flex-end;}
}
@media (max-width:430px){
.warehouse-app .master-table td::before{flex-basis:74px;}
}
.warehouse-app #masterSection{position:relative;}
.warehouse-app #masterSection::before{content:"";
  position:absolute;
  z-index:0;
  width:190px;
  height:190px;
  inset-inline-end:18px;
  top:18px;
  background:url("../assets/warehouse-exp-mark.svg") center/contain no-repeat;
  opacity:.018;
  filter:grayscale(1);
  pointer-events:none;}
.warehouse-app #masterSection>*{position:relative;z-index:1}
@media (max-width:760px){
.warehouse-app #masterSection::before{width:120px;height:120px;opacity:.012}
}

/* Master barcode printing — scoped owner; never affects reports or other print surfaces. */
@media print{
  body.master-barcode-print-mode *{visibility:hidden;}
  body.master-barcode-print-mode #barcodePrintSection,
  body.master-barcode-print-mode #barcodePrintSection *{visibility:visible;}
  body.master-barcode-print-mode #barcodePrintSection{position:absolute;inset:0 auto auto 0;width:100%;padding:18mm 12mm;text-align:center;background:#fff;color:#111827;}
  body.master-barcode-print-mode #barcodePrintSection .btn{display:none;}
}
