/* office3d — toàn bộ kiểu dáng nằm dưới .o3d và mọi class đều có tiền tố o3d- để không đụng CSS của trang chứa.
   Đổi màu bằng cách ghi đè các biến --o3d-* trên .o3d hoặc trên phần tử chứa. */

.o3d {
  --o3d-bg: #0a0f1c;
  --o3d-panel: rgba(16, 23, 40, 0.9);
  --o3d-line: rgba(255, 255, 255, 0.1);
  --o3d-text: #e8edf7;
  --o3d-muted: #8d98b3;
  --o3d-accent: #5eead4;
  --o3d-work: #86efac;
  --o3d-talk: #7dd3fc;
  --o3d-rest: #fbbf24;
  --o3d-remote: #94a3b8;
  --o3d-me: #ffc83d;

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  background: var(--o3d-bg);
  color: var(--o3d-text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}
.o3d *, .o3d *::before, .o3d *::after { box-sizing: border-box; }
.o3d button, .o3d select { font: inherit; color: inherit; margin: 0; }
.o3d [hidden] { display: none !important; }

.o3d-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.o3d-canvas.is-dragging { cursor: grabbing; }

/* ---------- trạng thái: chấm màu dùng chung cho nhãn, cây tổ chức, bảng chi tiết ---------- */
.o3d-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; flex: none; }
.o3d .is-work > .o3d-dot, .o3d [data-state="work"] .o3d-now .o3d-dot { background: var(--o3d-work); box-shadow: 0 0 6px var(--o3d-work); }
.o3d .is-talk > .o3d-dot, .o3d [data-state="talk"] .o3d-now .o3d-dot { background: var(--o3d-talk); box-shadow: 0 0 6px var(--o3d-talk); }
.o3d .is-rest > .o3d-dot, .o3d [data-state="rest"] .o3d-now .o3d-dot { background: var(--o3d-rest); }
.o3d .is-remote > .o3d-dot, .o3d [data-state="remote"] .o3d-now .o3d-dot { background: var(--o3d-remote); }

.o3d-lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.o3d-lg.is-work { background: var(--o3d-work); } .o3d-lg.is-talk { background: var(--o3d-talk); }
.o3d-lg.is-rest { background: var(--o3d-rest); } .o3d-lg.is-remote { background: var(--o3d-remote); } .o3d-lg.is-me { background: var(--o3d-me); }

