/* Admin bulk facility upload (js/layout-bulk.js): a dialog over the Admin Tools modal, in its dark slate theme. Heights avoid dvh (Firefox).
   When its sections do not fit (a landscape phone) the dialog itself scrolls, so the footer buttons stay reachable. */
.lbu{width:min(1000px,calc(100% - 24px));max-width:none;max-height:calc(100% - 24px);margin:auto;padding:0;border:1px solid #334155;border-radius:16px;background:#0f172a;color:#e2e8f0;box-shadow:0 30px 120px #000a;font:13px/1.45 Inter,system-ui,sans-serif;overflow:auto}
.lbu[open]{display:flex;flex-direction:column}
.lbu::backdrop{background:#000b}
.lbu button{font:inherit;cursor:pointer}
.lbu button:disabled{opacity:.45;cursor:default}
.lbu :focus-visible{outline:2px solid #22d3ee;outline-offset:2px}
.lbu-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;padding:18px 20px 14px;border-bottom:1px solid #1e293b;background:#111c30}
.lbu-head h2{margin:0;font-size:16px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#fff}
.lbu-head p{margin:4px 0 0;color:#94a3b8;font-size:12px}
.lbu-x{flex:none;width:32px;height:32px;border:0;border-radius:999px;background:transparent;color:#94a3b8;font-size:22px;line-height:1}
.lbu-x:hover{background:#1e293b;color:#fff}
.lbu-drop{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:center;margin:14px 20px 0;padding:18px;border:2px dashed #334155;border-radius:12px;background:#0b1424;text-align:center;transition:border-color .15s,background .15s}
.lbu-drop.lbu-over{border-color:#10b981;background:#062a22}
.lbu-drop strong{color:#e2e8f0}
.lbu-drop span{color:#64748b}
.lbu-drop small{flex-basis:100%;color:#64748b;font-family:ui-monospace,Consolas,monospace;font-size:11px}
.lbu-drop button,.lbu-foot button{border:1px solid #475569;background:#1e293b;color:#e2e8f0;border-radius:8px;padding:7px 14px;font-weight:600}
.lbu-drop button:hover:not(:disabled),.lbu-foot button:hover:not(:disabled){border-color:#64748b;background:#273449}
.lbu-note{margin:10px 20px 0;font-size:12px;color:#94a3b8}
.lbu-note:empty{display:none}
.lbu-note.lbu-warn{color:#fbbf24}
.lbu-note.lbu-ok{color:#34d399}
.lbu-opts{display:flex;flex-wrap:wrap;gap:10px 20px;align-items:center;margin:12px 20px 0}
.lbu-opts label{display:flex;gap:8px;align-items:center;color:#94a3b8;font-size:12px}
.lbu-opts input[type=text]{width:min(280px,60vw);background:#0b1424;border:1px solid #334155;border-radius:6px;padding:6px 8px;color:#fff;font:inherit}
.lbu-check input{accent-color:#10b981;width:15px;height:15px}
.lbu-table-wrap{flex:1 1 auto;min-height:120px;margin:12px 20px 0;overflow:auto;border:1px solid #1e293b;border-radius:10px;background:#0b1424}
.lbu-table{width:100%;border-collapse:collapse;font-size:12px}
.lbu-table th{position:sticky;top:0;z-index:1;background:#111c30;color:#64748b;font-size:10px;letter-spacing:.08em;text-transform:uppercase;text-align:left;padding:8px 10px;border-bottom:1px solid #1e293b}
.lbu-table td{padding:6px 10px;border-bottom:1px solid #16213a;vertical-align:middle}
.lbu-file{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#cbd5e1}
.lbu-file small,.lbu-status-cell small{display:block;color:#64748b;font-size:11px;white-space:normal}
.lbu-name{width:100%;min-width:140px;background:#0f172a;border:1px solid #334155;border-radius:6px;padding:5px 7px;color:#fff;font:inherit}
.lbu-name:disabled{color:#64748b;border-color:#1e293b}
.lbu-meta{color:#94a3b8;white-space:nowrap}
.lbu-status{display:inline-block;padding:1px 8px;border-radius:999px;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;background:#1e293b;color:#94a3b8}
.lbu-s-ready{background:#064e3b;color:#6ee7b7}
.lbu-s-invalid,.lbu-s-failed{background:#4c1d1d;color:#fca5a5}
.lbu-s-skip{background:#422006;color:#fcd34d}
.lbu-s-uploading{background:#0c4a6e;color:#7dd3fc}
.lbu-s-done{background:#164e63;color:#67e8f9}
.lbu-remove{width:26px;height:26px;border:0;border-radius:6px;background:transparent;color:#64748b;font-size:18px;line-height:1}
.lbu-remove:hover:not(:disabled){background:#4c1d1d;color:#fca5a5}
.lbu-row-done td,.lbu-row-skip td{opacity:.78}
.lbu-empty{margin:0;padding:28px;text-align:center;color:#475569;font-style:italic}
.lbu-empty[hidden]{display:none}
.lbu-progress{display:flex;gap:12px;align-items:center;margin:12px 20px 0;color:#94a3b8;font-size:12px}
.lbu-progress[hidden]{display:none}
.lbu-progress progress{flex:1;height:8px;accent-color:#10b981}
.lbu-foot{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end;padding:14px 20px;margin-top:14px;border-top:1px solid #1e293b;background:#111c30}
.lbu-foot>span{margin-right:auto;color:#94a3b8;font-size:12px}
.lbu-foot button[hidden]{display:none}
.lbu-foot .lbu-primary{background:#059669;border-color:#059669;color:#fff}
.lbu-foot .lbu-primary:hover:not(:disabled){background:#10b981;border-color:#10b981}
.lbu-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:640px){
  .lbu-head,.lbu-foot{padding-left:16px;padding-right:16px}
  .lbu-drop,.lbu-note,.lbu-opts,.lbu-table-wrap,.lbu-progress{margin-left:16px;margin-right:16px}
  .lbu-meta{display:none}
  .lbu-table th,.lbu-table td{padding:6px}
  .lbu-file{max-width:84px}
  .lbu-name{min-width:96px}
  .lbu-remove{width:22px}
}
@media (max-height:520px){
  .lbu-head{padding-top:12px;padding-bottom:10px}
  .lbu-head p{display:none}
  .lbu-drop{margin-top:10px;padding:10px}
  .lbu-table-wrap{min-height:90px}
  .lbu-foot{padding-top:10px;padding-bottom:10px;margin-top:10px}
}
