/* ============================================================
   BUBUHAN JERUK MANIS — pixel-art stylesheet v2
   ============================================================ */
:root {
  --ink:   #12141c;
  --wall:  #3b4252;
  --wall2: #2e3440;
  --floor: #a97c50;
  --floor2:#8a6238;
  --amber: #ffd43b;
  --green: #38d9a9;
  --red:   #ff6b6b;
  --blue:  #4dabf7;
  --paper: #f1f3f5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Courier New", ui-monospace, monospace;
  background: #191d27;
  color: #e9ecef;
  -webkit-font-smoothing: none;
}

/* ---------------- scene shell ---------------- */
.scene-wrap { transform-origin: top left; }

.scene {
  width: 1500px;
  margin: 12px auto 0;
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(0,0,0,.35);
  background: var(--wall);
}

/* ---------------- wall ---------------- */
.wall {
  position: relative;
  height: 260px;
  background:
    repeating-linear-gradient(90deg,
      rgba(255,255,255,.02) 0 2px, transparent 2px 52px),
    linear-gradient(180deg, var(--wall) 0%, var(--wall2) 100%);
  border-bottom: 6px solid #262b34;
  overflow: hidden;
}

.sign {
  position: absolute; left: 20px; top: 10px;
  background: #141420;
  border: 4px solid var(--amber);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 6px 12px;
}
.sign b   { color: var(--amber); font-size: 19px; letter-spacing: 1px; display: block; }
.sign small { color: #8b95a5; font-size: 11px; display: block; margin-top: 4px; }

.clock { position: absolute; right: 26px; top: 12px; text-align: center; }
.clock-face {
  display: inline-block;
  background: #141420;
  border: 4px solid #5f6d8c;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 7px 14px;
  font-size: 18px;
  font-weight: bold;
  color: #7cfc98;
}
.clock small { color: #8b95a5; font-size: 11px; display: block; margin-top: 6px; }

.window {
  position: absolute; left: 22px; top: 76px;
  width: 170px; height: 128px;
  background: #5b4636;
  border: 5px solid #3e2f23;
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}
.sky { position: relative; width: 100%; height: 100%; overflow: hidden; transition: background 1s; }

.sun {
  position: absolute; right: 26px; top: 20px;
  width: 30px; height: 30px; background: var(--amber);
  box-shadow: 0 0 0 5px rgba(255,212,59,.35);
  transition: opacity .8s;
}
.moon {
  position: absolute; right: 28px; top: 18px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #e9ecef;
  box-shadow: 7px 2px 0 0 #e9ecef;
  transform: translateX(-6px);
  opacity: 0; transition: opacity .8s;
}
.stars i {
  position: absolute; width: 3px; height: 3px; background: #f8f9fa;
  opacity: 0; transition: opacity .8s;
  animation: twinkle 2.4s infinite;
}
.stars i:nth-child(1){ left: 16px;  top: 18px; }
.stars i:nth-child(2){ left: 52px;  top: 40px; animation-delay: .4s; }
.stars i:nth-child(3){ left: 92px;  top: 14px; animation-delay: .9s; }
.stars i:nth-child(4){ left: 136px; top: 46px; animation-delay: .2s; }
.stars i:nth-child(5){ left: 32px;  top: 66px; animation-delay: 1.2s; }
.stars i:nth-child(6){ left: 110px; top: 72px; animation-delay: .7s; }
.stars i:nth-child(7){ left: 160px; top: 22px; animation-delay: 1.6s; }
.stars i:nth-child(8){ left: 68px;  top: 88px; animation-delay: 1s; }
.hill { position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: #2f9e44; border-top: 4px solid #237032; }

body[data-daypart="morning"]   .sky { background: linear-gradient(180deg,#ffe066 0%,#a5d8ff 70%); }
body[data-daypart="day"]       .sky { background: linear-gradient(180deg,#4dabf7 0%,#a5d8ff 80%); }
body[data-daypart="afternoon"] .sky { background: linear-gradient(180deg,#ff922b 0%,#ffd8a8 80%); }
body[data-daypart="night"]     .sky { background: linear-gradient(180deg,#0b1026 0%,#1b2447 80%); }
body[data-daypart="night"]     .sun  { opacity: 0; }
body[data-daypart="night"]     .moon { opacity: 1; }
body[data-daypart="night"]     .stars i { opacity: .9; }
body[data-daypart="morning"]   .moon,
body[data-daypart="day"]       .moon,
body[data-daypart="afternoon"] .moon { opacity: 0; }

@keyframes twinkle { 0%,100% { opacity:.9; } 50% { opacity:.25; } }

.wallmon {
  position: absolute; right: 26px; top: 76px;
  width: 380px;
  background: #10131c;
  border: 5px solid #454f63;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 10px 12px 12px;
}
.wm-title {
  font-size: 11px; color: #74c0fc; letter-spacing: 1px;
  border-bottom: 2px solid #2c3444; padding-bottom: 6px; margin-bottom: 8px;
  display: flex; justify-content: space-between;
}
#wm-live { color: #51cf66; animation: pulse-soft 2s infinite; }
@keyframes pulse-soft { 50% { opacity: .35; } }
#wm-live.off { color: var(--red); animation: none; }
.wm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.wm-cell {
  background: #171b26; border: 2px solid #2c3444; padding: 5px 7px; min-width: 0;
}
.wm-cell.wm-wide { grid-column: span 2; }
.wm-cell small { display: block; color: #6c788c; font-size: 10px; letter-spacing: 1px; }
.wm-cell b { display: block; color: #dfe6ee; font-size: 13px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-cell b.good { color: var(--green); }
.wm-cell b.warn { color: #ffd43b; }
.wm-cell b.bad  { color: var(--red); }

.poster {
  position: absolute; left: 50%; top: 70px;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  color: #343a40; font-size: 10px; font-weight: bold;
  text-align: center; line-height: 1.5;
  padding: 8px 12px;
  transform: translateX(-50%) rotate(-1.5deg);
}

/* ---------------- floor + zona divisi ---------------- */
.floor {
  position: relative;
  display: flex;
  align-items: stretch;
  background:
    repeating-linear-gradient(90deg,
      var(--floor) 0 96px,
      var(--floor2) 96px 100px),
    var(--floor);
  border-top: 4px solid #6b4a28;
  padding: 12px 12px 16px;
  gap: 12px;
}
.floor-main { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 30px; align-items: flex-start; }
.side {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone { flex: 0 0 auto; margin-bottom: 12px; }
.zone:last-child { margin-bottom: 0; }
.zone-board {
  display: inline-block;
  background: #141420;
  border: 4px solid #5f6d8c;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--amber);
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 6px 16px;
  margin-bottom: 10px;
}
.zone-board .zi { color: #e9ecef; }
.zone-desks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding-left: 6px;
}

/* ---------------- ruang santai ---------------- */
.room {
  background: rgba(0,0,0,.14);
  border: 4px solid rgba(0,0,0,.28);
  padding: 14px;
}
.room-board {
  display: inline-block;
  background: #141420;
  border: 3px solid #5f6d8c;
  color: var(--amber);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.room-board.dark { border-color: #8d6708; color: #ffe066; }

.tv {
  width: 100%; height: 74px;
  background: #1a1d26;
  border: 4px solid #454f63;
  box-shadow: 3px 3px 0 var(--ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.tv-screen {
  color: #7cfc98;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
  animation: tvflicker 3.5s steps(2) infinite;
}
@keyframes tvflicker { 50% { opacity: .82; } }

.sofa { position: relative; height: 150px; margin-bottom: 8px; }
.sofa-back {
  position: absolute; bottom: 44px; left: 0; right: 0; height: 46px;
  background: #c0503c; border: 4px solid #7e2f22;
}
.sofa-seat {
  position: absolute; bottom: 8px; left: 6px; right: 6px; height: 40px;
  background: #a03a2b; border: 4px solid #7e2f22;
}
.sofa-arm { position: absolute; bottom: 4px; width: 26px; height: 96px; background: #d1664f; border: 4px solid #7e2f22; }
.sofa-arm.l { left: 0; } .sofa-arm.r { right: 0; }

.loungers { position: absolute; inset: 0; }
.lounger {
  position: absolute; bottom: 48px; width: 100px; height: 92px;
}
.lounger:nth-child(1) { left: 12%; }
.lounger:nth-child(2) { left: 44%; }
.lounger:nth-child(3) { right: 10%; }
.lounger .char { width: 96px; height: 90px; }

.coffee { position: absolute; right: 14px; bottom: 14px; width: 30px; height: 44px; background: #495057; border: 3px solid #212529; }
.coffee .cup { position: absolute; top: 8px; left: 7px; width: 16px; height: 10px; background: #e9ecef; }
.coffee .led { position: absolute; bottom: 5px; left: 11px; width: 8px; height: 8px; background: #51cf66; animation: pulse-soft 1.6s infinite; }

/* ---------------- kamar tidur ---------------- */
.beds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bed {
  position: relative;
  height: 138px;
  background: #22303e;
  border: 4px solid #3e2f23;
  overflow: hidden;
}
.bed .pillow {
  position: absolute; top: 10px; left: 10px;
  width: 74px; height: 30px;
  background: #e9ecef; border: 3px solid #c5ccd3;
}
.bed .blanket {
  position: absolute; left: 0; right: 0; bottom: 0; height: 58%;
  background: var(--blanket, #5c7cfa);
  border-top: 5px solid rgba(0,0,0,.28);
}
.bed .bed-name {
  position: absolute; right: 6px; bottom: 4px;
  font-size: 10px; color: rgba(255,255,255,.85);
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
}
.sleeper { position: absolute; top: 4px; left: 14px; width: 72px; height: 52px; overflow: hidden; }
.sleeper .char { width: 72px; height: auto; }
.bed .z { position: absolute; top: 6px; right: 10px; color: #74c0fc; font-weight: bold; font-size: 13px; text-shadow: 1px 1px 0 var(--ink); animation: zfloat 2.2s infinite; }
.bed-empty {
  margin-top: 12px;
  color: #8b95a5; font-size: 11px; text-align: center;
  border-top: 2px dashed #465061; padding-top: 10px;
}
.bed-empty[hidden] { display: none; }

/* ---------------- workstation ---------------- */
.workstation {
  position: relative;
  width: 300px;
  height: 300px;
  cursor: pointer;
  user-select: none;
}

.char-slot {
  position: absolute; bottom: 84px; left: 50%;
  width: 118px; height: 112px;
  transform: translateX(-50%);
  z-index: 1;
}
.char-slot:empty { border: none; }
.char { width: 100%; height: 100%; display: block; }
.g-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.g-arm { transform-box: fill-box; transform-origin: top center; }
.m { display: none; }

/* meja */
.desk { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tabletop {
  position: absolute; bottom: 72px; left: 6px; right: 6px; height: 14px;
  background: #7a5230; border: 3px solid #4a2f18;
}
.leg { position: absolute; bottom: 0; width: 11px; height: 72px; background: #4a2f18; }
.leg-l { left: 26px; } .leg-r { right: 26px; }

.monitor {
  position: absolute; bottom: 86px; left: 22px;
  width: 80px; height: 62px;
  background: #2b2f3a; border: 4px solid #1a1d26;
}
.monitor-foot { position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); width: 20px; height: 11px; background: #1a1d26; }
.screen {
  position: absolute; inset: 4px;
  background: #06130d; color: #63e6be;
  font-size: 10px; line-height: 1.7; padding: 4px 5px;
  overflow: hidden; white-space: nowrap;
}
.scr-line1 { color: #4b6e63; }
.scr-cursor { display: inline-block; width: 6px; height: 10px; background: currentColor; animation: blink-cursor 1s steps(1) infinite; vertical-align: middle; }

.lamp { position: absolute; bottom: 86px; right: 26px; width: 26px; height: 44px; }
.lamp::before { content: ""; position: absolute; top: 0; left: 2px; width: 20px; height: 13px; background: var(--amber); border: 3px solid #b08c1a; }
.lamp::after  { content: ""; position: absolute; top: 13px; left: 10px; width: 5px; height: 31px; background: #495057; }

.mug { position: absolute; bottom: 86px; right: 60px; width: 14px; height: 16px; background: #e8590c; border: 3px solid #7e2f22; }

/* papan nama */
.plate {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 282px; text-align: center; z-index: 3;
}
.plate .nm { display: block; font-size: 16px; color: #fff; text-shadow: 2px 2px 0 var(--ink); }
.plate .rl { display: block; font-size: 12px; color: #c4ccd6; text-shadow: 1px 1px 0 var(--ink); margin-top: 2px; }
.badge {
  display: inline-block; margin-top: 5px;
  font-size: 11px; font-weight: bold; letter-spacing: 1px;
  padding: 3px 10px; border: 2px solid var(--ink); color: #212529;
}

.offduty {
  position: absolute; bottom: 136px; left: 50%; transform: translateX(-50%);
  background: #1a1f2b; border: 2px solid #454f63;
  color: #adb5bd; font-size: 11px;
  padding: 4px 10px; z-index: 4; white-space: nowrap;
}
.offduty[hidden] { display: none; }

/* ---------------- animasi per status ---------------- */
[data-st="idle"]    .m-idle,  [data-st="new"]    .m-idle  { display: initial; }
[data-st="working"] .m-work  { display: initial; }
[data-st="success"] .m-happy { display: initial; }
[data-st="error"]   .m-panic, [data-st="stuck"] .m-panic { display: initial; }
[data-st="bolos"]   .g-eyes  { display: none; }
[data-st="bolos"]   .m-sleep { display: initial; }

[data-st="idle"]    .char-slot,
[data-st="new"]     .char-slot { animation: bob 3.2s ease-in-out infinite; }
[data-st="working"] .char-slot { animation: typebob .38s steps(2) infinite; }
[data-st="working"] .g-arm-l   { animation: armL .38s steps(2) infinite; }
[data-st="working"] .g-arm-r   { animation: armR .38s steps(2) infinite; }
[data-st="success"] .char-slot { animation: hop .72s ease-in-out infinite; }
[data-st="error"]   .char-slot { animation: shake .28s linear infinite; }
[data-st="stuck"]   .char-slot { animation: shake 1.5s linear infinite; }
[data-st="bolos"]   .char-slot { filter: grayscale(.75) brightness(.8); animation: bob 4.2s ease-in-out infinite; }
.workstation[data-empty="1"] .char-slot { filter: none; animation: none; }

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-3px); }
}
@keyframes typebob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-2px); }
}
@keyframes hop {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  35%      { transform: translateX(-50%) translateY(-9px); }
  70%      { transform: translateX(-50%) translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(calc(-50% - 3px)); }
  50%      { transform: translateX(calc(-50% + 3px)); }
}
@keyframes armL { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(17deg); } }
@keyframes armR { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-17deg); } }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(.12); }
}
@keyframes blink-cursor { 50% { opacity: 0; } }

/* layar monitor pegawai per status */
.screen.st-idle    { color: #63e6be; }
.screen.st-new     { color: #ced4da; }
.screen.st-working { color: #ffec99; animation: flicker .6s steps(2) infinite; }
.screen.st-success { color: #8ce99a; }
.screen.st-error   { color: #ffa8a8; background: #2a0d0d; }
.screen.st-stuck   { color: #ffc078; }
.screen.st-bolos   { color: #74c0fc; }
.screen.st-off     { color: #868e96; background: #10141c; }
@keyframes flicker { 50% { filter: brightness(1.4); } }

[data-st="working"] .lamp::before { animation: lamp-pulse 1s infinite; }
@keyframes lamp-pulse {
  0%, 100% { box-shadow: 0 0 18px 8px rgba(255,212,59,.45); }
  50%      { box-shadow: 0 0 30px 14px rgba(255,212,59,.7); }
}
.workstation[data-empty="1"] .lamp::before { opacity: .3; }

/* ---------------- speech bubble ---------------- */
.bubble {
  position: absolute; top: 4px; left: 50%;
  transform: translateX(-50%);
  min-width: 140px; max-width: 264px;
  background: #fff;
  border: 3px solid var(--ink);
  padding: 6px 10px;
  z-index: 4;
  font-size: 12px; color: #212529;
  text-align: center; line-height: 1.45;
  box-shadow: 3px 3px 0 rgba(0,0,0,.3);
}
.bubble::after {
  content: "";
  position: absolute; bottom: -9px; left: 50%;
  width: 11px; height: 11px;
  background: inherit;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}
[data-st="success"] .bubble { background: #d3f9d8; }
[data-st="error"]   .bubble { background: #ffe3e3; }
[data-st="working"] .bubble { background: #fff9db; }
[data-st="stuck"]   .bubble { background: #ffd8a8; }
[data-st="bolos"]   .bubble { background: #d0ebff; }

/* ---------------- efek (zzz / keringat / bintang) ---------------- */
.fx { display: none; }
.fx-zzz {
  position: absolute; top: 30px; left: 50%; margin-left: -44px;
  z-index: 5; width: 70px; height: 48px; pointer-events: none;
  color: #74c0fc; font-weight: bold; font-size: 17px;
  text-shadow: 1px 1px 0 var(--ink);
}
.fx-zzz span { position: absolute; display: block; animation: zfloat 2.2s infinite; }
.fx-zzz span:nth-child(1) { left: 0;  animation-delay: 0s; }
.fx-zzz span:nth-child(2) { left: 18px; animation-delay: .7s; }
.fx-zzz span:nth-child(3) { left: 36px; animation-delay: 1.4s; }
@keyframes zfloat {
  0%   { transform: translateY(0);     opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(-30px); opacity: 0; }
}
[data-st="bolos"] .fx-zzz { display: block; }

.fx-sweat { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.fx-sweat i {
  position: absolute; top: 40px;
  width: 7px; height: 11px;
  background: #4dabf7; border: 1px solid #1971c2;
  animation: sweatfall .7s linear infinite;
}
.fx-sweat i:nth-child(1) { left: calc(50% - 56px); }
.fx-sweat i:nth-child(2) { left: calc(50% + 50px); animation-delay: .35s; }
@keyframes sweatfall {
  0%  { transform: translateY(0);  opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(36px); opacity: 0; }
}
[data-st="error"] .fx-sweat { display: block; }

.fx-star { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.fx-star i {
  position: absolute;
  color: var(--amber); font-size: 20px; font-style: normal;
  text-shadow: 1px 1px 0 var(--ink);
  animation: starpop .72s ease-in-out infinite;
  opacity: 0;
}
.fx-star i:nth-child(1) { left: calc(50% - 66px); top: 74px; }
.fx-star i:nth-child(2) { left: calc(50% + 52px); top: 54px; animation-delay: .24s; }
.fx-star i:nth-child(3) { left: calc(50% + 70px); top: 108px; animation-delay: .48s; }
@keyframes starpop {
  0%, 100% { transform: scale(.4);  opacity: 0; }
  40%      { transform: scale(1.15); opacity: 1; }
  70%      { opacity: .9; }
}
[data-st="success"] .fx-star { display: block; }

/* warna badge per status */
.b-new{background:#dee2e6} .b-idle{background:#c3fae8} .b-working{background:#fff9db}
.b-success{background:#b2f2bb} .b-error{background:#ffc9c9} .b-stuck{background:#ffd8a8} .b-bolos{background:#d0ebff}

/* ---------------- toasts ---------------- */
#toasts {
  position: fixed; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 60; max-width: 360px;
}
.toast {
  background: rgba(20,23,32,.94);
  border: 2px solid var(--ink);
  border-left: 6px solid var(--blue);
  color: #e9ecef;
  font-size: 13px;
  padding: 10px 13px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.4);
  animation: toastin .22s ease-out;
}
.toast.t-ok   { border-left-color: var(--green); }
.toast.t-err  { border-left-color: var(--red); }
.toast.t-warn { border-left-color: #ffd43b; }
.toast.out { opacity: 0; transform: translateX(14px); transition: all .3s; }
@keyframes toastin { from { transform: translateX(40px); opacity: 0; } }

/* ---------------- modal ---------------- */
#modal {
  position: fixed; inset: 0;
  background: rgba(8,10,16,.62);
  display: flex; align-items: center; justify-content: center;
  z-index: 70; padding: 18px;
}
#modal.hidden { display: none; }
.modal-card {
  width: min(600px, 94vw);
  background: #1b2030;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(0,0,0,.5);
  padding: 18px 20px;
}
.md-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.md-head h3 { font-size: 20px; color: #ffd43b; }
.md-head .rl { color: #8b95a5; font-size: 12px; }
#md-close {
  background: #2b3242; color: #e9ecef;
  border: 2px solid #454f63;
  width: 32px; height: 32px; cursor: pointer; font-size: 14px;
}
#md-close:hover { background: var(--red); color: #fff; }
.md-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.md-meta div { background: #151a26; border: 2px solid #2c3444; padding: 7px 9px; }
.md-meta small { display: block; color: #6c788c; font-size: 10px; letter-spacing: 1px; }
.md-meta span { display: block; font-size: 13px; margin-top: 3px; }
.md-meta .cmd { font-size: 11px; word-break: break-all; color: #74c0fc; }
.md-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.md-stats[hidden] { display: none; }
.md-stats .chip {
  background: #151a26; border: 2px solid #2c3444;
  padding: 6px 10px; font-size: 12px; color: #dfe6ee;
}
.md-stats .chip.ok   { border-color: var(--green); }
.md-stats .chip.warn { border-color: #ffd43b; }
.md-stats .chip.err  { border-color: var(--red); }
.md-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.md-table th {
  text-align: left; color: #6c788c;
  font-size: 10px; letter-spacing: 1px;
  border-bottom: 2px solid #2c3444; padding: 5px 6px;
}
.md-table td { padding: 5px 6px; border-bottom: 1px solid #232937; color: #dfe6ee; }
.md-table .ok  { color: var(--green); font-weight: bold; }
.md-table .err { color: var(--red); font-weight: bold; }
.md-table .note { color: #8b95a5; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- footer ---------------- */
.hint { position: fixed; bottom: 4px; left: 0; right: 0; margin: 0 auto; text-align: center; color: #5b6474; font-size: 12px; z-index: 50; }

/* ---------------- area meja terbuka (landscape) ---------------- */
.desks-all {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.div-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #12141c;
  border: 2px solid var(--ink);
  padding: 1px 6px;
  margin-bottom: 3px;
}

/* ---------------- tombol musik chiptune ---------------- */
.bgm-btn {
  position: fixed; left: 12px; bottom: 12px;
  z-index: 55;
  background: #141420;
  border: 3px solid #5f6d8c;
  box-shadow: 3px 3px 0 rgba(0,0,0,.4);
  color: var(--amber);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  font-weight: bold;
  padding: 8px 12px;
  cursor: pointer;
}
.bgm-btn:hover { border-color: var(--amber); }

/* ================= PADATKAN VERTIKAL (override akhir) ================= */
.sign { padding: 6px 12px; }
.sign b { font-size: 18px; }
.sign small { font-size: 10px; margin-top: 2px; }
.clock-face { font-size: 16px; padding: 5px 10px; }
.clock small { font-size: 10px; margin-top: 3px; }
.window { left: 20px; top: 70px; width: 150px; height: 118px; }
.wallmon { right: 20px; top: 60px; width: 400px; padding: 8px 10px 10px; }
.wm-grid { gap: 6px; }
.wm-cell { padding: 4px 6px; }
.poster { top: 80px; padding: 14px 18px; font-size: 16px; }
.floor { padding: 12px 12px 16px; }
.desks-all { gap: 10px 14px; }
.room { padding: 10px; }
.room-board { margin-bottom: 10px; padding: 3px 10px; font-size: 11px; }
.tv { height: 54px; margin-bottom: 10px; }
.tv-screen { font-size: 12px; }
.sofa { height: 130px; }
.sofa-back { bottom: 36px; height: 38px; }
.sofa-seat { bottom: 6px; height: 32px; }
.sofa-arm { height: 80px; width: 22px; }
.lounger { bottom: 38px; width: 90px; height: 80px; }
.lounger .char { width: 88px; height: 78px; }
.coffee { right: 10px; bottom: 10px; width: 26px; height: 38px; }
.beds { gap: 10px; }
.bed { height: 114px; }
.bed .pillow { top: 8px; left: 8px; width: 62px; height: 24px; }
.sleeper { top: 3px; left: 10px; width: 62px; height: 44px; }
.sleeper .char { width: 62px; height: auto; }
.bed .z { top: 4px; right: 8px; font-size: 12px; }
.bed .bed-name { font-size: 10px; }
.workstation { width: 250px; height: 262px; }
.char-slot { bottom: 70px; width: 100px; height: 94px; }
.tabletop { bottom: 60px; height: 12px; }
.leg { height: 60px; }
.leg-l { left: 22px; } .leg-r { right: 22px; }
.monitor { bottom: 74px; left: 18px; width: 68px; height: 54px; }
.screen { padding: 3px 4px; line-height: 1.6; }
.monitor-foot { bottom: -9px; width: 16px; height: 9px; }
.lamp { bottom: 74px; right: 22px; width: 22px; height: 38px; }
.lamp::before { left: 2px; width: 17px; height: 11px; border-width: 2px; }
.lamp::after { top: 11px; left: 9px; width: 4px; height: 27px; }
.mug { bottom: 74px; right: 52px; width: 12px; height: 14px; border-width: 2px; }
.plate { width: 236px; bottom: 0; }
.plate .nm { font-size: 15px; }
.plate .rl { font-size: 11px; margin-top: 1px; }
.badge { font-size: 10px; padding: 2px 8px; margin-top: 3px; }
.div-tag { font-size: 9px; padding: 0 5px; margin-bottom: 2px; }
.offduty { bottom: 116px; font-size: 10px; padding: 3px 8px; }
.bubble { top: 2px; max-width: 240px; padding: 5px 8px; font-size: 12px; }

/* media query digabung di ekor file (setelah tipografi) */



/* ---------------- responsive (HP/tablet: reflow + scroll normal) ---------------- */
@media (max-width: 899px) {
  .scene { width: 100%; }
  .floor { flex-direction: column; }
  .side { flex: 1 1 auto; width: 100%; flex-direction: row; }
  .side .room { flex: 1; }
  .wall { height: auto; display: flex; flex-wrap: wrap; gap: 14px; padding: 16px; justify-content: center; }
  .wall > * { position: static !important; transform: none !important; }
  .wallmon { width: 100%; }
  .desks-all { justify-content: center; }
  .poster { display: none; }
}


/* ---------------- animasi pegawai di santai & kamar ---------------- */
.lounger .char { animation: bob2 3.2s ease-in-out infinite; }
@keyframes bob2 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.sleeper .char { animation: breathe 3.4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(1.6px); }
}
.char.is-sleeping .g-eyes { display: none; }
.char.is-sleeping .m-sleep { display: initial; }
.char.is-sleeping .m-idle,
.char.is-sleeping .m-work,
.char.is-sleeping .m-happy,
.char.is-sleeping .m-panic { display: none !important; }

/* ---------------- tipografi final (padat & terbaca) ---------------- */
.sign b { font-size: 18px; }
.sign small { font-size: 10px; }
.clock-face { font-size: 16px; }
.clock small { font-size: 10px; }
.wm-title { font-size: 11px; }
.wm-cell small { font-size: 10px; }
.wm-cell b { font-size: 13px; }
.zone-board { font-size: 13px; letter-spacing: 1px; padding: 5px 14px; }
.plate .nm { font-size: 15px; }
.plate .rl { font-size: 11px; }
.badge { font-size: 10px; }
.bubble { font-size: 12px; max-width: 230px; }
.screen { font-size: 10px; }
.offduty { font-size: 10px; }
.room-board { font-size: 11px; }
.tv-screen { font-size: 12px; }
.bed .bed-name { font-size: 10px; }
.toast { font-size: 13px; }
.md-head h3 { font-size: 20px; }
.md-meta span { font-size: 13px; }
.md-meta .cmd { font-size: 11px; }
.md-table { font-size: 12px; }
.hint { font-size: 11px; }

/* ---------------- fit desktop: scale pas tinggi layar ---------------- */
@media (min-width: 900px) {
  body { overflow-y: hidden; }
}
/* ---------------- tombol mode 3D ---------------- */
.mode-3d-btn {
    position: fixed;
    left: 12px;
    bottom: 62px;
    z-index: 55;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    background: #141420;
    border: 3px solid #5f6d8c;
    box-shadow: 3px 3px 0 rgba(0,0,0,.4);

    color: var(--amber);
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: bold;

    padding: 8px 12px;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;
    transition: .2s ease;
}

.mode-3d-btn:hover {
    border-color: var(--amber);
    color: #fff;
    background: #25283a;
}