/* ---------- nhãn tên trên đầu nhân vật ---------- */
.o3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.o3d-tag {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border: 1px solid var(--o3d-line); border-radius: 999px;
  background: var(--o3d-panel);
  font-size: 12px; white-space: nowrap;
  pointer-events: auto; cursor: pointer;
  will-change: transform;
}
.o3d-tag:hover { border-color: var(--o3d-accent); z-index: 2; }
.o3d-tag b { font-weight: 600; }
.o3d-tag.is-key {
  height: 38px; padding: 0 11px 0 9px;
  border-radius: 10px;
  border-left: 3px solid var(--o3d-unit);
  background: rgba(12, 18, 32, 0.95);
}
.o3d-col { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.o3d-tag small { color: var(--o3d-muted); font-size: 10.5px; }
.o3d-far .o3d-tag.is-key { height: 24px; border-radius: 6px; }
.o3d-far .o3d-tag.is-key small { display: none; }
.o3d-tag.is-me { border-color: var(--o3d-me); color: var(--o3d-me); cursor: default; pointer-events: none; }
.o3d-tag.is-vacant {
  height: 20px; padding: 0 7px;
  border-style: dashed; background: rgba(16, 23, 40, 0.6);
  color: var(--o3d-muted); font-size: 11px; font-style: italic;
  cursor: default; pointer-events: none;
}
.o3d-tag.is-vacant b { font-weight: 400; }

/* bong bóng thoại + biểu tượng cảm xúc bay lên (vị trí do engine đặt bằng transform) */
.o3d-bubble {
  position: absolute; left: 0; top: 0; z-index: 3;
  max-width: 220px; padding: 6px 11px;
  border-radius: 14px 14px 14px 4px;
  background: #fff; color: #111827;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none; will-change: transform, opacity;
}
.o3d-emoji { position: absolute; left: 0; top: 0; z-index: 3; font-size: 22px; pointer-events: none; will-change: transform, opacity; }

/* ---------- thanh trên ---------- */
.o3d-topbar {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: stretch; gap: 10px;
  pointer-events: none; z-index: 5;
}
.o3d-topbar > * {
  pointer-events: auto;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 12px;
  backdrop-filter: blur(8px);
}
.o3d-stats { flex: 1; display: flex; padding: 8px 6px; min-width: 0; }
.o3d-stat { flex: 1; padding: 0 12px; border-left: 1px solid var(--o3d-line); min-width: 0; }
.o3d-stat:first-child { border-left: 0; }
.o3d-stat span { display: block; color: var(--o3d-muted); font-size: 11px; white-space: nowrap; }
.o3d-stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.o3d-actions { display: flex; align-items: center; gap: 6px; padding: 6px; min-width: 0; }
.o3d-actions button, .o3d-actions select {
  flex: none; white-space: nowrap;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--o3d-line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
.o3d-actions button { background: var(--o3d-accent); color: #06231f; border-color: transparent; font-weight: 600; }
.o3d-actions select { max-width: 210px; color-scheme: dark; }
.o3d-actions optgroup { background: #1e293b; color: #5eead4; font-weight: 700; font-style: normal; }
.o3d-actions option { background: #0f172a; color: var(--o3d-text); font-weight: 400; }

.o3d-chip {
  position: absolute; top: 76px; left: 10px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
  font-size: 12px; color: var(--o3d-muted);
}
.o3d-chip span { color: var(--o3d-text); }

/* ---------- khung chung ---------- */
.o3d-box-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 6px; }
.o3d-box-head button { background: none; border: 0; font-size: 18px; cursor: pointer; line-height: 1; padding: 0 4px; }
.o3d-muted { color: var(--o3d-muted); }

/* ---------- sơ đồ tổ chức ---------- */
.o3d-tree {
  position: absolute; top: 76px; left: 10px;
  width: 320px; max-height: max(220px, calc(100% - 390px));   /* chừa chỗ cho bản đồ bên dưới */
  display: flex; flex-direction: column;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 14px;
  padding: 12px 6px 8px 14px;
  backdrop-filter: blur(8px);
  z-index: 4;
}
.o3d-tree .o3d-box-head { padding-right: 6px; }
.o3d-tree-body { overflow-y: auto; padding-right: 8px; }
.o3d-tree h3 { margin: 12px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--o3d-accent); }
.o3d-tree h3:first-child { margin-top: 2px; }
.o3d-group-note { display: block; color: var(--o3d-muted); font-size: 11px; margin-bottom: 6px; }
.o3d-unit { margin: 0 0 8px; padding-left: 8px; border-left: 1px solid var(--o3d-line); }
.o3d-unit .o3d-unit { margin: 6px 0 4px 8px; }
.o3d-unit-name { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.o3d-unit-name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.o3d-unit > small { display: block; color: var(--o3d-muted); font-size: 11px; margin: 1px 0 3px 16px; }
.o3d-row {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 4px 6px;
  border: 0; border-radius: 6px; background: none;
  text-align: left; font-size: 12.5px; cursor: pointer;
}
.o3d button.o3d-row:hover, .o3d-row.is-on { background: rgba(255, 255, 255, 0.08); }
.o3d-row b { font-weight: 400; white-space: nowrap; }
.o3d-row.is-key b { font-weight: 600; }
.o3d-row span { color: var(--o3d-muted); font-size: 11px; margin-left: auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o3d-row.is-vacant { cursor: default; opacity: 0.55; font-style: italic; }
.o3d-row.is-vacant .o3d-dot { background: none; border: 1px dashed var(--o3d-muted); }

/* ---------- bản đồ ---------- */
.o3d-minimap-box {
  position: absolute; left: 10px; bottom: 16px;
  width: 300px;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 12px;
  padding: 8px 10px 10px;
  backdrop-filter: blur(8px);
}
.o3d-minimap { width: 100%; display: block; border-radius: 6px; cursor: pointer; }
.o3d-legend { margin-top: 6px; font-size: 11px; color: var(--o3d-muted); }
.o3d-minimap-box.is-collapsed .o3d-minimap, .o3d-minimap-box.is-collapsed .o3d-legend { display: none; }
.o3d-minimap-box.is-collapsed { width: auto; }
.o3d-minimap-box.is-collapsed .o3d-box-head { margin: 0; gap: 14px; }

/* ---------- bảng chi tiết nhân sự ---------- */
.o3d-detail {
  position: absolute; right: 10px; top: 76px;
  width: 340px; max-height: calc(100% - 150px);
  overflow-y: auto;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 14px;
  padding: 14px 14px 0;
  backdrop-filter: blur(8px);
  z-index: 4;
  -webkit-user-select: text; user-select: text;
}
.o3d-detail-close { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--o3d-muted) !important; font-size: 20px; cursor: pointer; }
.o3d-detail-head { display: flex; gap: 11px; align-items: center; padding-right: 18px; }
.o3d-avatar {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  color: #0a0f1c; font-weight: 700; font-size: 14px;
}
.o3d-detail-head strong { display: block; font-size: 16px; }
.o3d-detail-head small { color: var(--o3d-muted); font-size: 12px; display: block; }
.o3d-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0; }
.o3d-chipx { padding: 2px 8px; border: 1px solid var(--o3d-line); border-radius: 999px; font-size: 11px; color: var(--o3d-muted); }
.o3d-chipx.is-gold { border-color: #ffd24a; color: #ffd24a; }
.o3d-now { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.o3d-now b { display: block; font-size: 13px; }
.o3d-now small { color: var(--o3d-muted); font-size: 11.5px; }
.o3d-detail h4 { margin: 16px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--o3d-accent); }
.o3d-detail h4 em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--o3d-muted); border: 1px solid var(--o3d-line); border-radius: 4px; padding: 0 4px; margin-left: 4px; font-size: 10px; font-weight: 400; }
.o3d-detail a { color: var(--o3d-text); text-decoration: underline; text-decoration-color: var(--o3d-muted); text-underline-offset: 2px; cursor: pointer; }
.o3d-detail a:hover { color: var(--o3d-accent); }
.o3d-detail p { margin: 0; }
.o3d-line { display: flex; gap: 10px; margin: 4px 0 !important; font-size: 13px; }
.o3d-line > span:first-child { color: var(--o3d-muted); width: 104px; flex: none; }
.o3d-links { line-height: 1.55; }
.o3d-jd { margin: 0; padding-left: 17px; font-size: 13px; line-height: 1.5; }
.o3d-jd li { margin-bottom: 3px; }
.o3d-task { display: grid; grid-template-columns: 1fr 34px; gap: 2px 8px; align-items: center; margin-bottom: 9px; }
.o3d-task > div:first-child { grid-column: 1 / 3; }
.o3d-task b { display: block; font-size: 13px; font-weight: 500; }
.o3d-task small { font-size: 11px; }
.o3d-task > span { font-size: 11px; color: var(--o3d-muted); text-align: right; font-variant-numeric: tabular-nums; }
.o3d-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.o3d-bar i { display: block; height: 100%; border-radius: 3px; }
.o3d-stream { margin-bottom: 10px; }
.o3d-stream-name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.o3d-stream-name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.o3d-stream ul { list-style: none; margin: 0; padding: 0 0 0 16px; font-size: 12.5px; }
.o3d-stream li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.o3d-stream li a { white-space: nowrap; }
.o3d-stream li span { color: var(--o3d-muted); text-align: right; font-size: 11.5px; }
.o3d-stream summary { margin-left: 16px; font-size: 11.5px; color: var(--o3d-muted); cursor: pointer; }
.o3d-note { font-size: 11px; margin-top: 14px !important; }
.o3d-detail-actions {
  position: sticky; bottom: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 12px -14px 0; padding: 10px 14px 12px;
  background: linear-gradient(transparent, rgba(16, 23, 40, 0.98) 30%);
}
.o3d-detail-actions button {
  flex: 1 1 40%; padding: 9px; border: 0; border-radius: 9px;
  background: var(--o3d-accent); color: #06231f; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.o3d-detail-actions button.is-ghost { background: rgba(255, 255, 255, 0.1); color: var(--o3d-text); }

/* nút tương tác vui */
.o3d-fun { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.o3d-fun button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px; border: 1px solid var(--o3d-line); border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); color: var(--o3d-text);
  font-size: 11px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.o3d-fun button span { font-size: 19px; line-height: 1.1; }
.o3d-fun button:hover { border-color: var(--o3d-accent); background: rgba(94, 234, 212, 0.1); }
.o3d-fun button:active { transform: scale(0.95); }

/* ---------- điều khiển ---------- */
.o3d-controls {
  position: absolute; left: 50%; bottom: 26px; z-index: 5;
  transform: translateX(-50%);
  display: flex; gap: 4px; padding: 5px;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 12px;
  backdrop-filter: blur(8px);
}
.o3d-controls button {
  flex: none; white-space: nowrap;
  min-width: 38px; height: 34px; padding: 0 12px;
  border: 0; border-radius: 8px;
  background: transparent;
  font-weight: 600; cursor: pointer;
}
.o3d-controls button:hover { background: rgba(255, 255, 255, 0.08); }
.o3d-controls button.is-active { background: var(--o3d-accent); color: #06231f; }
.o3d-controls [data-act="lights"].is-off { filter: grayscale(1) brightness(0.6); }

.o3d-hint {
  position: absolute; left: 50%; bottom: 78px; z-index: 9;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 28px));
  padding: 14px 18px 13px; border-radius: 16px;
  background: rgba(10, 15, 28, 0.92);
  border: 1.5px solid rgba(94, 234, 212, 0.55);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6), 0 0 24px rgba(94, 234, 212, 0.16);
  backdrop-filter: blur(10px);
  color: #f1f5f9; font-size: 15px; line-height: 1.55;
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: auto;
}
.o3d-hint-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 15.5px; font-weight: 800; color: #5eead4;
}
.o3d-hint-close {
  background: rgba(255, 255, 255, 0.08); border: 0; border-radius: 7px;
  width: 26px; height: 26px; color: #cbd5e1; font-size: 18px; line-height: 1; cursor: pointer;
}
.o3d-hint-close:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.o3d-hint-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.o3d-hint-list li { font-size: 14.5px; color: #e2e8f0; }
.o3d-hint-list b { color: #fef08a; font-weight: 700; }
.o3d-hint.is-gone { opacity: 0; pointer-events: none; transform: translate(-50%, 10px); }

.o3d-toasts { position: absolute; right: 10px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
.o3d-toast {
  padding: 7px 12px; border-radius: 10px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
  font-size: 12px;
  animation: o3d-toast 4s forwards;
}
@keyframes o3d-toast {
  0% { opacity: 0; transform: translateY(8px); }
  8%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

.o3d-joystick {
  display: none;
  position: absolute; left: 22px; bottom: 76px; z-index: 5;
  width: 104px; height: 104px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--o3d-line);
  touch-action: none;
}
.o3d-joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: var(--o3d-me);
  pointer-events: none;
}

/* ---------- đồng hồ (life.js) ---------- */
.o3d-clock {
  position: absolute; top: 76px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; border-radius: 999px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
  font-size: 13px; pointer-events: none; white-space: nowrap;
}
.o3d-clock b { font-variant-numeric: tabular-nums; font-size: 15px; }
.o3d-clock small { color: var(--o3d-me); font-weight: 700; margin-left: 4px; }
.o3d-badge { margin-right: -2px; font-size: 13px; }
.o3d-bday { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: rgba(246, 195, 68, 0.12); color: #fcd34d; font-size: 12.5px; font-weight: 600; }
.o3d-bday em { font-style: normal; font-weight: 400; color: var(--o3d-muted); font-size: 10.5px; border: 1px solid var(--o3d-line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }

/* ---------- menu ✨ ---------- */
.o3d-menu {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 7;
  width: min(440px, calc(100% - 20px)); max-height: min(70%, 520px); overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px;
  background: rgba(16, 23, 40, 0.97); border: 1px solid var(--o3d-line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.o3d-menu h5 { grid-column: 1 / -1; margin: 8px 2px 2px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--o3d-accent); }
.o3d-menu h5:first-child { margin-top: 0; }
.o3d-menu button {
  display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 7px 9px; border: 1px solid transparent; border-radius: 9px;
  background: rgba(255, 255, 255, 0.04); color: var(--o3d-text); font-size: 12.5px; cursor: pointer;
}
.o3d-menu button span { font-size: 16px; width: 20px; text-align: center; flex: none; }
.o3d-menu button:hover { border-color: var(--o3d-line); background: rgba(255, 255, 255, 0.08); }
.o3d-menu button.is-on { border-color: var(--o3d-accent); background: rgba(94, 234, 212, 0.12); }

/* ---------- pickleball ---------- */
.o3d-pb {
  position: absolute; left: 50%; top: 118px; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 8px 12px; border-radius: 12px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
}
.o3d-pb-score { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.o3d-pb small { width: 100%; text-align: center; color: var(--o3d-muted); font-size: 11px; }
.o3d-pb-hit { padding: 7px 14px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.12); color: var(--o3d-text); font-weight: 700; cursor: pointer; }
.o3d-pb.is-ready .o3d-pb-hit { background: #d9f99d; color: #1a2e05; box-shadow: 0 0 0 3px rgba(217, 249, 157, 0.35); }

/* ---------- tham quan + thẻ lịch họp ---------- */
.o3d-caption {
  position: absolute; left: 50%; top: 118px; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 22px; border-radius: 14px; text-align: center;
  background: rgba(10, 15, 28, 0.85); border: 1px solid var(--o3d-line);
  pointer-events: none; animation: o3d-cap 0.5s;
}
.o3d-caption b { font-size: 18px; }
.o3d-caption span { color: var(--o3d-text); font-size: 13px; }
.o3d-caption small { color: var(--o3d-muted); font-size: 11px; margin-top: 4px; }
@keyframes o3d-cap { from { opacity: 0; transform: translate(-50%, -6px); } }
.o3d-card {
  position: absolute; left: 50%; top: 118px; transform: translateX(-50%); z-index: 7;
  width: min(380px, calc(100% - 20px)); max-height: 60%; overflow-y: auto;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(16, 23, 40, 0.97); border: 1px solid var(--o3d-line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.o3d-card h4 { margin: 0 0 8px; font-size: 14px; }
.o3d-card h4 em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--o3d-muted); border: 1px solid var(--o3d-line); border-radius: 4px; padding: 0 4px; }
.o3d-card-close { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--o3d-muted); font-size: 20px; cursor: pointer; }
.o3d-mt { padding: 7px 9px; margin-bottom: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); font-size: 13px; }
.o3d-mt small { display: block; margin-top: 3px; color: var(--o3d-muted); font-size: 11.5px; }
.o3d-mt a { color: var(--o3d-text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--o3d-muted); }
.o3d-mt.is-now { background: rgba(239, 68, 68, 0.15); border-left: 3px solid #ef4444; }
.o3d-mt.is-past { opacity: 0.5; }

/* ---------- tắt từng phần giao diện qua options.ui ---------- */
.o3d-no-toolbar .o3d-topbar, .o3d-no-minimap .o3d-minimap-box, .o3d-no-controls .o3d-controls,
.o3d-no-detail .o3d-detail, .o3d-no-hint .o3d-hint, .o3d-no-chip .o3d-chip,
.o3d-no-tree .o3d-tree, .o3d-no-tree .o3d-btn-tree { display: none !important; }
.o3d-no-toolbar .o3d-chip, .o3d-no-toolbar .o3d-tree, .o3d-no-toolbar .o3d-detail { top: 10px; }

/* ---------- khung hẹp / màn cảm ứng (theo bề rộng của khung 3D, không theo cửa sổ) ---------- */
.o3d-narrow .o3d-topbar { top: 8px; left: 8px; right: 8px; gap: 6px; }
.o3d-narrow .o3d-stats { display: none; }
.o3d-narrow .o3d-actions {
  width: 100%; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  gap: 5px; padding: 5px;
}
.o3d-narrow .o3d-actions::-webkit-scrollbar,
.o3d-narrow .o3d-controls::-webkit-scrollbar { display: none; }
.o3d-narrow .o3d-actions button,
.o3d-narrow .o3d-actions select { height: 32px; padding: 0 8px; font-size: 11.5px; }
.o3d-narrow .o3d-tour-btn { height: 32px; padding: 0 10px; font-size: 11.5px; }
.o3d-narrow .o3d-joystick, .o3d-touch .o3d-joystick { display: block; }
.o3d-narrow .o3d-joystick { left: 14px; bottom: 72px; width: 88px; height: 88px; }
.o3d-narrow .o3d-joy-knob { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.o3d-narrow .o3d-hint, .o3d-touch .o3d-hint { display: none; }
.o3d-narrow .o3d-unit-select { display: none; }
.o3d-narrow .o3d-chip { top: 58px; left: 8px; z-index: 4; padding: 4px 10px; font-size: 11.5px; }
.o3d-narrow .o3d-clock { left: auto; right: 8px; z-index: 4; transform: none; top: 58px; padding: 4px 10px; font-size: 12px; }
.o3d-narrow .o3d-minimap-box { left: auto; right: 8px; top: 94px; bottom: auto; z-index: 5; width: 176px; }
.o3d-narrow .o3d-tree { top: 58px; left: 8px; right: 8px; width: auto; max-height: 55%; }
.o3d-narrow .o3d-detail { top: auto; bottom: 68px; right: 8px; left: 8px; width: auto; max-height: 55%; }
.o3d-narrow .o3d-controls {
  left: 8px; right: 8px; bottom: 24px; transform: none;
  max-width: calc(100% - 16px);
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 4px; gap: 4px;
}
.o3d-narrow .o3d-controls button { height: 32px; min-width: 34px; padding: 0 9px; font-size: 12px; }
.o3d-narrow .o3d-controls [data-act^="rot"] { display: none; }
.o3d-narrow .o3d-toasts { bottom: 68px; right: 8px; max-width: calc(100% - 16px); }
.o3d-narrow .o3d-menu { left: 8px; right: 8px; width: auto; transform: none; bottom: 66px; }
.o3d-tiny .o3d-stat:nth-child(n+4) { display: none; }
/* pickleball trên màn cảm ứng: nút đánh to ở góc phải dưới, đối diện cần điều khiển, vừa tầm ngón cái */
.o3d-touch .o3d-pb, .o3d-narrow .o3d-pb { top: auto; bottom: 76px; left: auto; right: 14px; transform: none; flex-direction: column; gap: 8px; }
.o3d-touch .o3d-pb small, .o3d-narrow .o3d-pb small { display: none; }
.o3d-touch .o3d-pb-hit, .o3d-narrow .o3d-pb-hit { width: 96px; height: 96px; border-radius: 50%; font-size: 17px; touch-action: manipulation; }


/* ---------- Mốc 1 Triển lãm INU–HEOS: Điểm chạm 3D, Floating Pop-up, Modal 2D, AI Chat, Camera Tổng ---------- */
.o3d-actions select, .o3d-actions button { padding: 0 9px; font-size: 12px; }
.o3d-unit-select { max-width: 138px; }
.o3d-role-select { border-color: rgba(167, 139, 250, 0.55) !important; background: rgba(109, 40, 217, 0.25) !important; font-weight: 600; max-width: 112px; }
.o3d-pop-select { border-color: rgba(94, 234, 212, 0.45) !important; max-width: 146px; }

.o3d-pin {
  position: absolute; left: 0; top: 0; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px;
  background: rgba(15, 23, 42, 0.86); color: #f8fafc;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  pointer-events: auto; cursor: pointer; will-change: transform;
  transform-origin: center center;
  transition: border-color 0.15s, background 0.15s;
}
.o3d-pin:hover { border-color: var(--o3d-accent); background: rgba(30, 41, 59, 0.98); z-index: 4; }
.o3d-pin.is-camera { border-color: rgba(239, 68, 68, 0.7); }
.o3d-pin.is-stage { border-color: rgba(250, 204, 21, 0.75); }
.o3d-pin.is-ai-admission { border-color: rgba(236, 72, 153, 0.8); background: rgba(88, 28, 135, 0.9); }
.o3d-pin.is-ai-agent { border-color: rgba(56, 189, 248, 0.7); background: rgba(30, 27, 75, 0.88); }

/* Thẻ Hologram không gian 3D bám trực tiếp vật thể (xoay nghiêng & co giãn theo góc camera) */
.o3d-float {
  position: absolute; left: 0; top: 0; z-index: 8;
  width: min(350px, calc(100% - 24px));
  padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(13, 23, 46, 0.95), rgba(15, 31, 58, 0.92));
  border: 1.5px solid rgba(45, 212, 191, 0.58);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.62), 0 0 26px rgba(45, 212, 191, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  will-change: transform;
  -webkit-user-select: text; user-select: text;
}
.o3d-float::after {
  content: ""; position: absolute; left: 50%; bottom: -13px;
  width: 14px; height: 14px; margin-left: -7px;
  background: #0f1f3a;
  border-right: 2px solid rgba(45, 212, 191, 0.8);
  border-bottom: 2px solid rgba(45, 212, 191, 0.8);
  transform: rotate(45deg);
  box-shadow: 3px 3px 12px rgba(45, 212, 191, 0.45);
  pointer-events: none;
}
.o3d-fl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.o3d-fl-close { background: none; border: 0; color: var(--o3d-muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.o3d-float strong { display: block; font-size: 14.5px; margin-bottom: 4px; color: #fff; }
.o3d-fl-meta { font-size: 12px; color: var(--o3d-muted); margin-bottom: 6px; }
.o3d-fl-topic { font-size: 12.5px; padding: 7px 9px; border-radius: 8px; background: rgba(56, 189, 248, 0.12); border-left: 3px solid #38bdf8; margin-bottom: 8px; }
.o3d-fl-empty { padding: 9px 10px; border-radius: 8px; background: rgba(251, 191, 36, 0.12); color: #fde68a; margin: 6px 0 8px; font-size: 13px; }
.o3d-fl-next { padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); margin-bottom: 8px; }
.o3d-fl-next small, .o3d-fl-next span { display: block; font-size: 11.5px; color: var(--o3d-muted); }
.o3d-fl-next b { display: block; font-size: 12.5px; margin: 2px 0; }
.o3d-fl-prog { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; font-size: 12px; margin-bottom: 8px; }
.o3d-fl-prog .o3d-bar { grid-column: 1 / 3; }
.o3d-fl-syl { font-size: 12px; margin-bottom: 8px; }
.o3d-fl-syl summary { cursor: pointer; color: var(--o3d-accent); font-weight: 600; }
.o3d-fl-syl ul { margin: 5px 0 0; padding-left: 16px; color: #cbd5e1; }
.o3d-fl-syl li { margin-bottom: 3px; }
.o3d-fl-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.o3d-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(124, 58, 237, 0.35); border: 1px solid rgba(167, 139, 250, 0.5);
  color: #e9d5ff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
}
.o3d-badge.is-muted { background: rgba(148, 163, 184, 0.18); border-color: rgba(148, 163, 184, 0.35); color: #cbd5e1; }
.o3d-badge.is-warn { background: rgba(239, 68, 68, 0.22); border-color: rgba(248, 113, 113, 0.55); color: #fecaca; }

.o3d .o3d-btn-sm {
  padding: 6px 10px; border-radius: 8px; border: 0;
  background: var(--o3d-accent); color: #06231f;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.o3d .o3d-btn-sm.is-ghost { background: rgba(255, 255, 255, 0.09); color: var(--o3d-text); border: 1px solid var(--o3d-line); font-weight: 600; }
.o3d .o3d-btn-sm.is-warn-btn { background: #f59e0b; color: #1c1917; font-weight: 700; }
.o3d-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  padding: 9px 12px; border: 0; border-radius: 9px;
  background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.o3d-btn-primary:hover { filter: brightness(1.1); }
.o3d-btn-primary:disabled { opacity: 0.7; cursor: default; }

/* Modal thông tin điểm chạm: mặc định gắn nổi trong không gian 3D (.is-spatial), cho phép xoay/kéo 3D tự do, hoặc bấm Mở rộng 2D */
.o3d-modal-wrap {
  position: absolute; inset: 0; z-index: 15;
  display: grid; place-items: center; padding: 18px;
  background: rgba(5, 10, 22, 0.72); backdrop-filter: blur(5px);
}
.o3d-modal-wrap.is-spatial {
  display: block; padding: 0;
  background: transparent; backdrop-filter: none;
  pointer-events: none;
}
.o3d-modal {
  position: relative; width: min(920px, 100%); max-height: calc(100% - 12px);
  overflow-y: auto; padding: 18px 20px; border-radius: 16px;
  background: rgba(15, 23, 42, 0.98); border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  -webkit-user-select: text; user-select: text;
}
.o3d-modal-wrap.is-spatial .o3d-modal {
  position: absolute; left: 0; top: 0;
  width: min(560px, calc(100vw - 28px)); max-height: min(440px, 62vh);
  background: linear-gradient(160deg, rgba(13, 23, 46, 0.96), rgba(15, 31, 58, 0.94));
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.65), 0 0 28px rgba(56, 189, 248, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform-origin: 50% 100%;
  will-change: transform;
  pointer-events: auto;
}
.o3d-modal-tools {
  position: absolute; right: 12px; top: 10px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
}
.o3d-modal-mode {
  background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px; height: 30px; padding: 0 9px;
  color: #7dd3fc; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.o3d-modal-mode:hover { background: rgba(56, 189, 248, 0.28); color: #fff; }
.o3d-modal-close {
  background: rgba(255, 255, 255, 0.08); border: 0; border-radius: 8px;
  width: 30px; height: 30px; color: var(--o3d-text); font-size: 20px; cursor: pointer;
}
.o3d-m-head { padding-right: 132px; margin-bottom: 12px; }
.o3d-m-head h3 { margin: 6px 0 3px; font-size: 18px; }
.o3d-m-head small { color: var(--o3d-muted); font-size: 12px; }
.o3d-m-banner { padding: 8px 11px; border-radius: 9px; background: rgba(56, 189, 248, 0.14); color: #bae6fd; margin-bottom: 12px; font-size: 13px; }
.o3d-rbac-deny { padding: 16px; border-radius: 12px; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(248, 113, 113, 0.35); }
.o3d-rbac-deny b { display: block; font-size: 15px; color: #fecaca; margin-bottom: 6px; }
.o3d-rbac-deny p { margin: 0 0 6px; font-size: 13.5px; }
.o3d-rbac-deny small { color: var(--o3d-muted); font-size: 12px; }

.o3d-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 12px; }
.o3d-kpi { padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--o3d-line); }
.o3d-kpi span { display: block; font-size: 11px; color: var(--o3d-muted); }
.o3d-kpi b { display: block; font-size: 20px; }
.o3d-kpi small { display: block; font-size: 10.5px; margin-top: 2px; }
.o3d-kpi.is-ok b { color: #86efac; } .o3d-kpi.is-late b { color: #fbbf24; } .o3d-kpi.is-abs b { color: #f87171; }
.o3d-kpi-row.is-compact .o3d-kpi { padding: 6px 8px; } .o3d-kpi-row.is-compact .o3d-kpi b { font-size: 16px; }

.o3d-m-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.o3d-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.o3d-tabs button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.05); font-size: 12px; cursor: pointer; }
.o3d-tabs button.is-on { background: var(--o3d-accent); color: #06231f; border-color: transparent; font-weight: 700; }

.o3d-table-wrap { max-height: 320px; overflow-y: auto; border: 1px solid var(--o3d-line); border-radius: 10px; }
.o3d-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.o3d-table th, .o3d-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--o3d-line); }
.o3d-table th { position: sticky; top: 0; background: #162036; font-size: 11.5px; color: var(--o3d-muted); text-transform: uppercase; }
.o3d-st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.o3d-st.is-ok { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.o3d-st.is-late { background: rgba(251, 191, 36, 0.2); color: #fde68a; }
.o3d-st.is-abs { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.o3d-st.is-exp { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

/* POP-09 HEOS actions block trong Side Panel */
.o3d-heos-box { margin: 10px 0 4px; padding: 10px; border-radius: 11px; background: rgba(124, 58, 237, 0.12); border: 1px solid rgba(167, 139, 250, 0.3); }
.o3d-heos-box h4 { margin: 0 0 8px !important; }
.o3d-heos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.o3d-heos-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 8px;
  border-radius: 8px; border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.06);
  text-align: left; cursor: pointer; font-size: 12px;
}
.o3d-heos-btn:hover { border-color: var(--o3d-accent); background: rgba(94, 234, 212, 0.12); }
.o3d-heos-btn b { font-weight: 600; flex: 1; }
.o3d-heos-btn small { font-size: 10px; color: var(--o3d-muted); }
.o3d-heos-meta { margin-top: 8px; font-size: 11.5px; color: #cbd5e1; display: flex; flex-direction: column; gap: 2px; }
.o3d-heos-meta.is-muted { color: var(--o3d-muted); }

/* POP-26 Phòng ban */
.o3d-dept-intro { font-size: 13px; color: #cbd5e1; margin: 6px 0 10px !important; line-height: 1.5; }
.o3d-dept-list { display: flex; flex-direction: column; gap: 2px; }
.o3d-chipx.is-ok { border-color: rgba(134, 239, 172, 0.5); color: #86efac; }
.o3d-chipx.is-warn { border-color: rgba(251, 191, 36, 0.55); color: #fde68a; }

/* POP-23 Sự kiện & QR */
.o3d-ev-grid { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.o3d-ev-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--o3d-line); text-align: center; }
.o3d-qr { width: 170px; height: 170px; display: block; border-radius: 8px; }
.o3d-ev-info p { margin: 0 0 6px; font-size: 13.5px; }
.o3d-ev-info h4 { margin: 12px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--o3d-accent); }
.o3d-fl-up { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.o3d-up-row { padding: 7px 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); font-size: 12px; }
.o3d-up-row small { display: block; color: var(--o3d-accent); font-size: 11px; }
.o3d-up-row b { display: block; margin: 2px 0; }
.o3d-up-row span { color: var(--o3d-muted); font-size: 11px; }

/* POP-33 & Live CCTV Camera HUD */
.o3d-cam-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.o3d-cam-stage { display: flex; flex-direction: column; gap: 8px; }
.o3d-cam-view { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: #020617; border: 1px solid var(--o3d-line); }
.o3d-cam-cv, .o3d-cam-vid { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: #020617; display: block; object-fit: cover; }
.o3d-cam-view .o3d-cam-cv, .o3d-cam-view .o3d-cam-vid, .o3d-cam-view .o3d-cam-off { border: 0; border-radius: 0; }
.o3d-cam-vid.is-live-cctv { pointer-events: none; user-select: none; }
.o3d-cam-vid.is-live-cctv::-webkit-media-controls { display: none !important; }
.o3d-cctv-hud {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3;
  display: flex; align-items: center; gap: 8px; pointer-events: none;
  font-family: Consolas, ui-monospace, monospace;
}
.o3d-cctv-hud[hidden] { display: none !important; }
.o3d-live-pill {
  flex-shrink: 0; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px;
  background: rgba(220, 38, 38, 0.92); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: 0.08em;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.55);
}
.o3d-live-pill .o3d-live-dot { background: #fff; box-shadow: 0 0 6px #fff; }
.o3d-live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: #ef4444; box-shadow: 0 0 8px #ef4444;
  animation: o3d-live-blink 1s ease-in-out infinite;
}
.o3d-live-dot.is-inline { vertical-align: middle; margin-right: 3px; }
@keyframes o3d-live-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.22; transform: scale(0.82); }
}
.o3d-cctv-ch {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 8px; border-radius: 6px; background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16); color: #f8fafc; font-size: 11px; font-weight: 700;
  backdrop-filter: blur(4px);
}
.o3d-cctv-clock {
  flex-shrink: 0; white-space: nowrap;
  margin-left: auto; padding: 3px 8px; border-radius: 6px; background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(94, 234, 212, 0.35); color: #5eead4; font-size: 11px; font-weight: 700;
  backdrop-filter: blur(4px);
}
.o3d-badge.is-live-head {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239, 68, 68, 0.18); border: 1px solid rgba(248, 113, 113, 0.55); color: #fecaca;
}
.o3d-cam-dot.is-red-live { background: rgba(239, 68, 68, 0.22); color: #fca5a5; animation: o3d-live-blink 1.2s ease-in-out infinite; }
.o3d-cam-off {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center;
  background: rgba(15, 23, 42, 0.9); border: 1px dashed rgba(248, 113, 113, 0.55); color: #fca5a5;
}
.o3d-cam-bar { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--o3d-muted); }
.o3d-cam-url { display: flex; gap: 6px; }
.o3d-cam-url input { flex: 1; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.06); color: var(--o3d-text); font-size: 12px; }
.o3d-cam-url button { padding: 6px 10px; border-radius: 8px; border: 0; background: var(--o3d-accent); color: #06231f; font-weight: 700; font-size: 12px; cursor: pointer; }
.o3d-cam-list h4 { margin: 0 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--o3d-accent); }
.o3d-cam-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; margin-bottom: 6px; border-radius: 9px;
  border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.04); text-align: left; cursor: pointer;
}
.o3d-cam-btn:hover { background: rgba(255, 255, 255, 0.09); }
.o3d-cam-btn.is-on { border-color: var(--o3d-accent); background: rgba(94, 234, 212, 0.12); }
.o3d-cam-btn b { display: block; font-size: 12.5px; }
.o3d-cam-btn small { color: var(--o3d-muted); font-size: 11px; }
.o3d-cam-dot { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 999px; background: rgba(34, 197, 94, 0.2); color: #86efac; }
.o3d-cam-btn.is-off .o3d-cam-dot { background: rgba(239, 68, 68, 0.22); color: #fca5a5; }
.o3d-cam-note { font-size: 11.5px; color: var(--o3d-muted); margin-top: 8px; line-height: 1.45; }

.o3d-modal::-webkit-scrollbar, .o3d-chat-log::-webkit-scrollbar, .o3d-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.o3d-modal::-webkit-scrollbar-track, .o3d-chat-log::-webkit-scrollbar-track, .o3d-table-wrap::-webkit-scrollbar-track { background: transparent; }
.o3d-modal::-webkit-scrollbar-thumb, .o3d-chat-log::-webkit-scrollbar-thumb, .o3d-table-wrap::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.32); border-radius: 999px; }

/* POP-27 & POP-28 AI Chat & CRM (Thẻ Hologram 3D trên đầu nhân vật AI) */
.o3d-modal-wrap.is-spatial .o3d-modal.is-ai-3d {
  width: min(456px, calc(100vw - 28px));
  max-height: min(490px, 72vh);
  padding: 13px 15px;
  border-color: rgba(167, 139, 250, 0.78);
  background: linear-gradient(160deg, rgba(17, 15, 46, 0.96), rgba(15, 27, 56, 0.95));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.7), 0 0 32px rgba(139, 92, 246, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.o3d-ai-head { margin-bottom: 6px; }
.o3d-ai-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 4px 0 2px; }
.o3d-ai-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.o3d-ai-tabs { display: flex; flex-wrap: wrap; gap: 3.5px; margin: 5px 0 7px; }
.o3d-ai-tabs button { padding: 3.5px 6.5px; border-radius: 7px; border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.05); font-size: 10.5px; cursor: pointer; white-space: nowrap; }
.o3d-ai-tabs button.is-on { background: #7c3aed; border-color: #a78bfa; color: #fff; font-weight: 700; }
.o3d-chat-log { display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; padding: 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--o3d-line); margin: 4px 0 6px; }
.o3d-modal.is-ai-3d .o3d-chat-log { max-height: 112px; }
.o3d-msg { padding: 7px 9px; border-radius: 10px; font-size: 12px; line-height: 1.42; }
.o3d-msg.is-ai { background: rgba(124, 58, 237, 0.22); border: 1px solid rgba(167, 139, 250, 0.28); align-self: flex-start; max-width: 95%; }
.o3d-msg.is-user { background: rgba(56, 189, 248, 0.22); border: 1px solid rgba(56, 189, 248, 0.32); align-self: flex-end; max-width: 88%; }
.o3d-msg small { display: block; margin-top: 3px; font-size: 10px; color: var(--o3d-muted); }
.o3d-esc-btn { margin-top: 6px; width: 100%; }
.o3d-ai-sugs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.o3d-ai-sugs button { padding: 3.5px 8px; border-radius: 999px; border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.06); font-size: 10.5px; color: #cbd5e1; cursor: pointer; text-align: left; }
.o3d-ai-sugs button:hover { border-color: var(--o3d-accent); color: #fff; }
.o3d-chat-form { display: flex; gap: 6px; margin-bottom: 2px; }
.o3d-chat-form input { flex: 1; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.08); color: var(--o3d-text); font-size: 12px; }
.o3d-chat-form button { padding: 6px 12px; border-radius: 8px; border: 0; background: var(--o3d-accent); color: #06231f; font-weight: 700; cursor: pointer; }

.o3d-crm-card { margin: 6px 0 7px; padding: 8px 10px; border-radius: 10px; background: rgba(236, 72, 153, 0.14); border: 1px solid rgba(236, 72, 153, 0.38); display: flex; flex-direction: column; gap: 5px; }
.o3d-crm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.o3d-crm-btn { background: linear-gradient(135deg, #ec4899, #8b5cf6) !important; color: #fff !important; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.o3d-ads-form.is-inline-ads { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.o3d-crm-ok { font-size: 11.5px; font-weight: 700; color: #86efac; }
.o3d-crm-warn { font-size: 11.5px; font-weight: 700; color: #fde68a; }
.o3d-ads-form { display: flex; flex-direction: column; gap: 6px; }
.o3d-ads-form input, .o3d-ads-form select { padding: 7px 9px; border-radius: 8px; border: 1px solid var(--o3d-line); background: rgba(15, 23, 42, 0.85); color: var(--o3d-text); font-size: 12.5px; }
.o3d-link-mini { background: none; border: 0; color: var(--o3d-muted); font-size: 11px; text-decoration: underline; cursor: pointer; align-self: flex-start; padding: 0; }
.o3d-link-mini:hover { color: var(--o3d-accent); }

.o3d-narrow .o3d-ev-grid, .o3d-narrow .o3d-cam-layout { grid-template-columns: 1fr; }
.o3d-narrow .o3d-pop-select { display: none; }

/* ---------- Mốc 2: Thời khóa biểu, OPAC, Dashboard KPI BGH, AI Metrics, Handover, Pin mặt trời ---------- */
.o3d-pin.is-kpi { border-color: rgba(250, 204, 21, 0.8); background: rgba(76, 29, 149, 0.9); }
.o3d-pin.is-candidate {
  border-color: rgba(56, 189, 248, 0.92);
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.95), rgba(15, 23, 42, 0.94));
  color: #e0f2fe;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.28);
}
.o3d-pin.is-lecturer {
  height: 24px; padding: 0 8px; font-size: 11px;
  border-color: rgba(250, 204, 21, 0.92);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.92));
  color: #fef9c3;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(250, 204, 21, 0.22);
}
.o3d-lec-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.o3d-lec-card {
  padding: 11px 12px; border-radius: 11px; display: flex; flex-direction: column; gap: 6px;
  background: rgba(15, 23, 42, 0.72); border: 1px solid rgba(56, 189, 248, 0.42);
}
.o3d-lec-card.is-next { border-color: rgba(250, 204, 21, 0.55); background: rgba(30, 41, 59, 0.72); }
.o3d-lec-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.04em; color: #7dd3fc; text-transform: uppercase;
}
.o3d-lec-tag.is-amber { color: #fde047; }
.o3d-lec-card strong { font-size: 14px; color: #fff; line-height: 1.35; }
.o3d-lec-topic { margin: 0 !important; font-size: 12.5px; color: #e2e8f0; line-height: 1.42; }
.o3d-next-room {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  background: rgba(250, 204, 21, 0.2); border: 1px solid rgba(250, 204, 21, 0.55);
  color: #fef08a; font-weight: 800;
}
.o3d-lec-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: #cbd5e1; margin-top: auto; }
.o3d-narrow .o3d-lec-cards { grid-template-columns: 1fr; }
.o3d-pin.is-meeting { border-color: rgba(56, 189, 248, 0.7); }
.o3d-pin.is-candidate {
  border-color: rgba(56, 189, 248, 0.95);
  background: linear-gradient(135deg, rgba(12, 26, 52, 0.95), rgba(3, 105, 161, 0.92));
  color: #e0f2fe;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.28);
}
.o3d-pin.is-library { border-color: rgba(52, 211, 153, 0.75); }
.o3d-pin.is-sports { border-color: rgba(251, 146, 60, 0.75); }
.o3d-pin.is-ai-metrics { border-color: rgba(167, 139, 250, 0.8); }
.o3d-pin.is-handover { border-color: rgba(16, 185, 129, 0.8); }
.o3d-pin.is-cam-ai { border-color: rgba(34, 197, 94, 0.75); }
.o3d-pin.is-solar { border-color: rgba(250, 204, 21, 0.8); background: rgba(6, 78, 59, 0.88); }

.o3d-input-inline {
  flex: 1; min-width: 220px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--o3d-line); background: rgba(255, 255, 255, 0.06); color: var(--o3d-text); font-size: 12.5px;
}
.o3d-sched { table-layout: fixed; }
.o3d-sched th:first-child, .o3d-sched td:first-child { width: 108px; }
.o3d-sched th, .o3d-sched td { padding: 6px; vertical-align: top; }
.o3d-slot {
  width: 100%; min-height: 54px; padding: 6px 7px; border-radius: 8px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; font-size: 11.5px;
}
.o3d-slot.is-free { border: 1px dashed rgba(94, 234, 212, 0.45); background: rgba(94, 234, 212, 0.06); color: var(--o3d-accent); align-items: center; justify-content: center; font-weight: 600; }
.o3d-slot.is-free:hover { background: rgba(94, 234, 212, 0.16); }
.o3d-slot.is-busy { border: 1px solid rgba(167, 139, 250, 0.35); background: rgba(124, 58, 237, 0.18); color: #f1f5f9; }
.o3d-slot.is-busy.is-booked { border-color: rgba(34, 197, 94, 0.55); background: rgba(34, 197, 94, 0.16); }
.o3d-slot.is-busy small { font-size: 10.5px; color: var(--o3d-muted); }

.o3d-conflict-box { padding: 11px 13px; border-radius: 11px; background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(248, 113, 113, 0.45); margin-bottom: 12px; }
.o3d-conflict-box > b { display: block; color: #fecaca; margin-bottom: 8px; font-size: 13px; }
.o3d-alt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.o3d-alt-card { padding: 8px 10px; border-radius: 9px; background: rgba(15, 23, 42, 0.72); border: 1px solid var(--o3d-line); display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.o3d-alt-card small { color: var(--o3d-muted); font-size: 11px; }

.o3d-book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-height: 360px; overflow-y: auto; padding-right: 2px; }
.o3d-book-card { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--o3d-line); display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.o3d-book-card.is-out { border-color: rgba(248, 113, 113, 0.35); background: rgba(239, 68, 68, 0.06); }
.o3d-book-card small { color: var(--o3d-muted); font-size: 11.5px; }
.o3d-btn-sm.is-warn-btn { background: #f59e0b; color: #1c1917; }
.o3d-ebook-box { padding: 10px 12px; border-radius: 10px; background: rgba(56, 189, 248, 0.14); border: 1px solid rgba(56, 189, 248, 0.4); margin-bottom: 10px; font-size: 12.5px; }
.o3d-ebook-box p { margin: 6px 0 0; color: #e2e8f0; }

.o3d-exec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.o3d-subh { margin: 4px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--o3d-accent); }
.o3d-bars { display: flex; flex-direction: column; gap: 9px; }
.o3d-bar-row > div:first-child { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 3px; }
.o3d-wf-list { display: flex; flex-direction: column; gap: 8px; }
.o3d-wf-item { padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--o3d-line); font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.o3d-wf-item.is-done { opacity: 0.72; }
.o3d-wf-item small { color: var(--o3d-muted); font-size: 11.5px; }
.o3d-ho-q { margin: 4px 0 !important; padding: 6px 8px; border-radius: 7px; background: rgba(0, 0, 0, 0.25); font-size: 12px; color: #e2e8f0; }
.o3d-done-box { padding: 14px; border-radius: 11px; background: rgba(34, 197, 94, 0.14); border: 1px solid rgba(134, 239, 172, 0.4); color: #bbf7d0; font-size: 13px; display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.o3d-done-box small { color: #cbd5e1; font-size: 11.5px; }

.o3d-narrow .o3d-exec-grid, .o3d-narrow .o3d-book-grid, .o3d-narrow .o3d-alt-grid { grid-template-columns: 1fr; }

/* ---------- Mốc 3: Spatial Audio 3m, VietQR mini, 24 Microservices Grid ---------- */
.o3d-prox-pill {
  position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 9;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(14, 116, 144, 0.94); border: 1px solid rgba(94, 234, 212, 0.7);
  color: #f8fafc; font-size: 12.5px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.o3d-prox-pill span { color: #5eead4; font-weight: 700; }
.o3d-prox-pill:hover { filter: brightness(1.1); }

.o3d-qr-mini {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px;
  border-radius: 9px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--o3d-line);
}
.o3d-qr-mini .o3d-qr { width: 76px; height: 76px; flex: none; }
.o3d-qr-mini b { display: block; font-size: 12.5px; }
.o3d-qr-mini small { display: block; font-size: 11px; color: var(--o3d-muted); }

.o3d-spatial-box {
  padding: 14px; border-radius: 11px; text-align: center;
  background: rgba(14, 165, 233, 0.14); border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px;
}
.o3d-spatial-box.is-live { background: rgba(34, 197, 94, 0.16); border-color: rgba(134, 239, 172, 0.6); }
.o3d-wave { display: flex; align-items: center; gap: 4px; height: 22px; }
.o3d-wave i { width: 4px; height: 8px; border-radius: 3px; background: #38bdf8; display: block; }
.o3d-spatial-box.is-live .o3d-wave i { background: #4ade80; animation: o3d-wv 0.8s infinite alternate; }
.o3d-spatial-box.is-live .o3d-wave i:nth-child(2) { animation-delay: 0.15s; }
.o3d-spatial-box.is-live .o3d-wave i:nth-child(3) { animation-delay: 0.3s; }
.o3d-spatial-box.is-live .o3d-wave i:nth-child(4) { animation-delay: 0.45s; }
@keyframes o3d-wv { from { height: 6px; } to { height: 22px; } }

.o3d-svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 240px; overflow-y: auto; }
.o3d-svc {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px;
  background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.28); font-size: 11.5px;
}
.o3d-svc i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; }
.o3d-svc b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.o3d-svc small { color: var(--o3d-muted); font-size: 10.5px; }
.o3d-svc.is-down { background: rgba(239, 68, 68, 0.2); border-color: rgba(248, 113, 113, 0.65); color: #fecaca; }
.o3d-svc.is-down i { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.o3d-narrow .o3d-svc-grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- Tour Thuyết trình Triển lãm 7 điểm nhấn ---------- */
.o3d .o3d-tour-btn {
  height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid rgba(250, 204, 21, 0.55);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(37, 99, 235, 0.85));
  color: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.o3d .o3d-tour-btn:hover { filter: brightness(1.12); }
.o3d .o3d-tour-btn.is-on { background: #facc15; color: #1c1917; border-color: #fef08a; }

.o3d-tour-card {
  position: absolute; right: 14px; bottom: 14px; left: auto; transform: none; z-index: 10;
  width: min(340px, calc(100% - 28px)); padding: 10px 12px; border-radius: 13px;
  background: rgba(15, 23, 42, 0.92); border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); backdrop-filter: blur(10px);
}
.o3d-tour-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.o3d-tour-dots { display: flex; gap: 3.5px; flex-wrap: wrap; justify-content: flex-end; }
.o3d-tour-dots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.24); cursor: pointer; transition: width 0.2s, background 0.2s; }
.o3d-tour-dots i.is-on { width: 15px; background: #facc15; }
.o3d-tour-card strong { display: block; font-size: 13.5px; color: #fff; margin-bottom: 3px; line-height: 1.3; }
.o3d-tour-card p { margin: 0 0 7px; font-size: 11.5px; color: #cbd5e1; line-height: 1.4; }
.o3d-tour-bar { height: 3.5px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-bottom: 8px; }
.o3d-tour-bar i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #a78bfa, #5eead4, #facc15); transform-origin: left center; will-change: transform; }
.o3d-tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.o3d-tour-links, .o3d-tour-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.o3d .o3d-tour-card .o3d-btn-sm { padding: 4px 8px; font-size: 11px; }
.o3d .o3d-tour-nav .is-loop-on { border-color: #facc15; color: #facc15; }
.o3d-narrow .o3d-tour-card { right: 10px; bottom: 64px; width: min(300px, calc(100% - 20px)); padding: 8px 10px; }

/* ---------- Đại đô thị Intracom (cityscape.js) ---------- */
.o3d-zone-select { border-color: rgba(56, 189, 248, 0.55) !important; background: rgba(14, 116, 144, 0.25) !important; font-weight: 600; max-width: 138px; }
.o3d-city-pin {
  position: absolute; left: 0; top: 0; z-index: 3;
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.72);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.88));
  color: #fef9c3; font-size: 12px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  pointer-events: auto; cursor: pointer; will-change: transform;
}
.o3d-city-pin:hover { border-color: #fff; filter: brightness(1.14); z-index: 5; }
.o3d-lm-card {
  position: absolute; left: 16px; top: 76px; z-index: 8;
  width: min(355px, calc(100% - 32px)); padding: 12px 14px; border-radius: 14px;
  background: rgba(15, 23, 42, 0.94); border: 1px solid rgba(250, 204, 21, 0.55);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.52); backdrop-filter: blur(10px);
}
.o3d-lm-card strong { display: block; font-size: 15px; color: #fff; margin: 4px 0 5px; }
.o3d-lm-card p { margin: 0 0 8px; font-size: 12.5px; color: #cbd5e1; line-height: 1.48; }
.o3d.o3d-narrow .o3d-tour-btn { height: 32px; padding: 0 10px; font-size: 11.5px; }
.o3d-narrow .o3d-lm-card { top: auto; bottom: 72px; left: 10px; right: 10px; width: auto; }

/* ---------- Cổng Đăng nhập Giao diện Intracom (auth-gate.js) ---------- */
.o3d-auth-wrap {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; padding: 20px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #f8fafc;
  background: radial-gradient(circle at 20% 20%, #1e1b4b 0%, #0f172a 48%, #020617 100%);
  transition: opacity 0.22s ease;
}
.o3d-auth-wrap.is-leaving { opacity: 0; pointer-events: none; }
.o3d-auth-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.28;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.16) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, #000 20%, transparent 80%);
}
.o3d-auth-card {
  position: relative; width: min(410px, 100%);
  padding: 28px 26px 22px; border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65), 0 0 40px rgba(91, 33, 182, 0.28);
  backdrop-filter: blur(14px);
}
.o3d-auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
.o3d-auth-emblem {
  width: 48px; height: 48px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #5b21b6, #0284c7);
  border: 1.5px solid rgba(250, 204, 21, 0.72);
  color: #facc15; font-size: 16px; font-weight: 900; letter-spacing: 0.04em;
  box-shadow: 0 8px 22px rgba(91, 33, 182, 0.45);
}
.o3d-auth-kicker {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em;
  color: #38bdf8; margin-bottom: 2px;
}
.o3d-auth-card h1 { margin: 0; font-size: 20px; font-weight: 800; color: #fff; }
.o3d-auth-sub { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: #94a3b8; }
.o3d-auth-field { display: block; margin-bottom: 14px; }
.o3d-auth-field > span { display: block; font-size: 12px; font-weight: 600; color: #cbd5e1; margin-bottom: 6px; }
.o3d-auth-field input {
  width: 100%; box-sizing: border-box; height: 42px; padding: 0 13px;
  border-radius: 10px; border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.65); color: #f8fafc; font-size: 14px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.o3d-auth-field input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.o3d-auth-passbox { position: relative; }
.o3d-auth-passbox input { padding-right: 42px; }
.o3d-auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: #94a3b8; font-size: 15px; cursor: pointer;
}
.o3d-auth-eye:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.o3d-auth-check {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 16px; font-size: 12.5px; color: #cbd5e1; cursor: pointer;
}
.o3d-auth-check input { width: 15px; height: 15px; accent-color: #38bdf8; }
.o3d-auth-err {
  margin-bottom: 14px; padding: 9px 12px; border-radius: 10px;
  background: rgba(239, 68, 68, 0.16); border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fecaca; font-size: 12.5px; font-weight: 600;
}
.o3d-auth-submit {
  width: 100%; height: 44px; border: 0; border-radius: 11px;
  background: linear-gradient(135deg, #6d28d9, #0284c7);
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  transition: filter 0.15s, transform 0.1s;
}
.o3d-auth-submit:hover { filter: brightness(1.1); }
.o3d-auth-submit:active { transform: translateY(1px); }
.o3d-auth-submit:disabled { opacity: 0.7; cursor: default; }
.o3d-auth-foot {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center; font-size: 11px; color: #64748b;
}
.o3d .o3d-logout-btn {
  border-color: rgba(248, 113, 113, 0.45) !important;
  background: rgba(127, 29, 29, 0.32) !important;
  color: #fecaca !important;
  font-weight: 600;
}
.o3d .o3d-logout-btn:hover { background: rgba(185, 28, 28, 0.52) !important; color: #fff !important; }
