/* Orville Office - look and layout */

:root {
  --navy: #0f2a4a;
  --navy-2: #173a63;
  --gold: #a9935a;
  --gold-soft: #efe8d6;
  --bg: #f4f5f8;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --line: #e4e7ec;
  --text: #101828;
  --muted: #667085;
  --accent: #2459d6;
  --accent-soft: #e8efff;
  --danger: #e5484d;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.08);
  --radius: 12px;
  --available: #22c55e;
  --busy: #ef4444;
  --meeting: #a855f7;
  --away: #f59e0b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1420; --panel: #171d2b; --panel-2: #1d2434; --line: #2a3346;
    --text: #e7eaf0; --muted: #98a2b3; --accent: #6b93ff; --accent-soft: #1e2a4a; --gold-soft: #3a3220;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1420; --panel: #171d2b; --panel-2: #1d2434; --line: #2a3346;
  --text: #e7eaf0; --muted: #98a2b3; --accent: #6b93ff; --accent-soft: #1e2a4a; --gold-soft: #3a3220;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 0; }
.i { display: inline-flex; width: 18px; height: 18px; }
.i svg, [data-icon] > svg { width: 100%; height: 100%; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--available); }
.dot.available { background: var(--available); }
.dot.busy { background: var(--busy); }
.dot.meeting { background: var(--meeting); }
.dot.away { background: var(--away); }
.dot.offline { background: #98a2b3; }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid var(--line); background: var(--panel); border-radius: 10px;
  padding: 9px 16px; font-weight: 600; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 8px;
  border: 0; background: transparent; border-radius: 10px; color: var(--muted);
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; padding: 6px; }
.icon-btn.primary { background: var(--navy); color: #fff; }
.icon-btn.float { position: absolute; background: var(--panel); box-shadow: var(--shadow); color: var(--text); }
.ghost-icon { border: 0; background: transparent; color: var(--muted); padding: 4px 8px; font-size: 12px; font-weight: 600; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: none; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); padding: 4px; object-fit: contain; flex: none; }
.topbar-logo { height: 40px; width: auto; display: block; }
.brand-sep { width: 1px; height: 26px; background: var(--line); }
.brand-office { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.login-logo { position: relative; z-index: 1; width: min(360px, 80%); height: auto; align-self: flex-start; }
.login-logo-sm { width: 220px; height: auto; align-self: center; margin-bottom: 8px; }

/* ---------- Login ---------- */
#login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  position: relative; overflow: hidden; color: #fff; padding: 40px 48px;
  background: radial-gradient(1200px 600px at 10% 0%, #1f4b80 0%, var(--navy) 55%, #0a1d35 100%);
  display: flex; flex-direction: column; gap: 32px;
}
.login-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.login-pitch { position: relative; z-index: 1; max-width: 520px; }
.login-pitch h1 { font-family: "Playfair Display", Georgia, serif; font-size: 44px; line-height: 1.1; margin: 24px 0 14px; }
.login-pitch p { color: #c9d3e3; font-size: 16px; line-height: 1.6; margin: 0 0 22px; }
.login-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #e3e8f0; }
.login-points li { display: flex; gap: 10px; align-items: center; }
.login-points span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.1); }
#login-preview {
  position: relative; z-index: 1; margin-top: auto; width: 100%; max-width: 640px; border-radius: 14px;
  image-rendering: pixelated; box-shadow: 0 20px 60px rgba(0,0,0,.45); border: 4px solid rgba(255,255,255,.12);
}
.login-panel { display: grid; place-items: center; padding: 32px 16px; background: var(--panel); }
.login-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { margin: 6px 0 0; font-size: 26px; }
.login-card .muted { margin: -6px 0 6px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tab { border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.tab.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input, .field select {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 400; font-size: 14px;
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pw { position: relative; }
.pw .ghost-icon { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.fine { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }
.only-mobile { display: none; }

/* ---------- Office layout ---------- */
#app { height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: relative; display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 16px;
  background: var(--panel); border-bottom: 1px solid var(--line); z-index: 20;
}
.location-chip, .follow-chip, .online-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 13px; white-space: nowrap;
}
.location-chip .i { width: 15px; height: 15px; color: var(--gold); }
.follow-chip { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.follow-chip .ghost-icon { width: 22px; height: 22px; padding: 3px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.online-pill { margin-right: 6px; color: var(--muted); }
.status-btn {
  display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--line);
  background: var(--panel); border-radius: 999px; text-align: left;
}
.status-btn:hover { background: var(--panel-2); }
.status-btn-text { display: flex; flex-direction: column; line-height: 1.15; }
.status-btn-text small { color: var(--muted); font-size: 11.5px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); image-rendering: pixelated; flex: none; object-fit: cover; }

.menu {
  position: absolute; top: 56px; right: 92px; width: 280px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px;
}
.menu-head { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 8px; text-transform: uppercase; letter-spacing: .6px; }
.menu > button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; text-align: left; }
.menu > button:hover { background: var(--panel-2); }
.menu > button.selected { background: var(--accent-soft); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu input { margin: 2px 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.quick-status { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 4px; }
.quick-status button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; }

.workspace { flex: 1; display: flex; min-height: 0; }

/* Sidebar */
.sidebar, .chat { width: 280px; background: var(--panel); display: flex; flex-direction: column; min-height: 0; flex: none; }
.sidebar { border-right: 1px solid var(--line); }
.chat { width: 340px; border-left: 1px solid var(--line); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px; }
.side-head h3 { margin: 0; font-size: 15px; }
.search { margin: 0 12px 8px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--muted); }
.search .i { width: 16px; height: 16px; }
.search input { border: 0; background: transparent; outline: none; padding: 9px 0; width: 100%; }
.people-scroll { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.group-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 10px 8px 6px; }
.people { list-style: none; margin: 0; padding: 0; }
.person { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.person:hover { background: var(--panel-2); }
.person .head-wrap { position: relative; }
.person .head-wrap .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--panel); }
.person-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.person-info b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-info small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-actions { display: none; gap: 2px; }
.person:hover .person-actions { display: flex; }
.person-actions button { border: 0; background: var(--panel); border-radius: 8px; width: 28px; height: 28px; display: grid; place-items: center; padding: 5px; color: var(--muted); }
.person-actions button:hover { color: var(--text); }
.people.offline .person { opacity: .6; }
.people.offline .head { filter: grayscale(.8); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }

