/* KOVLEON WMS: local, mobile-friendly addressed warehouse interface. */
.wh-panel{padding:0 2px 24px;color:#14243b}
.wh-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:2px 0 18px}
.wh-eyebrow{margin:0 0 5px;font-size:11px;font-weight:800;letter-spacing:.12em;color:#54749c}
.wh-toolbar h2{margin:0 0 6px;font-size:26px;line-height:1.2;color:#122b53}
.wh-muted{font-size:13px;color:#65768c;line-height:1.5;margin:4px 0}
.wh-toolbar-right,.wh-bottom-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.wh-btn{border:1px solid #ced9e8;border-radius:10px;font:inherit;font-size:13px;font-weight:700;padding:10px 14px;line-height:1.3;cursor:pointer;transition:background .15s,transform .12s;white-space:nowrap}
.wh-btn:hover{transform:translateY(-1px)}
.wh-btn:disabled{opacity:.55;cursor:wait}
.wh-primary{background:#155fc1;color:white;border-color:#155fc1}
.wh-primary:hover{background:#0b4e9f}
.wh-secondary{background:white;color:#244160}
.wh-secondary:hover{background:#eff5fc}
.wh-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0 16px}
.wh-metric{background:#fff;border:1px solid #dfebf3;border-radius:13px;padding:14px 15px;min-width:0}
.wh-metric strong{display:block;font-size:23px;line-height:1.1;margin-top:8px;color:#123c74}
.wh-metric small{display:block;color:#66788e;font-size:11px;font-weight:700}
.wh-metric em{display:block;color:#64748b;font-size:11px;margin-top:5px;font-style:normal}
.wh-filters{background:#fff;border:1px solid #dee8f2;border-radius:14px;padding:12px;display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:15px}
.wh-filters label,.wh-form-grid label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:#435a75}
.wh-search-wrap{flex:2;min-width:210px}
.wh-filters>label:not(.wh-search-wrap){flex:1;min-width:150px}
.wh-input,.wh-form-grid input,.wh-form-grid select,.wh-form-grid textarea{min-height:39px;border:1px solid #cad7e6;border-radius:8px;background:#fff;padding:8px 10px;outline:none;font:inherit;font-size:14px;color:#1a344f;width:100%;box-sizing:border-box}
.wh-input:focus,.wh-form-grid input:focus,.wh-form-grid select:focus,.wh-form-grid textarea:focus{border-color:#3c82cf;box-shadow:0 0 0 2px #dbeafe}
.wh-tabs{display:flex;gap:5px;border-bottom:1px solid #d8e3ed;overflow-x:auto;padding:0 0 2px;margin:0 0 14px}
.wh-tabs button{flex-shrink:0;border:0;background:transparent;padding:11px 14px;cursor:pointer;color:#58718a;font-size:13px;font-weight:700;border-bottom:3px solid transparent}
.wh-tabs .wh-active{color:#135bb9;border-color:#1660b6}
.wh-notice{color:#a44e20;min-height:1px;font-size:13px}
.wh-content{min-height:150px}
.wh-empty{padding:46px 18px;text-align:center;background:white;border:1px dashed #cad7e8;border-radius:14px}
.wh-empty h3{margin:0 0 10px;color:#15345b}
.wh-table-scroll{overflow:auto;background:white;border:1px solid #e0e8f2;border-radius:13px}
.wh-table{width:100%;border-collapse:collapse;min-width:690px;font-size:13px}
.wh-table th{text-align:left;padding:13px 11px;background:#f4f8fc;border-bottom:1px solid #dde6f0;color:#586c83;font-size:11px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.wh-table td{padding:12px 11px;border-bottom:1px solid #edf1f6;vertical-align:middle}
.wh-table tbody tr:hover{background:#f9fbfe}
.wh-table td.wh-nowrap{white-space:nowrap}
.wh-row-action{border:0;background:#eff6ff;color:#155eaa;border-radius:7px;padding:6px 8px;cursor:pointer;font-weight:700}
.wh-row-action:hover{background:#dbeafe}
.wh-tag{display:inline-block;border-radius:100px;background:#edf5fe;padding:4px 8px;color:#1b5c99;font-size:11px;font-weight:700}
.wh-tag.wh-alert{background:#fff1e3;color:#ad5615}
.wh-tag.wh-good{background:#e9f8f2;color:#167251}
.wh-item-thumb{height:37px;width:37px;object-fit:cover;border-radius:8px;border:1px solid #e4e8ef;vertical-align:middle;margin-right:8px}
.wh-map-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
.wh-location-card{border:1px solid #d6e3ef;background:white;border-radius:13px;padding:14px;min-width:0;box-shadow:0 2px 6px #10253a07}
.wh-location-card.wh-occupied{border-left:4px solid #36a581}
.wh-location-card.wh-empty-cell{border-left:4px solid #cbd5e1}
.wh-location-card h3{font-size:14px;margin:9px 0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wh-location-card .wh-breadcrumb{font-size:11px;word-break:break-word;color:#67809b;min-height:30px}
.wh-location-card .wh-loc-controls{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.wh-location-card .wh-capacity{height:5px;background:#eff3f8;border-radius:8px;overflow:hidden;margin-top:9px}
.wh-location-card .wh-capacity>span{height:100%;display:block;background:#238bb4}
.wh-bottom-actions{margin-top:16px;padding-top:12px;border-top:1px solid #e0e7ef}
.wh-dialog{border:0;border-radius:15px;padding:0;width:min(640px,94vw);max-height:90vh;box-shadow:0 20px 70px #0b22465c;background:#fff;color:#1c3858;overflow:auto}

/* Native <dialog> uses the browser top layer. Explicit fixed viewport centering
   prevents the warehouse forms from sticking to a corner in mobile Safari. */
@media screen {
  dialog.wh-dialog[open] {
    position:fixed!important;
    inset:0!important;
    margin:auto!important;
    transform:none!important;
    box-sizing:border-box!important;
    width:min(640px, calc(100vw - 32px))!important;
    max-width:calc(100vw - 32px)!important;
    height:fit-content;
    max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
}
@media screen and (max-width:740px) {
  dialog.wh-dialog[open] {
    width:calc(100vw - 24px)!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
  }
  dialog.wh-dialog .wh-dialog-actions {
    flex-wrap:wrap;
    gap:8px;
  }
}

.wh-dialog::backdrop{background:#142842a6}
.wh-dialog-header{padding:19px 20px 15px;display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #e4ebf2}
.wh-dialog-header h3{margin:0;font-size:19px}
.wh-close{background:transparent;border:0;font-size:25px;color:#7b8ca0;cursor:pointer}
.wh-dialog form{padding:16px 20px}
.wh-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 12px}
.wh-full{grid-column:1/-1}
.wh-form-grid textarea{min-height:66px;resize:vertical}
.wh-dialog-actions{border-top:1px solid #e4ebf2;display:flex;gap:9px;justify-content:flex-end;padding:14px 20px}
.wh-dialog #whFormHelp{padding:2px 20px 0}
.wh-qr-dialog #whQrBody{text-align:center;padding:20px}
.wh-qr-dialog #whQrBody>div{display:flex;justify-content:center}
.wh-qr-dialog #whQrBody img,.wh-qr-dialog #whQrBody canvas{max-width:100%}
.wh-qr-dialog p{padding:0 16px;text-align:center}
.wh-qr-code{font-family:monospace;font-size:14px;font-weight:700;letter-spacing:1px;margin:9px}
.wh-badge{font-size:10px;font-weight:bold;color:#8e541b;background:#fff6e8;padding:4px 6px;border-radius:6px;display:inline-block}
@media(max-width:740px){.wh-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.wh-filters{align-items:stretch}.wh-filters label{width:100%;flex:auto}.wh-filters>.wh-btn{flex:1}.wh-toolbar h2{font-size:22px}.wh-form-grid{grid-template-columns:1fr}.wh-map-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.wh-location-card{padding:11px}.wh-btn{padding:9px 10px}}
@media print{body>div:not(#whQrDialog){display:none!important}.wh-qr-dialog{position:static!important;display:block!important;box-shadow:none!important;width:auto!important;max-height:none!important}.wh-qr-dialog .wh-dialog-actions,.wh-qr-dialog .wh-close{display:none!important}}
