/* Intime HQ: het 3D-agentkantoor (/kantoor/). UI-tokens uit DevAgentPortal/wwwroot/styles.css. */
:root {
  --teal: #034a4e; --teal-deep: #053537;
  --pink: #e12c5a; --pink-soft: #fbe4ea;
  --green: #abd58e; --green-dot: #7fb45f; --green-ink: #4f7c48; --green-soft: #eef4ea;
  --yellow: #f2cd5c; --amber-soft: #fdf3e0; --amber-ink: #8d6a1c;
  --ink: #1f2a27; --muted: #6b716c; --muted-2: #9a9a93;
  --line: #ecebe6; --chip: #f1f0ec;
  /* status: Bezig (aan het bureau), Onderweg (heeft werk, nog niet op zijn plek), Pauze */
  --busy: #f2cd5c; --busy-ink: #8d6a1c; --busy-soft: #fdf3e0;
  --onway: #4a8fd6; --onway-ink: #24599a; --onway-soft: #e6f0fb;
  --pause: #7fb45f; --pause-ink: #4f7c48; --pause-soft: #eef4ea;
  --shadow: 0 10px 30px rgba(60, 38, 18, .18), 0 2px 6px rgba(60, 38, 18, .08);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: 'Work Sans', system-ui, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 50% 45%, #efe3d2 0%, #dcc6a8 70%, #cdb391 100%);
  transition: background 1s;
}
button, input, select { font-family: inherit; }
#scene { position: fixed; inset: 0; display: block; cursor: grab; touch-action: none; }
#scene.drag { cursor: grabbing; }
#scene.hover { cursor: pointer; }

/* ---------- overlay (pins + room cards) ---------- */
#ov { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.pin { position: absolute; left: 0; top: 0; will-change: transform; }

.pin { pointer-events: auto; cursor: pointer; transition: opacity .2s; }
.pin-in { transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.pin-av {
  width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 2.5px; position: relative;
  box-shadow: 0 0 0 2px var(--ring, #d7d3ca), 0 6px 14px rgba(40, 24, 10, .28);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.pin-av img, .pin-av .ini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ini { display: grid; place-items: center; background: var(--acc, var(--teal)); color: #fff; font-weight: 700; }
.pin-av .ini { font-size: 14px; }
.pin-tail { width: 2px; height: 10px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.pin-dot {
  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ring, #bdb8ad); border: 2px solid #fff;
}
.pin:hover .pin-av, .pin.sel .pin-av { transform: scale(1.18); }
.pin.sel .pin-av { box-shadow: 0 0 0 2.5px var(--pink), 0 0 0 7px rgba(225, 44, 90, .2), 0 6px 14px rgba(40, 24, 10, .28); }
.st-work { --ring: var(--busy); }
.st-walk { --ring: var(--onway); }
.st-break { --ring: var(--pause); }
.pin-name {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 4px); margin-top: -8px;
  background: #fff; color: var(--ink); font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  white-space: nowrap; box-shadow: 0 3px 10px rgba(40, 24, 10, .18); opacity: 0; transition: opacity .2s;
}
.pin:hover .pin-name, .pin.sel .pin-name, body.names .pin-name { opacity: 1; }
.pin-bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 6px) scale(.92);
  background: #fff; font-size: 16px; line-height: 1.3; padding: 9px 14px; border-radius: 14px; width: max-content; max-width: 260px;
  text-align: center; box-shadow: var(--shadow); opacity: 0; transition: opacity .25s, transform .35s var(--ease);
}
.pin-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: #fff; transform: rotate(45deg);
}
.pin-bubble.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.pin-carry {
  position: absolute; bottom: calc(100% + 6px); left: 50%; margin-left: -30px; width: 60px; text-align: center;
  background: var(--yellow); color: #3b2d07; font-size: 11px; font-weight: 700; padding: 3px 0; border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2); opacity: 0; transform: rotate(-5deg); transition: opacity .2s;
}
.pin-carry.on { opacity: 1; animation: sway .5s ease-in-out infinite alternate; }
.pin-bubble.on ~ .pin-carry { opacity: 0; }
@keyframes sway { to { transform: rotate(5deg) translateY(-2px); } }
.pin.wave .pin-av { animation: wave .3s ease-in-out 4 alternate; }
@keyframes wave { from { transform: rotate(-14deg) scale(1.1); } to { transform: rotate(14deg) scale(1.1); } }
.pin.far .pin-av { width: 28px; height: 28px; padding: 2px; }
.pin.far .pin-dot { width: 9px; height: 9px; }

