#office-screen {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  background: transparent;
  font-family: var(--font-family);
}

.office-content {
  flex: 1;
  overflow: hidden;
  padding: 4px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.office-content > .office-legend {
  order: -1;
  margin: 0 0 9px;
}

.office-cabinets {
  width: min(100%, 430px);
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.8vh, 8px);
}

.office-cabinet {
  position: relative;
  display: grid;
  grid-template-columns: clamp(24px, 7.5vw, 36px) 1fr;
  gap: 4px;
  align-items: stretch;
}

.office-cabinet-title {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fff;
  font-size: clamp(10px, 2.7vw, 15px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.office-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 3px;
  min-height: clamp(52px, 12.4vh, 86px);
}

.office-place {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  padding: 3px 2px;
  color: #17202d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.office-place:nth-child(1) { grid-column: 1; grid-row: 1; }
.office-place:nth-child(2) { grid-column: 2; grid-row: 1; }
.office-place:nth-child(3) { grid-column: 3; grid-row: 1; }
.office-place:nth-child(4) { grid-column: 3; grid-row: 2; }
.office-place:nth-child(5) { grid-column: 2; grid-row: 2; }
.office-place:nth-child(6) { grid-column: 1; grid-row: 2; }

.office-place-free {
  background: #080a0f;
  border-color: #f5f7fa;
  color: #f5f7fa;
}
.office-place-unknown {
  background: #050505;
  border-color: #0f5bff;
  color: #0f5bff;
}
.office-place-occupied,
.office-place-occupied_no_request {
  background: #0f5bff;
  border-color: #050505;
  color: #050505;
}

.office-place-clickable { cursor: pointer; }
.office-place,
.office-default-status-btn { font-family: var(--font-family); }
.office-place-clickable:active { transform: scale(0.97); filter: brightness(0.92); }
.office-place-disabled { cursor: default; opacity: 0.9; }
.office-place-current { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.88); }

.office-place-number {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: clamp(12px, 2.8vw, 17px);
  font-weight: 800;
  opacity: 0.75;
}

.office-place-name {
  position: absolute;
  left: 4px;
  bottom: 3px;
  max-width: 100%;
  font-size: clamp(12px, 2.8vw, 17px);
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.office-place-has-person .office-place-name {
  max-width: calc(100% - 8px);
  font-size: clamp(12px, 2.8vw, 17px);
}

.office-place-avatar {
  position: absolute;
  top: 3px;
  right: 3px;
  width: clamp(22px, 6vw, 30px);
  height: clamp(22px, 6vw, 30px);
  border: 1px solid #000;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(145deg, #666, #888);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 12px/1 var(--font-family);
}

.office-place-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.office-default-status-container {
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  width: min(100%, 430px);
  text-align: center;
}

.office-default-status-btn {
  width: 100%;
  min-height: 44px;
  padding: 13px 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(0,0,0,0.18);
  color: var(--color-text-secondary);
  font: 600 13px/1.25 var(--font-family);
  cursor: pointer;
}

.office-default-status-btn.default-status-1 { color: #f5f7fa; background: #050505; border-color: #f5f7fa; }
.office-default-status-btn.default-status-null { color: #0f5bff; background: #050505; border-color: #0f5bff; }
.office-default-status-btn.default-status-0 { color: #050505; background: #0f5bff; border-color: #0f5bff; }
.office-default-status-btn:disabled { cursor: wait; opacity: 0.65; }

.office-legend {
  width: min(100%, 430px);
  display: flex;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 10px;
  white-space: nowrap;
}

.office-legend-item { display: inline-flex; align-items: center; gap: 3px; }
.office-legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.office-legend-orange { background: #050505; border: 1px solid #0f5bff; box-sizing: border-box; }
.office-legend-red { background: #0f5bff; }
.office-legend-green { background: #f5f7fa; }

/* Production office map: one shared glass surface with 3D separators between places. */
.office-cabinets {
  padding: 4px 5px;
  gap: 0;
  border: 1px solid rgba(190, 220, 255, .24);
  border-radius: 14px;
  background: rgba(255, 255, 255, .085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -1px 0 rgba(0, 0, 0, .2), 0 12px 32px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}

.office-cabinet + .office-cabinet {
  padding-top: 0;
  border-top: 1px solid rgba(210, 232, 255, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.office-grid {
  gap: 0;
  height: clamp(52px, 12.4vh, 86px);
  min-height: 0;
}

.office-place {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dfe5ee;
  box-shadow: none;
  opacity: 1;
}

.office-place:nth-child(1),
.office-place:nth-child(2),
.office-place:nth-child(3) {
  border-bottom: 1px solid rgba(210, 232, 255, .70);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .24),
    0 1px 0 rgba(0, 0, 0, .52);
}

.office-place:nth-child(1),
.office-place:nth-child(2),
.office-place:nth-child(5),
.office-place:nth-child(6) {
  border-right: 1px solid rgba(210, 232, 255, .70);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .24),
    1px 0 0 rgba(0, 0, 0, .52);
}

.office-place-free {
  background: transparent;
  border-color: transparent;
  color: #f5f7fa;
}

.office-place-unknown,
.office-place-occupied,
.office-place-occupied_no_request {
  background: transparent;
  border-color: transparent;
  color: #2f7bff;
}

.office-place-name { text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }

.office-place-avatar {
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}

@media (min-width: 768px) {
  #office-screen { width: 100%; max-width: 430px; left: 50%; transform: translateX(-50%); }
}
