.pb-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.pb-workspace .panel {
  min-width: 0;
}
.pb-tree .panel-head {
  padding: 18px 14px;
  align-items: center;
}
.pb-tree .panel-head h2 {
  font-size: 15px;
}
.pb-tree .panel-head p {
  font-size: 11px;
}
.pb-root-add {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  font-size: 23px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: 6px;
}
.pb-all {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 20px);
  margin: 0 10px 10px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: #f5f8fc;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
}
.pb-all span {
  margin-left: auto;
}
.pb-all.active {
  background: var(--primary-light);
  color: var(--primary);
}
.pb-tree-list,
.pb-tree-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pb-tree-list {
  max-height: 590px;
  overflow: auto;
  padding: 0 6px 10px;
}
.pb-node {
  display: flex;
  align-items: center;
  min-width: 220px;
  padding: 6px 3px 6px calc(3px + var(--pb-depth) * 11px);
  border-radius: 6px;
  position: relative;
  min-height: 48px;
}
.pb-node:hover {
  background: #f5f8fc;
}
.pb-node.active {
  background: var(--primary-light);
}
.pb-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 20px;
  padding: 0;
  flex: none;
  font-size: 18px;
}
.pb-toggle:disabled {
  opacity: 0.25;
}
.pb-node-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  font-size: 12px;
}
.pb-node-name .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
.pb-node-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pb-node-name small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.pb-node.active .pb-node-name {
  color: var(--primary);
  font-weight: 600;
}
.pb-node-actions {
  display: flex;
  flex: none;
  margin-left: 3px;
}
.pb-node-actions button {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  width: 22px;
  height: 28px;
  padding: 0;
  color: #57708f;
  font-size: 20px;
}
.pb-node-actions button:hover {
  background: white;
  color: var(--primary);
}
.pb-node-actions .icon {
  width: 13px;
  height: 13px;
}
.pb-tree-footer {
  border-top: 1px solid var(--line);
  padding: 12px;
}
.pb-tree-footer .btn {
  width: 100%;
  font-size: 12px;
}
.pb-register .panel-head {
  align-items: flex-start;
}
.pb-register .panel-head p {
  max-width: 650px;
  overflow-wrap: anywhere;
}
.pb-toolbar {
  padding: 0 20px 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.pb-toolbar .search-field {
  flex: 1;
  min-width: 150px;
}
.pb-toolbar .btn {
  flex: none;
}
.pb-toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  color: var(--ink);
}
.pb-building-table {
  min-width: 690px;
}
.pb-building-table td,
.pb-building-table th {
  padding: 17px 16px;
}
.pb-building-name {
  font-weight: 600;
  text-align: left;
}
.pb-building-table td:first-child {
  min-width: 145px;
}
.pb-building-table small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}
.pb-room-numbers {
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pb-row-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}
.pb-row-actions .text-link {
  font-size: 12px;
  white-space: nowrap;
}
.pb-row-actions .pb-danger {
  color: var(--red);
}
.pb-occupancy {
  color: var(--primary);
  font-size: 12px;
  white-space: nowrap;
}
.pb-detail-path {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-bottom: 18px;
}
.pb-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}
.pb-detail-summary > div {
  background: #f5f8fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}
.pb-detail-summary strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
}
.pb-detail-summary span {
  color: var(--muted);
  font-size: 11px;
}
.pb-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.pb-detail-heading .btn {
  font-size: 12px;
}
.pb-structure {
  display: grid;
  gap: 10px;
  margin: 8px 0 20px;
}
.pb-structure > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
}
.pb-structure small {
  color: var(--muted);
  font-size: 11px;
}
.pb-structure span {
  font-size: 12px;
  color: var(--muted);
}
.pb-structure .pb-row-actions {
  justify-content: flex-end;
}
.pb-room-table {
  min-width: 570px;
}
.pb-room-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.pb-room-table td,
.pb-room-table th {
  padding: 13px 10px;
}
.pb-detail-status {
  margin-bottom: 16px;
}
.pb-delete-confirm {
  background: #b73d38;
  border-color: #b73d38;
  color: white;
}
[data-pb-form] [hidden] {
  display: none !important;
}
[data-pb-form] textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
[data-pb-form] .field small {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
@media (max-width: 1100px) {
  .pb-workspace {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 14px;
  }
  .pb-register .panel-head,
  .pb-toolbar {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-width: 850px) {
  .pb-workspace {
    grid-template-columns: 1fr;
  }
  .pb-tree-list {
    max-height: 260px;
  }
  .pb-tree .panel-head {
    padding: 14px;
  }
  .pb-node {
    min-width: 0;
  }
  .pb-node-name span {
    white-space: normal;
  }
  .pb-node-actions button {
    width: 30px;
    height: 30px;
  }
  .pb-tree-footer {
    padding: 10px 14px;
  }
}
@media (max-width: 480px) {
  .pb-toolbar .search-field {
    flex-basis: 100%;
  }
  .pb-toolbar .btn {
    flex: 1;
  }
  .pb-register .panel-head {
    gap: 12px;
  }
  .pb-register .panel-head h2 {
    font-size: 16px;
  }
  .pb-detail-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pb-structure > div {
    grid-template-columns: 1fr;
  }
  .pb-structure .pb-row-actions {
    justify-content: flex-start;
    margin-top: 6px;
  }
}
/* Follow the approved dashboard's reading size and control targets. */
.pb-tree .panel-head p,
.pb-node-name small,
.pb-building-table small,
.pb-room-table small,
.pb-detail-summary span,
.pb-structure small,
[data-pb-form] .field small {
  font-size: 12px;
}
.pb-all,
.pb-node-name,
.pb-tree-footer .btn,
.pb-row-actions .text-link,
.pb-occupancy,
.pb-detail-path,
.pb-structure span {
  font-size: 14px;
}
.pb-root-add {
  width: 40px;
  height: 40px;
}
.pb-node {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
}
.pb-node-actions {
  display: none;
  grid-column: 2;
  gap: 4px;
  margin: 5px 0 0;
}
.pb-node:hover .pb-node-actions,
.pb-node:focus-within .pb-node-actions,
.pb-node.active .pb-node-actions {
  display: flex;
}
.pb-node-actions button {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid var(--line);
}
.pb-node-actions .icon {
  width: 16px;
  height: 16px;
}
.pb-node-name {
  min-height: 40px;
}
.pb-row-actions .text-link {
  min-height: 40px;
}
.pb-row-actions {
  gap: 9px;
}
.pb-building-table {
  min-width: 760px;
}
@media (hover: none) {
  .pb-node-actions {
    display: flex;
  }
}
.pb-room-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 12px;
}
.pb-room-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
}
.pb-room-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.pb-room-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 12px;
}
.pb-room-tenant {
  min-height: 48px;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.pb-room-tenant strong {
  font-weight: 500;
}
.pb-room-tenant span {
  color: var(--muted);
}
.pb-room-card .pb-row-actions {
  border-top: 1px solid var(--line);
  padding-top: 4px;
  justify-content: space-between;
}
.pb-room-table:not(.pb-room-cards) .pb-row-actions {
  flex-wrap: nowrap;
}
@media (max-width: 480px) {
  .pb-room-cards {
    grid-template-columns: 1fr;
  }
}