/* ---------- HUD ---------- */
.hud { position: fixed; z-index: 10; }
.card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.hud-main { left: 20px; top: 20px; width: 300px; overflow: hidden; }
.hm-head { display: flex; align-items: center; gap: 8px; background: #fff; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.hm-head img { height: 22px; display: block; }
.hm-head > span:not(.hm-live) { font-size: 15px; font-weight: 700; letter-spacing: .02em; color: var(--teal); }
.hm-body { padding: 12px 16px 14px; }
.hm-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-left: auto; }
.hm-live b { width: 7px; height: 7px; border-radius: 50%; background: var(--green-dot); animation: ping 2s infinite; }
.hm-live.off b { background: #c9c2b5; animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(171, 213, 142, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(171, 213, 142, 0); } }
.hm-next { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.hm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hm-stats div { background: var(--chip); border-radius: 10px; padding: 7px 8px 6px; }
.hm-stats b { display: block; font-size: 18px; font-weight: 600; line-height: 1.1; }
.hm-stats span { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.hm-stats span i { width: 6px; height: 6px; border-radius: 50%; background: var(--ring); }

.hm-agent { display: flex; align-items: center; gap: 11px; }
.hm-agent .av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.hm-agent .av.ini { font-size: 17px; }
.hm-agent .nm { font-size: 14.5px; font-weight: 600; }
.hm-agent .st { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.hm-agent .st i { width: 8px; height: 8px; border-radius: 50%; background: var(--ring, #bdb8ad); }
.hm-agent .x { margin-left: auto; align-self: flex-start; }
.hm-now { margin-top: 10px; font-size: 12.5px; line-height: 1.4; color: var(--ink); background: var(--chip); border-radius: 10px; padding: 8px 10px; }
.hm-now small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hm-kpi { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 9px; padding: 0 2px; }
.hm-kpi b { color: var(--ink); font-weight: 600; }
.hm-acts { display: flex; gap: 6px; margin-top: 11px; }
.btn {
  border: 0; border-radius: 10px; background: var(--chip); color: var(--ink); font-size: 12.5px; font-weight: 500;
  padding: 9px 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn:hover { background: #e7e5df; }
.btn.grow { flex: 1; }
.btn.on { background: var(--teal); color: #fff; }
.btn.pink { background: var(--pink); color: #fff; }
.btn.pink:hover { background: #c9264f; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.sq { width: 36px; padding: 0; }
.hm-chat { padding: 3px 0; }
.hm-chat + .hm-chat { border-top: 1px dashed #dedbd3; }
.hm-log { margin-top: 10px; max-height: 110px; overflow-y: auto; }
.hm-log div { font-size: 11.5px; color: var(--muted); padding: 3px 0; display: flex; gap: 8px; }
.hm-log span { color: var(--muted-2); flex: none; font-variant-numeric: tabular-nums; }
.icon-x { border: 0; background: transparent; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.icon-x:hover { background: var(--chip); color: var(--ink); }
.icon-x svg { width: 14px; height: 14px; }

.hud-feed { left: 20px; top: 0; width: 300px; padding: 10px 8px 8px; max-height: 260px; display: flex; flex-direction: column; }
.hf-h { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hf-list { overflow-y: auto; }
.fe { display: flex; gap: 9px; padding: 6px 8px; border-radius: 10px; cursor: pointer; animation: fein .45s var(--ease); align-items: flex-start; }
.fe:hover { background: var(--chip); }
@keyframes fein { from { opacity: 0; transform: translateY(-6px); } }
.fe .av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.fe .av.ini { font-size: 10px; }
.fe .tx { font-size: 12.5px; line-height: 1.35; flex: 1; min-width: 0; }
.fe .tx b { font-weight: 600; }
.tk { display: inline-block; font-size: 11px; font-weight: 700; background: var(--amber-soft); color: var(--amber-ink); padding: 0 5px; border-radius: 4px; }
.fe .tm { font-size: 10.5px; color: var(--muted-2); flex: none; padding-top: 2px; font-variant-numeric: tabular-nums; }
.fe.ship .tx::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); margin-right: 6px; vertical-align: 1px; }

.pill { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 4px; display: flex; gap: 2px; align-items: center; }
.pill button { border: 0; background: transparent; border-radius: 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 7px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pill button:hover { color: var(--ink); background: var(--chip); }
.pill button.on { color: var(--ink); background: var(--chip); font-weight: 600; }
.pill button.pink { background: var(--pink); color: #fff; font-weight: 600; }
.pill button.pink:hover { background: #c9264f; }
.pill svg { width: 15px; height: 15px; }

.hud-zoom { right: 20px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.zstack { background: #fff; border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.zstack button { width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.zstack button + button { border-top: 1px solid var(--line); }
.zstack button:hover { background: var(--chip); }
.zstack button.on { color: var(--pink); }
.zstack svg { width: 18px; height: 18px; }
.zround { width: 42px; height: 42px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--pink); }
.zround svg { width: 19px; height: 19px; }

.hud-dock { left: 50%; bottom: 22px; transform: translateX(-50%); padding: 6px 8px; display: flex; gap: 2px; align-items: center; max-width: calc(100vw - 220px); overflow-x: auto; border-radius: 999px; }
.dk { border: 0; background: transparent; padding: 3px; border-radius: 50%; cursor: pointer; position: relative; flex: none; }
.dk img, .dk .ini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ring, #dcd8cf); transition: transform .2s var(--ease); font-size: 13px; }
.dk:hover img, .dk:hover .ini { transform: translateY(-3px); }
.dk.sel img, .dk.sel .ini { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pink); }
.dk .q { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--yellow); color: #3b2d07; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.dk-sep { width: 1px; height: 26px; background: var(--line); margin: 0 6px; flex: none; }
.dk-add { width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed #cfcac0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); flex: none; margin-left: 4px; }
.dk-add:hover { border-color: var(--pink); color: var(--pink); }

.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--ink); color: #fff; font-size: 11.5px; padding: 4px 8px; border-radius: 6px; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.tip.on { opacity: 1; }

.toast {
  position: fixed; left: 50%; top: 22px; transform: translate(-50%, -12px); z-index: 40; opacity: 0;
  background: #fff; color: var(--ink); padding: 10px 16px 10px 12px; border-radius: 999px; font-weight: 500; font-size: 13.5px;
  box-shadow: var(--shadow); transition: all .35s var(--ease); pointer-events: none; display: flex; align-items: center; gap: 8px;
}
.toast::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 25; overflow: hidden; }
.confetti { position: absolute; width: 7px; height: 11px; border-radius: 2px; }

.login { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; background: rgba(40, 28, 16, .35); backdrop-filter: blur(6px); }
.login.on { display: grid; }
.login-card { width: min(380px, calc(100vw - 32px)); overflow: hidden; }
.login-head { display: flex; align-items: center; gap: 8px; background: #fff; padding: 20px 20px 4px; }
.login-head img { height: 26px; }
.login-head span { color: var(--teal); font-weight: 700; font-size: 17px; }
.login-body { padding: 18px 20px 20px; display: grid; gap: 10px; }
.login-body h1 { margin: 0; font-size: 19px; font-weight: 600; }
.login-body p { margin: 0 0 4px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.login-body input { border: 1px solid #e3e0d9; border-radius: 10px; padding: 11px 12px; font-size: 14px; color: var(--ink); }
.login-body input:focus { outline: 2px solid rgba(225, 44, 90, .2); border-color: var(--pink); }
.login-err { font-size: 12.5px; color: var(--pink); min-height: 16px; }
.login-body .btn { padding: 11px; font-size: 14px; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; z-index: 60; font-size: 13px; color: var(--muted); pointer-events: none; transition: opacity .6s; }
.loading.off { opacity: 0; }

@media (max-width: 900px) {
  .hud-main, .hud-feed { width: calc(100vw - 32px); left: 16px; }
  .hud-feed { display: none; }
  .hud-dock { max-width: calc(100vw - 90px); left: 16px; transform: none; }
  .hud-zoom { right: 16px; bottom: 140px; }
}

.dogpin { pointer-events: none; }
.dogpin .pin-bubble { bottom: 0; background: var(--ink); color: #fff; font-weight: 600; }
.dogpin .pin-bubble::after { background: var(--ink); }

.hud-dock:empty { display: none; }

.visitorpin { pointer-events: none; }
.visitorpin .pin-name { position: static; transform: none; margin: 0; opacity: 1; }
