/* Classrooms page: room list on the left, the selected room's equipment and deliveries on the right. */
.rooms-grid {
   display: grid;
   grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
   gap: 16px;
   align-items: start;
}
@media (max-width: 900px) {
   .rooms-grid {
      grid-template-columns: minmax(0, 1fr);
   }
}

/* Room list */
.room-list-card {
   background: var(--surface);
   border: 1px solid var(--line);
   border-radius: 8px;
   overflow: hidden;
   position: sticky;
   top: 12px;
}
@media (max-width: 900px) {
   .room-list-card {
      position: static;
   }
}
.room-list-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
   padding: 12px 14px;
   border-bottom: 1px solid var(--line);
}
.room-list-head h2 {
   margin: 0;
   font-family: var(--font-display);
   font-size: 20px;
   display: flex;
   align-items: center;
   gap: 8px;
}
.room-list-head .n,
.room-row .n {
   font-family: var(--font-mono);
   font-size: 11px;
   font-weight: 500;
   background: var(--surface-2);
   border: 1px solid var(--line);
   border-radius: 99px;
   padding: 0 7px;
}
.room-list {
   list-style: none;
   margin: 0;
   padding: 0;
   max-height: 70vh;
   overflow-y: auto;
}
@media (max-width: 900px) {
   .room-list {
      max-height: 40vh;
   }
}
.room-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 10px;
   width: 100%;
   text-align: left;
   background: none;
   border: 0;
   border-bottom: 1px solid var(--line);
   padding: 11px 14px;
   cursor: pointer;
}
.room-row:hover {
   background: var(--surface-2);
}
.room-row[aria-current="true"] {
   background: var(--accent-soft);
   box-shadow: inset 3px 0 0 var(--accent);
}
.room-row b {
   display: block;
   font-weight: 600;
}
.room-row small {
   display: block;
   color: var(--muted);
   font-size: 12px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

/* Room detail */
.room-detail {
   background: var(--surface);
   border: 1px solid var(--line);
   border-radius: 8px;
   min-width: 0;
   padding: 20px;
   display: flex;
   flex-direction: column;
   gap: 22px;
}
.room-head {
   display: flex;
   justify-content: space-between;
   align-items: start;
   gap: 12px;
}
.room-head h2 {
   margin: 0;
   font-family: var(--font-display);
   font-size: 30px;
   line-height: 1.1;
   overflow-wrap: anywhere;
}
.room-head p {
   margin: 4px 0 0;
   color: var(--muted);
}
.room-stats {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 8px;
}
@media (min-width: 1240px) {
   .room-stats {
      grid-template-columns: repeat(6, minmax(0, 1fr));
   }
}
@media (max-width: 520px) {
   .room-stats {
      grid-template-columns: repeat(2, minmax(0, 1fr));
   }
}
.room-stats .stat {
   padding: 8px 12px;
}
.room-stats .stat b {
   font-size: 26px;
}

/* Equipment table */
.eq-thumb {
   width: 36px;
   height: 36px;
   border-radius: 6px;
   border: 1px solid var(--line);
   background: var(--surface-2);
   display: grid;
   place-items: center;
   overflow: hidden;
   color: var(--muted);
   flex: none;
}
.eq-thumb.photo {
   background: var(--photo-bg);
}
.eq-thumb img {
   width: 100%;
   height: 100%;
   object-fit: contain;
   padding: 2px;
}
.eq-name {
   display: flex;
   align-items: center;
   gap: 10px;
   min-width: 0;
}
.eq-name b {
   font-weight: 600;
   display: block;
}
.eq-name small {
   display: block;
   color: var(--muted);
   font-family: var(--font-mono);
   font-size: 11px;
   overflow-wrap: anywhere;
}
.eq-actions {
   display: flex;
   gap: 6px;
   justify-content: flex-end;
   align-items: center;
   flex-wrap: wrap;
}
.eq-actions .btn {
   padding: 4px 10px;
   font-size: 12px;
}
@media (pointer: coarse) {
   .eq-actions .btn {
      padding: 8px 12px;
   }
}
.eq-actions input {
   width: 56px;
   border: 1px solid var(--line);
   border-radius: 6px;
   padding: 4px 6px;
   font-family: var(--font-mono);
}

/* Add equipment form */
.add-eq {
   border: 1px solid var(--line);
   border-radius: 8px;
   overflow: hidden;
}
.add-eq .seg {
   grid-template-columns: repeat(2, minmax(0, 1fr));
}
.add-eq-form {
   padding: 14px;
   display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   gap: 10px;
   align-items: end;
}
.add-eq-form .full {
   grid-column: 1 / -1;
}
@media (max-width: 520px) {
   .add-eq-form {
      grid-template-columns: minmax(0, 1fr);
   }
}
