/* Amreyah Supply Hub Warehouse v27 — isolated styles, preserving the stable app. */
#warehouse-page{direction:rtl;color:#14253a;font-family:inherit}
#warehouse-page *{box-sizing:border-box}
.wh-page{display:grid;gap:20px;padding-top:24px}
.wh-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px 26px;border-radius:20px;background:linear-gradient(135deg,#0a2342,#164f70);color:#fff;box-shadow:0 16px 38px #0a234224}
.wh-hero h1{margin:0 0 7px;font-size:28px;line-height:1.25}
.wh-hero p{margin:0;color:#c7d9e8;font-size:14px;line-height:1.7}
.wh-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.wh-btn{border:0;border-radius:11px;min-height:44px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font:inherit;font-size:14px;font-weight:800;transition:.18s ease}
.wh-btn:hover{transform:translateY(-1px)}
.wh-btn-primary{background:#0a6ea8;color:#fff;box-shadow:0 8px 20px #063c622c}
.wh-btn-light{background:#fff;color:#0a2342;border:1px solid #dce6ee}
.wh-btn-ghost{background:#ffffff16;color:#fff;border:1px solid #ffffff38}
.wh-btn-danger{background:#fff0f0;color:#b42318;border:1px solid #ffcaca}
.wh-btn-soft{background:#edf6fb;color:#0a5f91;border:1px solid #cce5f3}
.wh-btn-small{min-height:34px;padding:0 11px;font-size:12px;border-radius:9px}
.wh-tabs{display:flex;gap:8px;overflow:auto;padding:4px 0 3px;scrollbar-width:thin}
.wh-tab{white-space:nowrap;border:1px solid #dfe7ed;background:#fff;color:#526176;border-radius:11px;min-height:43px;padding:0 16px;cursor:pointer;font:inherit;font-size:14px;font-weight:800}
.wh-tab.active{background:#0a2342;color:#fff;border-color:#0a2342}
.wh-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.wh-stat{background:#fff;border:1px solid #e1e8ed;border-radius:16px;padding:18px;display:grid;gap:8px;box-shadow:0 8px 22px #0a234208}
.wh-stat span{color:#64758a;font-size:13px;font-weight:700}
.wh-stat strong{color:#0a2342;font-size:25px;line-height:1.25}
.wh-stat small{color:#8492a3;font-size:12px}
.wh-panel{background:#fff;border:1px solid #e1e8ed;border-radius:18px;box-shadow:0 9px 25px #0a234208;overflow:hidden}
.wh-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid #edf1f4}
.wh-panel-head h2,.wh-panel-head h3{margin:0;color:#0a2342;font-size:19px}
.wh-panel-head p{margin:5px 0 0;color:#738296;font-size:13px}
.wh-panel-body{padding:18px 20px}
.wh-toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.wh-filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.wh-field{display:grid;gap:7px;min-width:150px}
.wh-field>span{color:#42536a;font-size:13px;font-weight:800}
.wh-input,.wh-select,.wh-textarea{width:100%;border:1px solid #d7e1e8;background:#fff;color:#14253a;border-radius:10px;min-height:45px;padding:9px 12px;font:inherit;font-size:14px;outline:0}
.wh-input:focus,.wh-select:focus,.wh-textarea:focus{border-color:#348bc0;box-shadow:0 0 0 3px #348bc019}
.wh-textarea{min-height:86px;resize:vertical}
.wh-table-wrap{overflow:auto}
.wh-table{width:100%;border-collapse:separate;border-spacing:0;min-width:880px}
.wh-table th{background:#f5f8fa;color:#53657a;text-align:right;font-size:12px;font-weight:900;padding:12px;border-bottom:1px solid #dfe7ed;white-space:nowrap}
.wh-table td{font-size:13px;padding:13px 12px;border-bottom:1px solid #edf1f4;vertical-align:middle}
.wh-table tbody tr:hover{background:#fafdff}
.wh-item-name{display:grid;gap:4px;min-width:180px}
.wh-item-name strong{font-size:15px;color:#132b44}
.wh-item-name small{font-size:12px;color:#75869a}
.wh-num{direction:ltr;text-align:right;font-variant-numeric:tabular-nums;font-weight:800}
.wh-money{direction:ltr;font-variant-numeric:tabular-nums;color:#0a5f91;font-weight:900}
.wh-badge{display:inline-flex;align-items:center;min-height:29px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:850;background:#edf3f7;color:#526176;white-space:nowrap}
.wh-badge.in{background:#e7f7ef;color:#14734e}
.wh-badge.out{background:#fff1e8;color:#a44b11}
.wh-badge.manual{background:#edf5ff;color:#275b98}
.wh-badge.supplier{background:#f0ebff;color:#6041a4}
.wh-empty{text-align:center;padding:48px 18px;color:#78889a;font-size:14px}
.wh-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.wh-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.wh-card-list{display:grid;gap:12px}
.wh-doc-card{border:1px solid #e1e8ed;border-radius:15px;padding:16px;display:grid;gap:13px;background:#fff}
.wh-doc-head{display:flex;align-items:start;justify-content:space-between;gap:12px}
.wh-doc-head h3{margin:0 0 5px;font-size:17px;color:#0a2342}
.wh-doc-meta{display:flex;gap:7px;flex-wrap:wrap;color:#718196;font-size:12px}
.wh-doc-totals{display:flex;gap:18px;flex-wrap:wrap;padding-top:12px;border-top:1px dashed #dce4ea}
.wh-doc-totals span{display:grid;gap:3px;color:#718196;font-size:12px}
.wh-doc-totals strong{color:#0a2342;font-size:15px}
.wh-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.wh-setting-add{display:flex;gap:8px;margin-bottom:14px}
.wh-setting-list{display:grid;gap:8px}
.wh-setting-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #e3e9ee;border-radius:11px;padding:10px 12px}
.wh-setting-copy{display:grid;gap:3px}
.wh-setting-copy strong{font-size:14px}
.wh-setting-copy small{font-size:11px;color:#7b8999}
.wh-actions{display:flex;gap:6px;flex-wrap:wrap}
.wh-modal-layer{position:fixed;inset:0;z-index:9999;background:#0614249e;backdrop-filter:blur(4px);display:grid;place-items:center;padding:18px;overflow:auto}
.wh-modal{width:min(940px,100%);max-height:calc(100vh - 36px);overflow:auto;background:#f7f9fb;border-radius:20px;box-shadow:0 28px 80px #020b14a6}
.wh-modal-head{position:sticky;top:0;z-index:3;background:#fff;border-bottom:1px solid #dfe7ed;padding:17px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.wh-modal-head h2{margin:0;color:#0a2342;font-size:21px}
.wh-modal-close{width:39px;height:39px;border:0;border-radius:10px;background:#eef3f6;color:#40546a;cursor:pointer;font-size:22px}
.wh-modal-body{padding:20px;display:grid;gap:18px}
.wh-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.wh-form-grid .wide{grid-column:1/-1}
.wh-lines{display:grid;gap:10px}
.wh-line{display:grid;grid-template-columns:minmax(250px,2fr) minmax(120px,.7fr) minmax(130px,.8fr) auto;gap:9px;align-items:end;background:#fff;border:1px solid #e1e8ed;border-radius:13px;padding:12px}
.wh-line.issue-line{grid-template-columns:minmax(280px,2fr) minmax(140px,.8fr) auto}
.wh-line-stock{color:#66778b;font-size:11px;margin-top:4px}
.wh-modal-foot{position:sticky;bottom:0;background:#fff;border-top:1px solid #dfe7ed;padding:14px 20px;display:flex;justify-content:flex-end;gap:9px}
.wh-alert{border-radius:12px;padding:12px 14px;font-size:13px;line-height:1.7;background:#fff7df;color:#7b5700;border:1px solid #ffe2a3}
.wh-alert.error{background:#fff0f0;color:#a02620;border-color:#ffc9c9}
.wh-alert.success{background:#eaf8f1;color:#176b4c;border-color:#c9edda}
.wh-loading{min-height:260px;display:grid;place-items:center;color:#64758a;font-size:15px}
.wh-spinner{width:34px;height:34px;border:4px solid #dce8f0;border-top-color:#0a6ea8;border-radius:50%;animation:wh-spin .8s linear infinite;margin:auto auto 10px}
@keyframes wh-spin{to{transform:rotate(360deg)}}
.wh-toast{position:fixed;z-index:10050;left:22px;bottom:22px;max-width:420px;background:#0a2342;color:#fff;border-radius:12px;padding:13px 16px;box-shadow:0 14px 40px #0614245e;font-size:13px;line-height:1.6}
.wh-toast.error{background:#a92b25}
.wh-report-summary{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:13px}
.wh-report-summary span{background:#f0f5f8;border:1px solid #dfe7ed;border-radius:10px;padding:9px 12px;font-size:12px;color:#53657a}
.wh-report-summary strong{color:#0a2342;margin-right:4px}
.wh-positive{color:#14734e;font-weight:900}
.wh-negative{color:#b04b17;font-weight:900}
.wh-search{min-width:min(310px,100%)}
.wh-mobile-cards{display:none}

@media (max-width:1100px){
  .wh-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .wh-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  #warehouse-page{padding-inline:14px!important}
  .wh-page{gap:14px;padding-top:15px}
  .wh-hero{align-items:flex-start;flex-direction:column;padding:20px;border-radius:17px}
  .wh-hero h1{font-size:24px}
  .wh-hero p{font-size:13px}
  .wh-hero-actions{width:100%}
  .wh-hero-actions .wh-btn{flex:1}
  .wh-stat-grid,.wh-grid-2,.wh-grid-3,.wh-settings-grid{grid-template-columns:1fr}
  .wh-stat{padding:15px}
  .wh-panel-head{align-items:flex-start;flex-direction:column;padding:16px}
  .wh-panel-body{padding:14px}
  .wh-toolbar,.wh-filters{align-items:stretch;flex-direction:column;width:100%}
  .wh-field,.wh-search{min-width:0;width:100%}
  .wh-form-grid{grid-template-columns:1fr}
  .wh-line,.wh-line.issue-line{grid-template-columns:1fr;padding:12px}
  .wh-modal-layer{padding:0;place-items:stretch}
  .wh-modal{width:100%;max-height:100dvh;border-radius:0;min-height:100dvh}
  .wh-modal-body{padding:15px}
  .wh-modal-foot{padding:12px 15px}
  .wh-table-wrap{display:none}
  .wh-mobile-cards{display:grid;gap:11px}
  .wh-doc-card{padding:14px}
  .wh-doc-head{flex-direction:column}
  .wh-actions{width:100%}
  .wh-actions .wh-btn{flex:1}
  .wh-setting-row{align-items:flex-start;flex-direction:column}
  .wh-setting-row .wh-actions{justify-content:stretch}
}