/* Stage */
.stage { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #2a2f3d; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; }
#world.pointer { cursor: pointer; }
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#bubbles { position: absolute; inset: 0; pointer-events: none; }
.sidebar-open { left: 12px; top: 12px; }

.bubble {
  position: absolute; left: 0; top: 0; width: 132px; pointer-events: auto;
  transform-origin: 50% 100%; transition: opacity .2s;
}
.bubble-video {
  position: relative; width: 132px; height: 99px; border-radius: 16px; overflow: hidden; background: #1d2433;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); border: 3px solid #fff; transition: border-color .15s, box-shadow .15s;
}
.bubble.speaking .bubble-video { border-color: var(--available); box-shadow: 0 0 0 3px rgba(34,197,94,.35), 0 6px 20px rgba(0,0,0,.35); }
.bubble video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bubble.me video { transform: scaleX(-1); }
.bubble .cam-off { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #22324d, #0f2a4a); }
.bubble .cam-off img { width: 54px; height: 54px; border-radius: 50%; image-rendering: pixelated; background: var(--gold-soft); }
.bubble-tag {
  position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 4px;
  background: rgba(15,23,42,.72); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; max-width: calc(100% - 40px);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.bubble-tag .i { width: 12px; height: 12px; color: #ff8a8a; }
.bubble-expand { position: absolute; right: 5px; top: 5px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(15,23,42,.6); color: #fff; padding: 5px; opacity: 0; transition: opacity .15s; }
.bubble:hover .bubble-expand { opacity: 1; }
.bubble-tail { width: 14px; height: 14px; background: #fff; transform: rotate(45deg); margin: -9px auto 0; border-radius: 2px; }
.bubble.speaking .bubble-tail { background: var(--available); }
.bubble.screen .bubble-video { border-color: var(--gold); }

.zoom { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--panel); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.zoom .icon-btn { color: var(--text); }

.dock {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px;
  background: var(--panel); border-radius: 18px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 9;
}
.dock-group { display: flex; gap: 2px; padding: 0 4px; }
.dock-group + .dock-group { border-left: 1px solid var(--line); padding-left: 8px; }
.dock-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px; padding: 7px 8px 5px;
  border: 0; background: transparent; border-radius: 12px; color: var(--text);
}
.dock-btn:hover { background: var(--panel-2); }
.dock-btn .i { width: 22px; height: 22px; }
.dock-btn .emoji { font-size: 20px; line-height: 22px; }
.dock-btn .lbl { font-size: 11px; font-weight: 600; color: var(--muted); }
.dock-btn.off { background: #fdecec; color: var(--danger); }
:root[data-theme="dark"] .dock-btn.off { background: #3a1d22; }
.dock-btn.off .lbl { color: var(--danger); }
.dock-btn.on { background: var(--accent-soft); color: var(--accent); }
.dock-btn.on .lbl { color: var(--accent); }
.dock-btn.locked { background: var(--gold-soft); color: #8a6b10; }
.dock-btn:disabled { opacity: .4; cursor: not-allowed; }
.badge {
  position: absolute; top: 2px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.pop-wrap { position: relative; }
.emoji-pop {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 40px);
  gap: 4px; background: var(--panel); padding: 8px; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.emoji-pop.up { left: 0; transform: none; grid-template-columns: repeat(6, 36px); }
.emoji-pop button { border: 0; background: transparent; font-size: 22px; height: 40px; border-radius: 10px; }
.emoji-pop button:hover { background: var(--panel-2); transform: scale(1.15); }

.banner {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: min(640px, 90%);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--navy), #24508a); box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: drop .35s ease-out;
}
.banner .emoji { font-size: 24px; }
.banner small { display: block; color: var(--gold); font-weight: 700; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
@keyframes drop { from { transform: translate(-50%, -20px); opacity: 0; } }

.share-pill, .hint {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border-radius: 999px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); font-weight: 600; white-space: nowrap;
}
.share-pill { top: 14px; }
.hint { bottom: 96px; padding: 8px 8px 8px 14px; }
.hint kbd, kbd { background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; font-size: 12px; font-family: inherit; }
.share-pill .btn, .hint .btn { padding: 6px 12px; border-radius: 999px; }

.toasts { position: absolute; right: 70px; top: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 7; width: 320px; }
.toast {
  display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border-radius: 14px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  border: 1px solid var(--line); animation: slide .25s ease-out;
}
.toast .emoji { font-size: 22px; line-height: 1; }
.toast .head { width: 36px; height: 36px; }
.toast-body { flex: 1; min-width: 0; }
.toast-body p { margin: 2px 0 0; color: var(--muted); font-size: 13px; word-wrap: break-word; }
.toast-actions { display: flex; gap: 6px; margin-top: 8px; }
.toast-actions .btn { padding: 6px 12px; font-size: 13px; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

.meeting-view { position: absolute; inset: 0; z-index: 8; background: rgba(10, 16, 28, .94); display: flex; flex-direction: column; color: #fff; }
.meeting-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.meeting-head .icon-btn { color: #fff; }
.meeting-head .icon-btn:hover { background: rgba(255,255,255,.1); }
.meeting-grid { flex: 1; display: grid; gap: 12px; padding: 0 16px 100px; grid-auto-rows: 1fr; min-height: 0; }
.tile { position: relative; background: #1d2433; border-radius: 16px; overflow: hidden; min-height: 0; border: 3px solid transparent; }
.tile.speaking { border-color: var(--available); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.screen video { object-fit: contain; background: #000; }
.tile.me video { transform: scaleX(-1); }
.tile.screen.me video { transform: none; }
.tile .cam-off { position: absolute; inset: 0; display: grid; place-items: center; }
.tile .cam-off img { width: 96px; height: 96px; border-radius: 50%; image-rendering: pixelated; background: var(--gold-soft); }
.tile .bubble-tag { font-size: 13px; padding: 4px 10px; left: 10px; bottom: 10px; }
.meeting-empty { display: grid; place-items: center; color: #98a2b3; text-align: center; }

/* Chat */
.chat-tabs { display: flex; gap: 4px; margin: 0 12px 8px; background: var(--panel-2); border-radius: 10px; padding: 3px; border: 1px solid var(--line); }
.chat-tab { position: relative; flex: 1; border: 0; background: transparent; padding: 7px 4px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.chat-tab.active { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chat-tab .badge { top: -6px; right: -2px; }
.messages { flex: 1; overflow-y: auto; padding: 4px 14px 10px; }
.msg { display: flex; gap: 10px; padding: 6px 0; }
.msg .head { width: 34px; height: 34px; }
.msg.cont { padding-top: 0; }
.msg.cont .head { visibility: hidden; height: 0; }
.msg-body { min-width: 0; flex: 1; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; }
.msg-meta b { font-weight: 600; }
.msg-meta time { color: var(--muted); font-size: 11.5px; }
.msg p { margin: 2px 0 0; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; }
.msg.mine .msg-meta b { color: var(--accent); }
.empty { color: var(--muted); text-align: center; padding: 40px 16px; line-height: 1.6; }
.empty .emoji { font-size: 34px; display: block; margin-bottom: 6px; }
.chat-form { display: flex; gap: 6px; align-items: center; margin: 8px 12px 12px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.chat-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat-form input { flex: 1; border: 0; outline: none; background: transparent; padding: 8px 4px; min-width: 0; }
.dm-list { flex: 1; overflow-y: auto; padding: 0 8px; }
.dm-list .person small.unread { color: var(--accent); font-weight: 600; }
.dm-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; border-bottom: 1px solid var(--line); }
.dm-head .head { width: 28px; height: 28px; }

/* Person card */
.card-pop {
  position: fixed; z-index: 30; width: 270px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px;
}
.card-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.card-top .head { width: 52px; height: 52px; }
.card-top b { font-size: 16px; display: block; }
.card-top small { color: var(--muted); display: block; }
.card-status { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 0 0 4px; }
.card-where { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; display: flex; gap: 6px; align-items: center; }
.card-where .i { width: 14px; height: 14px; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.card-actions .btn { padding: 8px 10px; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.card-actions .btn.wide { grid-column: span 2; }

/* Modals */
.modal-back { position: fixed; inset: 0; z-index: 40; background: rgba(10, 16, 28, .55); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 14px; }
.modal.center { text-align: center; width: min(420px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h3, .modal h3 { margin: 0; font-size: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal.center .modal-foot { justify-content: center; }
.profile-body { display: grid; grid-template-columns: 150px 1fr; gap: 18px; }
.preview-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; background: linear-gradient(#e9dcc4, #d4ab78); border-radius: 14px; }
.preview-box small { color: #5a4632; font-size: 11.5px; text-align: center; }
#avatar-preview { width: 96px; height: 144px; image-rendering: pixelated; }
.pickers { display: flex; flex-direction: column; gap: 10px; }
.picker b { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.swatch.selected { box-shadow: 0 0 0 2px var(--accent); }
.chip { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; text-transform: capitalize; }
.chip.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: center; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); padding: 12px; background: var(--panel-2); border-radius: 12px; }
.shortcuts b { width: 100%; color: var(--text); }

/* Small screens */
@media (max-width: 1100px) {
  .chat { position: absolute; right: 0; top: 60px; bottom: 0; z-index: 15; box-shadow: var(--shadow); }
}
@media (max-width: 900px) {
  #login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .only-mobile { display: block; }
  .topbar-logo, .brand-sep, .brand-office { display: none; }
  .brand-mark { display: block; }
  .sidebar { position: absolute; left: 0; top: 60px; bottom: 0; z-index: 15; box-shadow: var(--shadow); }
  .status-btn-text, .online-pill, .location-chip { display: none; }
  .dock-btn { min-width: 44px; }
  .dock-btn .lbl { display: none; }
  .dock { max-width: calc(100% - 16px); overflow-x: auto; }
  .chat { width: 100%; }
  .toasts { right: 12px; width: calc(100% - 24px); }
  .profile-body { grid-template-columns: 1fr; }
}

/* ---------- Note taker ---------- */
.rec-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 0;
  background: #fdecec; color: #c62828; font-weight: 700; font-size: 13px;
}
:root[data-theme="dark"] .rec-chip { background: #3a1d22; color: #ff8a8a; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; flex: none; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.dock-btn.rec { background: #fdecec; }
.dock-btn.rec .lbl { color: #c62828; }
.notes-live, .notes-idle { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.notes-meta { padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
.rec-line { display: flex; align-items: center; gap: 8px; }
.notes-meta small { color: var(--muted); display: block; margin-top: 4px; }
.notes-warn { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #fff7e0; color: #8a6b10; font-size: 12.5px; line-height: 1.4; }
:root[data-theme="dark"] .notes-warn { background: #3a3220; color: #f0d27a; }
.notes-lines .msg p { color: var(--text); }
.notes-lines .msg.note p { background: var(--gold-soft); border-radius: 8px; padding: 4px 8px; display: inline-block; }
.notes-lines .interim p { color: var(--muted); font-style: italic; }
.notes-actions { padding: 0 12px 12px; }
.notes-idle { overflow-y: auto; }
.notes-start { margin: 4px 12px 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); text-align: center; display: flex; flex-direction: column; gap: 8px; }
.notes-start .emoji { font-size: 32px; }
.notes-start p { margin: 0; font-size: 13px; line-height: 1.5; }
.notes-past { padding: 0 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.past-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.past-item:hover { background: var(--panel-2); }
.past-item b { font-weight: 600; }
.past-item small { color: var(--muted); }
.past-item .status { font-size: 11.5px; font-weight: 700; }
.past-item .status.ready { color: #16a34a; }
.past-item .status.processing { color: var(--accent); }
.past-item .status.transcript, .past-item .status.empty { color: var(--muted); }
.past-actions { display: flex; gap: 6px; margin-top: 4px; }
.past-actions .btn { padding: 5px 10px; font-size: 12.5px; }
.modal.wide { width: min(760px, 100%); }
.nv-body { display: flex; flex-direction: column; gap: 4px; line-height: 1.55; }
.nv-body h4 { margin: 14px 0 4px; color: var(--navy); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
:root[data-theme="dark"] .nv-body h4 { color: var(--gold); }
.nv-body ul { margin: 0; padding-left: 20px; }
.nv-body table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.nv-body th { text-align: left; background: var(--navy); color: #fff; padding: 6px 10px; }
.nv-body td { border-bottom: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
.nv-meta { color: var(--muted); font-size: 13px; }
.nv-transcript { max-height: 260px; overflow-y: auto; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.nv-transcript div { padding: 2px 0; }
.nv-transcript time { color: var(--muted); margin-right: 6px; font-size: 12px; }

/* ---------- Admin & roles ---------- */
.role-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; vertical-align: 1px; letter-spacing: .3px; }
.role-chip.admin { background: var(--gold-soft); color: #8a6b10; }
.role-chip.guest { background: #e8f1ff; color: #2459d6; }
:root[data-theme="dark"] .role-chip.admin { color: #f0d27a; }
:root[data-theme="dark"] .role-chip.guest { background: #1e2a4a; color: #8fb0ff; }
.admin-btn { color: #8a6b10; }
.invite-note { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.invite-note.ok { background: #e9f8ef; color: #166534; }
.invite-note.bad { background: #fff7e0; color: #8a6b10; }
.modal.admin { width: min(980px, 100%); max-height: calc(100vh - 32px); }
.admin-tabs { grid-template-columns: repeat(4, 1fr); }
.admin-body { display: flex; flex-direction: column; gap: 14px; min-height: 300px; }
.admin-section { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.admin-section > p { margin: 0; font-size: 13px; }
.admin-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-add input, .admin-add select, .admin-search, .role-select, .field.inline select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
}
.admin-add input { flex: 1; min-width: 150px; }
.admin-add label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.admin-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.admin-search { flex: 1; min-width: 180px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr.disabled td { opacity: .55; }
.admin-table .who { display: flex; gap: 10px; align-items: center; }
.admin-table .who b { display: block; }
.inline-title { border: 1px solid transparent; background: transparent; padding: 2px 4px; margin-left: -4px; border-radius: 6px; color: var(--muted); font-size: 12.5px; width: 170px; }
.inline-title:hover, .inline-title:focus { border-color: var(--line); background: var(--panel); outline: none; }
.pending { display: block; color: #b26b00; font-size: 11.5px; }
.state { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.state.on { color: #16a34a; font-weight: 600; }
.state.off { color: var(--danger); font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.btn.sm { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.btn.danger-text { color: var(--danger); }
.invite-code { font-size: 12px; background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }
.block { display: block; }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; font-weight: 400; }
.role-help { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.secret-box { display: flex; gap: 8px; align-items: center; padding: 10px; background: var(--panel-2); border: 1px dashed var(--line); border-radius: 12px; }
.secret-box code { flex: 1; font-size: 15px; word-break: break-all; user-select: all; }

/* ---------- Recordings ---------- */
.dock-btn#btn-record.rec { background: #ef4444; }
.dock-btn#btn-record.rec .lbl, .dock-btn#btn-record.rec .emoji { color: #fff; }
.vp-video { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; }

/* ---------- Secure address notice ---------- */
.secure-note {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 16px; background: #fff7e0; color: #5c4708; border-bottom: 1px solid #f0d27a; font-size: 13.5px; line-height: 1.45;
}
.secure-note .btn { white-space: nowrap; text-decoration: none; }

/* ---------- Meeting invites ---------- */
.invite-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.invite-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.invite-row:hover { background: var(--panel-2); }
.invite-row.here { opacity: .55; cursor: default; }
.invite-row input { width: 17px; height: 17px; accent-color: var(--navy); }

/* ---------- Private notes ---------- */
.share-choice { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.share-choice label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.share-choice input[type="radio"] { accent-color: var(--navy); }
.share-choice .invite-list { max-height: 180px; margin-top: 4px; }
.nv-share { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.nv-share .invite-list { max-height: 200px; }

/* Keep the whole control bar visible when side panels make the office narrow. */
.stage { container-type: inline-size; }
.dock { max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
@container (max-width: 980px) {
  .dock-btn { min-width: 42px; padding: 8px 6px; }
  .dock-btn .lbl { display: none; }
  .dock-group { padding: 0 2px; }
  .dock-group + .dock-group { padding-left: 4px; }
}

/* ---------- Login links ---------- */
.login-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0; font-size: 13px; }
.login-links a { color: var(--accent); text-decoration: none; font-weight: 600; }
.login-links a:hover { text-decoration: underline; }

/* ---------- Admin email settings ---------- */
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.form-grid.three { grid-template-columns: 1.3fr 1fr 1fr; }
#invite-later, #invite-now { display: flex; flex-direction: column; gap: 12px; }
#invite-later[hidden], #invite-now[hidden] { display: none; }
#invite-later .field input, #invite-later .field select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-weight: 400; }
#sched-people { max-height: 200px; }
.form-grid .field input { width: 100%; }
.admin-section .field input, .admin-section .field select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-weight: 400; }
.check-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Files in chat ---------- */
.chat { position: relative; }
.chat-img { display: block; max-width: 100%; max-height: 220px; margin-top: 6px; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; background: var(--panel-2); }
.chat-file {
  display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 10px; width: 100%; max-width: 280px; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text);
}
.chat-file:hover { border-color: var(--accent); }
.chat-file.gone { color: var(--muted); font-size: 12.5px; cursor: default; }
.chat-file-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); padding: 7px; flex: none; }
.chat-file-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-file-info b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-info small { color: var(--muted); font-size: 11.5px; }
.chat-file .i { width: 18px; height: 18px; color: var(--muted); }
.chat-drop {
  position: absolute; inset: 8px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--accent); font-weight: 700; pointer-events: none;
}
.chat-drop span { font-size: 30px; }
