@font-face { font-family: "UKIJ Tor"; src: url("assets/fonts/UKIJTor.ttf") format("truetype"); font-display: swap; }
:root {
  --blue: #0071e3;
  --sky: #8ab8ff;
  --orange: #e0408a;
  --ink: #0b1630;
  --muted: #6e6e73;
  --card: rgba(255, 255, 255, .92);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: "Inter", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f5f5f7 55%, #e3e8f2 100%);
}
#scene { position: fixed; inset: 0; }
#scene canvas { display: block; }

.topbar {
  position: fixed; top: 16px; inset-inline: 16px; margin-inline: auto; max-width: 1240px;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 18px;
  background: var(--card); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 80, 130, .14); z-index: 5;
}
.logo { height: 40px; border-radius: 9px; }
.flag { height: 42px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 151, 233, .25); }
.titles { flex: 1; min-width: 0; }
.org { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; }
.office > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.topbar > :not(.titles) { flex: none; }
.demo { font-size: 11px; font-weight: 600; color: var(--blue); background: #e8f1fc; padding: 2px 8px; border-radius: 99px; }
.stats { display: flex; gap: 16px; }
.stat { text-align: center; line-height: 1.2; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 4px; }
.dot.work { background: var(--blue); }
.dot.idle { background: #fff; box-shadow: inset 0 0 0 2px #8a93a3; }
.dot.rev { background: var(--orange); }

.room-label {
  direction: rtl;
  font-family: inherit; font-size: 11.5px; font-weight: 600; color: #fff;
  background: var(--ink); padding: 4px 10px; border-radius: 99px; white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 40, 70, .25); pointer-events: none;
}
.room-label b { color: var(--sky); margin-inline-start: 6px; font-weight: 700; }
.room-label.lounge { background: #fff; color: var(--ink); }
.room-label.lounge b { color: var(--blue); }

.name-tag {
  direction: rtl; font-family: inherit; font-size: 10.5px; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, .94); padding: 1px 8px 2px; border-radius: 99px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 40, 70, .22); pointer-events: none;
}
.name-tag i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 5px; background: var(--blue); }
.name-tag.idle { color: var(--muted); }
.name-tag.idle i { background: #a9bccb; }
.name-tag.review { background: var(--orange); color: #fff; animation: pulse 1.4s infinite; }
.name-tag.review i { background: #fff; }
.name-tag:not(.hover) { font-size: 0; padding: 0; width: 20px; height: 20px; border: 2px solid #fff; background: var(--blue); text-align: center; }
.name-tag.working:not(.hover)::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: #fff; }
.name-tag:not(.hover) i { display: none; }
.name-tag.idle:not(.hover) { background: #fff; border: 4px solid #8a93a3; }
.name-tag.review:not(.hover) { width: 20px; height: 20px; background: var(--orange); text-align: center; }
.name-tag small { display: none; }
.name-tag.hover {
  z-index: 9; font-size: 13px; padding: 8px 12px 9px; border-radius: 12px; white-space: normal; width: max-content; max-width: 250px;
  text-align: start; line-height: 1.6; background: #fff; color: var(--ink); animation: none; box-shadow: 0 8px 22px rgba(0, 40, 70, .28);
}
.name-tag.hover small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.name-tag.hover small.now { color: var(--ink); font-weight: 600; margin-top: 3px; padding-top: 4px; border-top: 1px solid #e3edf3; }
.name-tag.hover.review i { background: var(--orange); }
.name-tag.hover.review small.now { color: var(--orange); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(224, 64, 138, .28); } }

.panel {
  position: fixed; top: 96px; inset-inline-start: 16px; width: 300px; max-height: calc(100% - 150px);
  overflow: auto; padding: 18px; border-radius: 18px; background: var(--card);
  backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 80, 130, .18); z-index: 6;
}
.panel h2 { margin: 8px 0 2px; font-size: 19px; }
.panel h3 { margin: 16px 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.p-room { font-size: 13px; color: var(--blue); font-weight: 600; }
.p-role { font-size: 13px; line-height: 1.7; margin: 8px 0 0; }
.p-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #e8f1fc; color: var(--blue); }
.p-status.idle { background: #edf1f4; color: var(--muted); }
.p-status.review { background: #fde7f1; color: var(--orange); }
.p-task { font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 10px; background: #eef4fd; border-inline-start: 3px solid var(--blue); }
.panel ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.panel li { padding: 7px 0; border-bottom: 1px solid #e3edf3; }
.panel li:last-child { border: 0; }
.close { position: absolute; top: 10px; inset-inline-end: 12px; border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }

.feed { position: fixed; bottom: 48px; inset-inline-end: 16px; width: 300px; display: flex; flex-direction: column; gap: 8px; z-index: 5; pointer-events: none; }
.toast {
  font-size: 12.5px; padding: 9px 12px; border-radius: 12px; background: var(--card);
  box-shadow: 0 6px 18px rgba(0, 80, 130, .14); border-inline-start: 3px solid var(--blue);
  animation: in .35s ease-out; transition: opacity .5s;
}
.toast.review { border-color: var(--orange); }
.toast.idle { border-color: #a9bccb; }
.toast b { display: block; font-size: 12px; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }

.hint { position: fixed; bottom: 14px; inset-inline: 0; text-align: center; font-size: 12px; color: var(--muted); pointer-events: none; }

.board-btn {
  font: 600 13px inherit; font-family: inherit; color: #fff; background: var(--blue); border: 0; border-radius: 99px;
  padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.board-btn b { background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 0 7px; margin-inline-start: 4px; }
.board {
  position: fixed; top: 96px; bottom: 16px; inset-inline-end: 16px; width: 330px; display: none; flex-direction: column;
  padding: 16px; border-radius: 18px; background: var(--card); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 80, 130, .18); z-index: 6; overflow: auto;
}
body.board-open .board { display: flex; }
body.board-open #scene { inset-inline-end: 362px; }
body.board-open .feed { inset-inline-end: 378px; }
body.board-open .hint { inset-inline-end: 362px; }
.board-head { position: relative; }
.board-head h2 { margin: 0 0 4px; font-size: 17px; }
.board h3 { display: flex; align-items: center; gap: 4px; margin: 14px 0 8px; font-size: 13px; color: var(--ink); }
.board h3 b { margin-inline-start: auto; font-size: 12px; color: var(--muted); background: #e9f1f6; border-radius: 99px; padding: 0 8px; }
.dot.done { background: #3fae7a; }
.card {
  display: block; width: 100%; text-align: start; font-family: inherit; cursor: pointer; margin-bottom: 7px;
  padding: 9px 11px; border-radius: 11px; border: 1px solid #e1ecf3; border-inline-start: 3px solid var(--blue); background: #fff;
}
.card:hover { background: #f3faff; }
.card b { display: block; font-size: 13px; color: var(--ink); line-height: 1.5; }
.card span { font-size: 11px; color: var(--muted); }
.card em { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--orange); background: #fde7f1; border-radius: 99px; padding: 1px 8px; margin-top: 5px; }
.card.todo { border-inline-start-color: #a9bccb; }
.card.review { border-inline-start-color: var(--orange); }
.card.done { border-inline-start-color: #3fae7a; opacity: .8; }
.card.done b { text-decoration: line-through; text-decoration-color: #9db3c2; }
.empty { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.panel li { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.panel li em { font-style: normal; font-size: 10.5px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.panel li.doing em { color: var(--blue); }
.panel li.done em { color: #3fae7a; }

@media (max-width: 900px) {
  .org { display: none; }
  .topbar { gap: 10px; padding: 8px 12px; }
  .flag { height: 30px; }
  .office { font-size: 16px; white-space: nowrap; }
  .demo { display: none; }
  .stats { gap: 10px; }
  .stat b { font-size: 16px; }
  .stat span { font-size: 0; }
  .stat span .dot { margin: 0; }
  .feed { display: none; }
  .board { top: auto; bottom: 0; inset-inline: 0; width: auto; height: 58%; border-radius: 18px 18px 0 0; }
  body.board-open #scene, body.board-open .hint { inset-inline-end: 0; }
  .board-btn { padding: 6px 10px; font-size: 12px; }
  .panel { width: auto; inset-inline: 12px; top: auto; bottom: 40px; max-height: 40%; }
}

.langs { display: flex; background: #eef0f4; border-radius: 99px; padding: 3px; }
.langs button { font: 600 12px inherit; font-family: inherit; border: 0; background: none; color: var(--muted); padding: 5px 10px; border-radius: 99px; cursor: pointer; }
.langs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(11, 22, 48, .15); }
.org { font-weight: 600; letter-spacing: .02em; }
.name-tag.hover small.room { color: var(--blue); font-weight: 600; }
@media (max-width: 900px) { .langs button { padding: 4px 7px; font-size: 11px; } .logo { height: 30px; } }

html[lang="ug"] body { font-family: "UKIJ Tor", "Noto Sans Arabic", sans-serif; }
html[lang="ug"] .org, html[lang="ug"] .stat b, html[lang="ug"] .langs button:not([data-lang="ug"]) { font-family: "Inter", sans-serif; }
.langs button[data-lang="ug"] { font-family: "UKIJ Tor", "Noto Sans Arabic", sans-serif; }

.live-only { display: none; }
body.live .live-only { display: flex; }
/* a visitor who has not signed in: looks, changes nothing */
body.viewer .live-only, body.viewer #d-actions, body.viewer #d-note { display: none !important; }
.sign { display: none; text-decoration: none; }
body.viewer #sign-in, body.locked:not(.viewer) #sign-out { display: inline-flex; align-items: center; }
.ctl { align-items: center; gap: 8px; }
.budget { font: 600 12px "Inter", sans-serif; color: var(--muted); background: #eef0f4; padding: 6px 10px; border-radius: 99px; white-space: nowrap; }
.budget.over { background: #fde7f1; color: var(--orange); }
.pause { font: 600 12px inherit; font-family: inherit; border: 1px solid #f1c3d6; background: #fff; color: var(--orange); padding: 6px 12px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.pause.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.nt { flex-direction: column; gap: 6px; margin: 10px 0 2px; padding-bottom: 12px; border-bottom: 1px solid #e3edf3; }
.nt select, .nt input, .nt textarea, .dlg textarea { font: 13px inherit; font-family: inherit; color: var(--ink); width: 100%; padding: 8px 10px; border: 1px solid #d5dde6; border-radius: 10px; background: #fff; resize: vertical; }
.nt button, .d-actions button { font: 600 13px inherit; font-family: inherit; border: 1px solid #d5dde6; background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.nt button, .d-actions .primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.d-actions .danger { color: var(--orange); margin-inline-start: auto; }
.card.failed { border-inline-start-color: var(--orange); }
.dlg { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 60px); border: 0; border-radius: 18px; padding: 22px; color: var(--ink); box-shadow: 0 24px 70px rgba(11, 22, 48, .35); }
.dlg::backdrop { background: rgba(11, 22, 48, .35); }
.dlg h2 { margin: 10px 0 2px; font-size: 19px; }
.dlg h3 { margin: 14px 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.d-detail { font-size: 13px; color: var(--muted); white-space: pre-wrap; margin: 8px 0 0; }
.dlg pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.65 "Inter", "UKIJ Tor", sans-serif; background: #f5f7fa; border-radius: 12px; padding: 14px; max-height: 42vh; overflow: auto; unicode-bidi: plaintext; text-align: start; }
.dlg textarea { margin-top: 12px; }
.d-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .budget { display: none; } }

.pill-btn { font: 600 12px inherit; font-family: inherit; border: 1px solid #d5dde6; background: #fff; color: var(--ink); padding: 6px 12px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.switch { align-items: center; gap: 8px; font-size: 13px; margin-top: 12px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--blue); }
.name-tag.off { opacity: .4; }
.dlg.wide { width: min(860px, calc(100vw - 32px)); }
.prod { border: 1px solid #e1e7ee; border-radius: 14px; padding: 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.prod-top { display: flex; gap: 8px; align-items: center; }
.prod-top input { flex: 1; font-weight: 700; font-size: 16px; }
.prod input, .prod select, .prod textarea, .prod-new input { font: 13px inherit; font-family: inherit; color: var(--ink); padding: 7px 10px; border: 1px solid #d5dde6; border-radius: 9px; background: #fff; width: 100%; }
.prod-top select { width: auto; }
.prod textarea { resize: vertical; margin-top: 3px; }
.prod label { font-size: 11.5px; color: var(--muted); display: block; }
.prod label input { margin-top: 3px; }
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.prod-links { display: flex; gap: 14px; font-size: 13px; align-items: center; flex-wrap: wrap; }
.prod-links a { color: var(--blue); font-weight: 600; text-decoration: none; }
.prod-links span { color: var(--muted); margin-inline-start: auto; }
.health { font: 600 11.5px inherit; padding: 3px 10px; border-radius: 99px; white-space: nowrap; background: #edf1f4; color: var(--muted); }
.health.up { background: #e6f6ec; color: #1f9d55; }
.health.down { background: #fde7f1; color: var(--orange); }
.prod-new { display: flex; gap: 8px; margin-top: 14px; }
.prod-new button { font: 600 13px inherit; font-family: inherit; border: 0; background: var(--blue); color: #fff; border-radius: 10px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
@media (max-width: 900px) { .prod-grid { grid-template-columns: 1fr; } #prod-btn { display: none; } }

/* finished work */
.dlg.res { width: min(1100px, calc(100vw - 32px)); height: min(760px, calc(100vh - 60px)); }
.dlg.res[open] { display: flex; flex-direction: column; }
.res-bar { display: flex; gap: 8px; margin: 12px 0; }
.res-bar input, .res-bar select { font: inherit; font-size: 13px; border: 1px solid #d5dde6; border-radius: 10px; padding: 8px 10px; background: #fff; color: var(--ink); min-width: 0; }
.res-bar input { flex: 1; }
.res-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px 1fr; gap: 14px; }
#res-list { overflow: auto; display: flex; flex-direction: column; gap: 6px; padding-inline-end: 4px; }
.res-item { text-align: start; font: inherit; border: 1px solid #e1ecf3; background: #fff; border-radius: 11px; padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; color: var(--ink); }
.res-item b { font-size: 13px; }
.res-item span { font-size: 11.5px; color: var(--muted); }
.res-item em { font-style: normal; font-weight: 700; font-size: 10.5px; border-radius: 99px; padding: 1px 8px; background: #e6f4ec; color: #1f9d55; }
.res-item em.review { background: #fde7f1; color: var(--orange); }
.res-item.on { border-color: var(--blue); background: #eef4fd; }
#res-view { overflow: auto; background: #f5f7fa; border-radius: 14px; padding: 18px 20px; }
#res-view h3 { margin: 0 0 4px; font-size: 17px; color: var(--ink); font-weight: 700; }
.res-meta { font-size: 12px; color: var(--blue); font-weight: 600; }
.res-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.res-acts button { font: 600 12px inherit; font-family: inherit; border: 1px solid #d5dde6; background: #fff; color: var(--ink); padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.res-acts .primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.res-text { white-space: pre-wrap; word-break: break-word; font: 14px/1.75 "Inter", "UKIJ Tor", sans-serif; unicode-bidi: plaintext; }
.res-text b.h { display: block; font-size: 15.5px; margin-top: 6px; }
@media (max-width: 800px) { .res-body { grid-template-columns: 1fr; grid-template-rows: 40% 60%; } .res-bar { flex-wrap: wrap; } }

/* the name gives way before it can run over the logo or the numbers */
@media (max-width: 1180px) { .titles .office { display: none; } .titles .org { display: block; font-size: 15px; color: var(--ink); } .topbar { flex-wrap: wrap; row-gap: 8px; } .titles { flex: 1 0 auto; } }
@media (max-width: 760px) { .titles { display: none; } .topbar { flex-wrap: wrap; justify-content: space-between; row-gap: 8px; } }

/* open-plan room names */
.room-label { direction: inherit; display: flex; align-items: center; gap: 8px; font: 600 13px "Inter", "UKIJ Tor", sans-serif; color: #fff; background: #13213f; padding: 6px 14px; border-radius: 99px; white-space: nowrap; box-shadow: 0 6px 16px rgba(11, 22, 48, .3); pointer-events: none; }
.room-label i { font-style: normal; font-size: 14px; }
.room-label b { color: #9cc4ff; margin: 0; font: 700 12px "Inter", sans-serif; }
.room-label i { display: grid; place-items: center; }
.room-label i svg { width: 17px; height: 17px; }
.room-label { background: linear-gradient(180deg, #1b2c52, #101c38); border: 1px solid rgba(255, 255, 255, .14); }
/* picture-style room names */
.room-label { font-size: 11.5px; padding: 4px 11px; gap: 6px; }
.room-label b { font-size: 11px; color: #fff; opacity: .85; }
.room-label i svg { width: 14px; height: 14px; }

/* meetings */
#meet-topic { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid #d5dde6; border-radius: 10px; padding: 9px 11px; margin-top: 12px; resize: vertical; }
#meet-who { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 44vh; overflow: auto; }
#meet-who fieldset { border: 1px solid #e1ecf3; border-radius: 11px; padding: 6px 10px 8px; margin: 0; display: flex; flex-direction: column; gap: 3px; }
#meet-who legend { font-weight: 700; font-size: 12.5px; padding: 0 4px; }
#meet-who label { font-size: 12.5px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
#meet-who label.off { color: var(--muted); opacity: .6; cursor: default; }
#meet-who input { accent-color: var(--blue); }
.meet-error { color: var(--orange); font-size: 12.5px; min-height: 16px; margin: 8px 0 0; }
.pill-btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.meet-live { position: fixed; top: 84px; inset-inline: 0; margin-inline: auto; width: fit-content; max-width: min(760px, calc(100vw - 32px)); z-index: 5; display: flex; align-items: center; gap: 10px; background: #101c38; color: #fff; border-radius: 99px; padding: 7px 8px 7px 16px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(11, 22, 48, .3); }
.meet-live[hidden] { display: none; }
.meet-live i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ff5a7a; animation: pulse 1.4s infinite; }
.meet-live span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.meet-live button { flex: none; font: 600 12px inherit; font-family: inherit; border: 0; background: #fff; color: #101c38; border-radius: 99px; padding: 5px 12px; cursor: pointer; }
