.equipment-explorer-layout { display:grid; grid-template-columns:340px minmax(0,1fr); gap:0; align-items:start; }
.equipment-explorer-content { min-width:0; }
.site-explorer { min-width:0; background:var(--surface); overflow:hidden; }
.site-explorer-icon-wrap { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.site-explorer-icon { width:18px; height:18px; flex-shrink:0; vertical-align:middle; pointer-events:none; }
.site-explorer-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:20px 16px 18px; }
.site-explorer-heading h2 { font-size:15px; font-weight:750; margin:0; letter-spacing:-.02em; }
.site-explorer-heading p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.site-explorer-heading-actions { display:flex; gap:2px; }
.site-explorer-icon-button { display:inline-flex; align-items:center; justify-content:center; flex:0 0 30px; width:30px; height:32px; min-height:32px; padding:0; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; }
.site-explorer-icon-button:hover { color:var(--brand-strong, var(--brand-dark)); background:var(--brand-soft); }
.site-explorer-heading [data-site-create] { color:var(--brand-strong, var(--brand-dark)); background:var(--brand-soft); }
.site-explorer-search { position:relative; display:block; margin:0 14px 16px; }
.site-explorer-search > .site-explorer-icon-wrap { position:absolute; left:11px; top:10px; color:var(--muted); pointer-events:none; }
.site-explorer-search .site-explorer-icon { width:16px; height:16px; }
.site-explorer-search input { width:100%; min-width:0; height:36px; border:1px solid var(--line); border-radius:8px; padding:7px 38px 7px 34px; font:inherit; font-size:12px; font-weight:400; background:var(--surface); color:var(--ink); }
.site-explorer-search input::-webkit-search-cancel-button { display:none; }
.site-explorer-search-clear { position:absolute; right:3px; top:2px; }
.site-explorer-search-clear[hidden] { display:none; }
.site-explorer-equipment-matches { flex-shrink:0; min-width:0; margin:0 14px 12px; }
.site-explorer-equipment-status { margin:0 0 6px; font-size:11px; line-height:1.4; color:var(--muted); }
.site-explorer-equipment-results { display:grid; gap:4px; max-height:190px; overflow:auto; scrollbar-width:thin; }
.site-explorer-equipment-match { display:grid; gap:3px; width:100%; min-width:0; padding:8px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.site-explorer-equipment-match strong { color:var(--brand-strong, var(--brand-dark)); }
.site-explorer-equipment-serial,.site-explorer-equipment-path { color:var(--muted); font-size:11px; line-height:1.4; }
.site-explorer-equipment-match:hover,.site-explorer-equipment-match:focus-visible { background:var(--brand-soft); border-color:var(--brand); outline-offset:-2px; }
.site-explorer-choice.site-explorer-search-match { border-color:var(--brand); background:var(--brand-soft); }
.site-explorer-shortcuts { display:grid; gap:4px; padding:0 10px 16px; }
.site-explorer-choice { min-width:0; display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:9px 11px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.site-explorer-choice-label { flex:1; min-width:0; }
.site-explorer-choice > .site-explorer-icon-wrap { color:var(--muted); }
.site-explorer-choice:hover { background:var(--surface-hover, #f0edf5); }
.site-explorer-choice[aria-pressed="true"] { color:var(--brand-strong, var(--brand-dark)); background:var(--brand-soft); font-weight:650; }
.site-explorer-choice[aria-pressed="true"] > .site-explorer-icon-wrap { color:var(--brand-strong, var(--brand-dark)); }
.site-explorer-choice.has-warning > .site-explorer-icon-wrap { color:var(--amber, #b77916); }
.site-explorer-count { flex-shrink:0; color:var(--muted); font-size:12px; font-weight:500; font-variant-numeric:tabular-nums; }
.site-explorer-choice[aria-pressed="true"] .site-explorer-count { color:var(--brand-strong, var(--brand-dark)); }
.site-explorer-section { display:flex; align-items:center; gap:7px; padding:10px 16px 6px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; font-weight:650; letter-spacing:.06em; text-transform:uppercase; }
.site-explorer-site-total { font-size:10px; font-weight:600; letter-spacing:0; background:var(--surface-muted, #eeebf2); border-radius:5px; padding:2px 5px; }
.site-explorer-section .site-explorer-icon-button { margin-left:auto; height:26px; min-height:26px; }
.site-explorer-section .site-explorer-icon { width:15px; height:15px; }
.site-explorer-tree-host { position:relative; flex:1; min-height:96px; margin:0 8px; overflow:hidden; }
.site-explorer .site-explorer-tree.wunderbaum {
  --wb-font-stack:inherit;
  --wb-node-text-color:var(--ink);
  --wb-background-color:transparent;
  --wb-hover-color:#f0edf5;
  --wb-active-color:transparent;
  --wb-active-color-grayscale:transparent;
  --wb-active-border-color:transparent;
  --wb-active-border-color-grayscale:transparent;
  --wb-active-hover-color:#f0edf5;
  --wb-active-hover-color-grayscale:#f0edf5;
  --wb-active-hover-border-color:transparent;
  --wb-focus-border-color:var(--brand);
  --wb-drop-target-color:var(--brand-soft);
  --wb-icon-outer-width:22px;
  height:100%; min-height:0; max-height:none; padding:0; margin:0; border:0; border-radius:6px; font-size:13px; overflow:auto; scrollbar-width:thin; scrollbar-color:#cec7d7 transparent;
}
.site-explorer .wunderbaum .wb-row { border-radius:7px; cursor:pointer; }
.site-explorer .wunderbaum .wb-node { display:flex; align-items:center; height:100%; padding:0 5px 0 2px; }
.site-explorer .wunderbaum .wb-node .wb-title { width:auto!important; flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; gap:3px; line-height:1.2; padding:0 6px; font-size:13px; }
.site-explorer-node-name,.site-explorer-tenant-name { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.site-explorer-node-name { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; white-space:normal; overflow-wrap:anywhere; font-size:12px; line-height:15px; }
.site-explorer-tenant-name { color:var(--muted); font-size:11px; font-weight:400; }
.site-explorer .wunderbaum .wb-node i.wb-icon,.site-explorer .wunderbaum .wb-node i.wb-expander { display:inline-flex; align-items:center; justify-content:center; width:22px; min-width:22px; height:100%; padding:0; color:var(--muted); }
.site-explorer .wunderbaum .wb-node i.wb-icon { color:var(--muted, #8b759d); }
.site-explorer .wunderbaum .wb-expander .site-explorer-icon { width:13px; height:13px; }
.site-explorer .wunderbaum .wb-indent:not(.wb-expander) { flex:0 0 18px; width:18px; align-self:stretch; margin-left:0; border-left:1px solid var(--line, #e5dfec); }
/* Leaf folders need the branch indent, but no empty expand-button slot. */
.site-explorer .wunderbaum .wb-node i.wb-expander.wb-indent { display:none; }
.site-explorer-node-meta { display:flex; align-items:center; gap:4px; flex-shrink:0; margin-left:auto; }
.site-explorer-node-meta .site-explorer-count { font-size:11px; }
.site-explorer-node-meta .site-explorer-icon-button { flex-basis:26px; width:26px; height:28px; min-height:28px; opacity:0; }
.site-explorer .wb-row:hover .site-explorer-icon-button,.site-explorer .wb-row.wb-focus .site-explorer-icon-button,.site-explorer .wb-row:focus-within .site-explorer-icon-button,.site-explorer .wb-row.site-explorer-current .site-explorer-icon-button { opacity:1; }
.site-explorer .wunderbaum .wb-node-list .wb-row.site-explorer-current { color:var(--brand-strong, var(--brand-dark)); background:var(--brand-soft); font-weight:650; }
.site-explorer .wunderbaum .wb-row.site-explorer-current .wb-icon,.site-explorer .wunderbaum .wb-row.site-explorer-current .site-explorer-count { color:var(--brand-strong, var(--brand-dark)); }
.site-explorer .wunderbaum:focus-within .wb-node-list .wb-row.wb-focus { outline:1px solid var(--brand); outline-offset:-1px; }
.site-explorer .wunderbaum .wb-status-noData,.site-explorer .wunderbaum > .wb-header { display:none; }
.site-explorer-empty { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:10px; margin:0; padding:32px 18px; text-align:center; pointer-events:none; }
.site-explorer-empty > .site-explorer-icon-wrap { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:12px; color:var(--muted, #8b759d); background:var(--surface); }
.site-explorer-empty .site-explorer-icon { width:24px; height:24px; }
.site-explorer-empty strong { font-size:13px; font-weight:600; }
.site-explorer-empty p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.site-explorer-footer { flex-shrink:0; padding:12px 14px 16px; border-top:1px solid var(--line); background:var(--surface-subtle, #faf9fc); }
.site-explorer-footer .button { width:100%; min-height:34px; padding:6px 12px; font-size:12px; }
.site-explorer-footer.has-selection .button { background:var(--brand); color:white; border-color:var(--brand); }
.site-explorer-footer.has-selection .button:hover:not(:disabled),.site-explorer-footer.has-selection .button:focus-visible:not(:disabled) { background:var(--brand-dark); color:white; border-color:var(--brand-dark); }
.site-explorer-help { margin:10px 0 0; color:var(--muted); font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.site-explorer-choice.site-explorer-drop-ready,.site-explorer .wunderbaum .wb-row.wb-drop-target { background:var(--brand-soft); outline:2px solid var(--brand); outline-offset:-2px; color:var(--brand-strong, var(--brand-dark)); }
.site-explorer-choice.site-explorer-drop-blocked { outline:2px dashed var(--muted); outline-offset:-2px; cursor:not-allowed; }
.site-explorer-menu { position:fixed; z-index:100; min-width:205px; max-width:calc(100vw - 16px); padding:5px; border:1px solid var(--line); border-radius:9px; background:var(--surface); box-shadow:0 8px 28px rgba(35,20,52,.14); }
.site-explorer-menu-item { display:flex; align-items:center; gap:8px; width:100%; min-height:36px; padding:8px 10px; border:0; border-radius:5px; background:transparent; color:var(--ink); font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.site-explorer-menu-item:hover,.site-explorer-menu-item:focus-visible { background:var(--brand-soft); color:var(--brand-strong, var(--brand-dark)); }
.site-explorer-menu-item.danger { color:var(--red); }
.site-explorer-menu-item.danger:hover,.site-explorer-menu-item.danger:focus-visible { background:var(--red-soft); color:var(--red); }
.site-explorer-delete-name { margin:0 0 6px; font-size:15px; font-weight:650; overflow-wrap:anywhere; }
.site-explorer-delete-description { margin:18px 0; font-size:13px; line-height:1.6; }
.site-explorer-dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.equipment-move-handle { display:inline-grid; place-items:center; flex:0 0 24px; width:24px; height:30px; padding:0; border:1px solid transparent; border-radius:5px; background:transparent; color:var(--muted, #8b8795); cursor:grab; user-select:none; }
.equipment-move-handle .site-explorer-icon { width:16px; height:16px; }
.equipment-move-handle:hover { background:var(--brand-soft); color:var(--brand-strong, var(--brand-dark)); }
.equipment-move-handle:active { cursor:grabbing; }
.equipment-dragging { opacity:.55; }
.site-explorer-icon-button:focus-visible,.site-explorer-choice:focus-visible,.equipment-move-handle:focus-visible,.site-explorer-search input:focus-visible { outline:2px solid var(--brand); outline-offset:1px; }
@media(hover:none) { .site-explorer-node-meta .site-explorer-icon-button { opacity:1; } }
@media(max-width:820px) { .site-explorer-tree-host { flex:none; height:220px; } .site-explorer-footer { padding:10px 14px; } .site-explorer-empty { padding-top:18px; } }
.equipment-site-context { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:16px 18px; margin-bottom:12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.equipment-site-context:empty { display:none; }
.equipment-site-context h2 { margin:4px 0; font-size:18px; }
.equipment-site-context .eyebrow { font-size:10px; }
.equipment-site-context .muted { font-size:12px; line-height:1.5; }
.site-explorer-dialog { width:min(480px,calc(100vw - 32px)); max-height:calc(100vh - 48px); padding:22px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--surface); box-shadow:0 20px 60px rgba(15,23,42,.22); }
.site-explorer-dialog::backdrop { background:rgba(15,23,42,.42); }
.site-explorer-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.site-explorer-dialog h2 { font-size:18px; margin:0; }
.site-explorer-dialog fieldset { margin:0; padding:0; border:0; min-width:0; }
.site-explorer-field { display:flex; flex-direction:column; gap:6px; margin:16px 0; font-size:12px; }
.site-explorer-field input,.site-explorer-field select,.site-explorer-field textarea { width:100%; min-width:0; min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); font:inherit; }
.site-explorer-field textarea { resize:vertical; }
.site-explorer-selection-preview { margin-bottom:18px; color:var(--muted); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.site-explorer-active { display:flex; align-items:center; gap:8px; margin:14px 0; font-size:12px; }
.site-explorer-active input { width:20px; height:20px; }
@media(max-width:1100px) { .equipment-explorer-layout { grid-template-columns:300px minmax(0,1fr); gap:12px; } }
@media(max-width:1100px) {
  .equipment-explorer-content .equipment-table { min-width:760px; }
  .equipment-explorer-content .equipment-table-wrap { position:relative; max-width:100%; overflow-x:auto; }
}
@media(max-width:800px) { .equipment-explorer-layout { grid-template-columns:minmax(0,1fr); } .site-explorer-tree { max-height:280px; } .site-explorer-search input,.site-explorer-field input,.site-explorer-field select,.site-explorer-field textarea { font-size:16px; } }

.tenant-admin-site-areas { display:grid; gap:8px; margin-top:12px; }
.tenant-admin-site-area { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.tenant-admin-site-area .button, .tenant-admin-site-areas > .button { min-height:32px; padding:5px 10px; font-size:12px; width:fit-content; }

@media(min-width:651px) { .tenant-admin-device-form { grid-template-columns:repeat(2,minmax(0,1fr)) auto; } }
