:root {
  --ink: #1c2430;
  --paper: #fff9ee;
  --line: #222a35;
  --green: #2f8f70;
  --blue: #3077bd;
  --yellow: #f4c84b;
  --red: #e85a4f;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #dcefe8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(47, 143, 112, 0.18), transparent 36%),
    linear-gradient(315deg, rgba(48, 119, 189, 0.16), transparent 34%),
    #dcefe8;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.app {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #28745f;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(36px, 8vw, 70px);
  line-height: 0.95;
}

.reset {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 24px;
  box-shadow: 3px 3px 0 var(--line);
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hud div,
.office,
.panel,
.actions button,
.log {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--line);
}

.hud div {
  padding: 12px;
}

.hud span {
  display: block;
  color: #5c6570;
  font-size: 13px;
  font-weight: 800;
}

.hud strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(24px, 4vw, 38px);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
}

.office {
  min-height: 570px;
  overflow: auto;
  background: #d8ebff;
}

.office-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 2px solid var(--line);
  background: #fff3cf;
}

.office-top p {
  margin-top: 5px;
  color: #5c6570;
  font-weight: 700;
}

.coffee-machine {
  width: 86px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
  box-shadow: 3px 3px 0 var(--line);
}

.coffee-machine span {
  font-size: 28px;
  line-height: 1;
}

.coffee-machine small {
  font-weight: 800;
}

.floor {
  position: relative;
  min-width: 820px;
  min-height: 490px;
  background:
    linear-gradient(90deg, rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    #b7d7c5;
  background-size: 48px 48px;
}

.room {
  position: absolute;
  border: 4px solid rgba(34, 42, 53, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.room::after {
  content: attr(data-label);
  position: absolute;
  left: 10px;
  top: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 249, 238, 0.92);
  border: 2px solid rgba(34, 42, 53, 0.45);
  font-size: 11px;
  font-weight: 900;
}

.wall {
  position: absolute;
  border-radius: 6px;
  background: #5f6a76;
  box-shadow: 2px 2px 0 var(--line);
  pointer-events: none;
}

.office-level-2 {
  background:
    linear-gradient(90deg, rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    #bedbc9;
}

.office-level-3 {
  background:
    linear-gradient(90deg, rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    #c7dfdc;
}

.office-level-4,
.office-level-5 {
  background:
    linear-gradient(90deg, rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(34, 42, 53, 0.08) 1px, transparent 1px),
    #d6dded;
}

.group-room,
.team-room {
  border-color: rgba(48, 119, 189, 0.75);
}

.private-office {
  border-color: rgba(47, 143, 112, 0.86);
  background: rgba(255, 243, 207, 0.24);
}

.desk {
  position: absolute;
  width: 112px;
  height: 74px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #8a5a38;
  box-shadow: 3px 3px 0 var(--line);
}

.desk::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  width: 34px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: #c7f0ff;
}

.desk::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 14px;
  width: 24px;
  height: 18px;
  border-radius: 4px;
  background: #f4c84b;
  border: 2px solid var(--line);
}

.employee {
  position: absolute;
  width: 46px;
  height: 58px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--line);
  border-radius: 16px 16px 10px 10px;
  background: var(--blue);
  box-shadow: 3px 3px 0 var(--line);
  transition: left 0.35s linear, top 0.35s linear;
}

.employee::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -20px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #ffd6a0;
}

.employee::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 62px;
  transform: translateX(-50%);
  min-width: 82px;
  padding: 3px 6px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: white;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.employee.walking {
  background: var(--green);
}

.employee.sleeping {
  background: #7a8190;
  animation: nap 1.2s infinite;
}

.employee.sleeping::after {
  content: "Zzz... klick!";
  background: #fff3cf;
}

.employee.coffee {
  background: #9b63c9;
}

.employee.waitingCoffee {
  background: #d18834;
}

.coffee-station {
  position: absolute;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
  box-shadow: 3px 3px 0 var(--line);
}

.coffee-station strong {
  font-size: 28px;
  line-height: 1;
}

.coffee-station span {
  font-size: 11px;
  font-weight: 900;
}

.coffee-station.busy {
  background: #fff3cf;
}

.queue-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(34, 42, 53, 0.55);
  border-radius: 50%;
  color: rgba(34, 42, 53, 0.65);
  font-size: 12px;
  font-weight: 900;
}

.actions {
  display: grid;
  gap: 10px;
}

.panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 12px;
  background: #eef7f4;
}

.actions button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 10px;
  align-items: center;
  min-height: 70px;
  padding: 10px;
  text-align: left;
}

.actions button span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--yellow);
  border: 2px solid var(--line);
  font-size: 21px;
  font-weight: 900;
}

.actions button strong {
  font-size: 15px;
}

.actions button small {
  color: #5c6570;
  font-weight: 800;
}

.actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.log {
  padding: 12px;
}

.log h2 {
  font-size: 18px;
}

.log ul {
  height: 170px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 7px;
}

.log li {
  padding: 7px;
  border-radius: 6px;
  background: white;
  border: 1px solid rgba(34, 42, 53, 0.2);
  font-size: 13px;
  font-weight: 700;
}

button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

@keyframes nap {
  50% {
    transform: translate(-50%, -50%) rotate(-5deg);
  }
}

@media (max-width: 900px) {
  .layout,
  .hud {
    grid-template-columns: 1fr;
  }

  .office {
    min-height: 520px;
  }

  .floor {
    min-height: 430px;
  }
}
