@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jbmono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #050f14;
  --ink: #e8f7f5;
  --muted: #7fa4a8;
  --faint: #4d6f75;
  --teal: #5fe3d0;
  --teal-2: #bafff4;
  --teal-deep: #16485a;
  --line: rgba(150, 235, 225, .14);
  --line-strong: rgba(150, 235, 225, .32);
  --glass: rgba(8, 26, 32, .66);
  --chat: #5fe3d0;
  --call: #ffc24d;
  --idle: #93aab1;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --dock-w: 58px;
  --panel-w: 328px;
  --pad: 18px;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.vignette { position: fixed; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse at 50% 45%, transparent 52%, rgba(3, 9, 12, .78) 100%),
  linear-gradient(180deg, rgba(3, 9, 12, .55) 0, transparent 16%, transparent 80%, rgba(3, 9, 12, .6) 100%); }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* Logotip: PNG shaffofligi niqob bo'lib, rang gradientdan olinadi (qorong'i fonda yorqin ko'rinadi) */
.logo-mark {
  width: 38px; aspect-ratio: 1; flex: none;
  background: linear-gradient(135deg, #3fbfb2 0%, var(--teal) 40%, var(--teal-2) 100%);
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(95, 227, 208, .55));
}

/* ───────── 3D yorliqlar ───────── */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.tag, .rlabel { position: absolute; left: 0; top: 0; will-change: transform; }
.tag { pointer-events: auto; cursor: pointer; transition: opacity .25s; }
.tag-chip {
  transform: translate(-50%, -100%);
  display: flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 7px; border-radius: 999px;
  background: rgba(6, 20, 25, .78); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  transition: border-color .2s, background .2s, padding .2s;
}
.tag-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--st, var(--chat)); box-shadow: 0 0 8px var(--st, var(--chat)); flex: none; }
.tag.far .tag-chip { padding: 3px; }
.tag.far .tag-chip span { display: none; }
.tag:hover .tag-chip, .tag.sel .tag-chip { border-color: var(--acc, var(--teal)); background: rgba(8, 30, 36, .95); padding: 3px 9px 3px 7px; }
.tag:hover .tag-chip span, .tag.sel .tag-chip span { display: inline; }
.tag.sel { z-index: 3; }
.bubble {
  position: absolute; left: 0; bottom: 30px; transform: translateX(-50%) translateY(6px) scale(.96);
  max-width: 220px; width: max-content; padding: 7px 11px; border-radius: 12px 12px 12px 3px;
  background: rgba(232, 247, 245, .96); color: #082026; font-size: 12px; font-weight: 600; line-height: 1.3;
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.bubble.on { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.bubble.call { background: rgba(255, 233, 184, .97); }
.tag.far .bubble { display: none; }

.rlabel { pointer-events: auto; cursor: pointer; }
.rlabel-in {
  transform: translate(-50%, -100%);
  padding: 8px 14px 9px; text-align: center; white-space: nowrap;
  border-top: 2px solid var(--acc); background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 16%, rgba(6, 20, 25, .82)), rgba(6, 20, 25, .82));
  border-radius: 0 0 10px 10px; transition: transform .2s;
}
.rlabel:hover .rlabel-in { transform: translate(-50%, -100%) scale(1.05); }
.rlabel b { display: block; font-family: var(--display); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; }
.rlabel span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.rlabel.empty .rlabel-in { border-top-style: dashed; opacity: .8; }
.rlabel.far span { display: none; }

/* ───────── Yuqori qism ───────── */
.top { position: fixed; top: var(--pad); left: var(--pad); right: var(--pad); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; pointer-events: none; z-index: 5; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 9px 18px 9px 12px; border-radius: 16px; }
.brand-text strong { display: block; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .14em; }
.brand-text span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.stats { display: flex; border-radius: 16px; padding: 8px 4px; }
.stat { padding: 2px 20px; text-align: center; border-right: 1px solid var(--line); min-width: 96px; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.c-chat { color: var(--chat); } .c-call { color: var(--call); } .c-idle { color: var(--idle); }

.top-right { display: flex; align-items: center; gap: 10px; }
.demo-badge { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; padding: 6px 10px; border: 1px dashed rgba(255, 194, 77, .55); color: var(--call); border-radius: 8px; background: rgba(255, 194, 77, .07); }
.clock { padding: 8px 14px; border-radius: 12px; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; }
.clock em { font-style: normal; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #2aa79b, var(--teal)); color: #042024; font-weight: 800; font-size: 13px;
  box-shadow: 0 8px 26px rgba(95, 227, 208, .28); transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(95, 227, 208, .4); }
.btn-primary svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* ───────── Chap menyu ───────── */
.dock { position: fixed; left: var(--pad); top: 50%; transform: translateY(-50%); width: var(--dock-w); padding: 8px; border-radius: 18px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.dock button, .view-ctl button { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); transition: color .15s, background .15s; }
.dock button:hover, .view-ctl button:hover { color: var(--ink); background: rgba(150, 235, 225, .08); }
.dock button.active, .view-ctl button.on { color: #042024; background: var(--teal); box-shadow: 0 0 22px rgba(95, 227, 208, .45); }
.dock-sep { height: 1px; margin: 4px 8px; background: var(--line); }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%) translateX(-4px);
  padding: 5px 10px; border-radius: 8px; background: rgba(6, 20, 25, .95); border: 1px solid var(--line);
  color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
[data-tip]:hover::after { opacity: 1; transform: translateY(-50%); }
.view-ctl [data-tip]::after { left: 50%; top: auto; bottom: calc(100% + 12px); transform: translateX(-50%) translateY(4px); }
.view-ctl [data-tip]:hover::after { transform: translateX(-50%); }

/* ───────── O'ng panel ───────── */
.panel { position: fixed; right: var(--pad); top: 92px; bottom: 96px; width: var(--panel-w); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; z-index: 5; }
.panel-grip { display: none; }
.panel-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tabs { display: flex; gap: 4px; padding: 10px 10px 0; }
.tabs button { flex: 1; padding: 9px 0; border-radius: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tabs button.active { background: rgba(150, 235, 225, .1); color: var(--ink); }
.list { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

.room-item { display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 12px 12px 12px 0; border-radius: 12px; border: 1px solid transparent; background: rgba(150, 235, 225, .035); transition: background .15s, border-color .15s; }
.room-item:hover { background: rgba(150, 235, 225, .08); border-color: var(--line); }
.room-item > i { width: 4px; height: 34px; border-radius: 0 4px 4px 0; background: var(--acc); box-shadow: 0 0 12px var(--acc); }
.room-item b { display: block; font-weight: 700; font-size: 13.5px; }
.room-item small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.room-item .count { font-family: var(--display); font-size: 15px; font-weight: 600; text-align: right; }
.room-item .count em { display: block; font-family: var(--mono); font-style: normal; font-weight: 400; font-size: 9px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.room-item.empty { border: 1px dashed var(--line-strong); background: none; }
.room-item.empty > i { background: none; box-shadow: none; }
.room-item.empty .count { color: var(--teal); font-size: 20px; }

.agent-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; text-align: left; transition: background .15s; }
.agent-item:hover { background: rgba(150, 235, 225, .08); }
.agent-item b { display: block; font-size: 13px; font-weight: 700; }
.agent-item small { display: block; font-size: 11px; color: var(--muted); }
.agent-item .st { margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--st); white-space: nowrap; }
.ava { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 12px; color: #062026;
  background: radial-gradient(circle at 30% 25%, #fff, var(--acc) 70%); box-shadow: 0 0 0 2px rgba(6, 20, 25, .9), 0 0 0 3.5px var(--st, var(--acc)); }
.group-title { padding: 10px 6px 2px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }

/* Xodim kartasi */
.card-head { position: relative; padding: 18px 18px 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--acc) 24%, transparent), transparent 70%); border-bottom: 1px solid var(--line); }
.card-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.card-back:hover { color: var(--ink); }
.card-back svg { width: 14px; height: 14px; }
.card-id { display: flex; align-items: center; gap: 14px; }
.card-id .ava { width: 56px; height: 56px; font-size: 19px; }
.card-id h3 { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .01em; }
.card-id p { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.card-status { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--st) 45%, transparent); background: color-mix(in srgb, var(--st) 10%, transparent); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--st); }
.card-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--st); animation: pulse 1.4s infinite; }
.card-body { overflow-y: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.field > label { display: block; margin-bottom: 7px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field .val { font-weight: 700; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 600; }
.chips.solid span { border-color: transparent; background: rgba(150, 235, 225, .09); }
.quote { padding: 11px 13px; border-left: 2px solid var(--acc); background: rgba(150, 235, 225, .05); border-radius: 0 10px 10px 0; font-size: 13px; line-height: 1.45; font-style: italic; min-height: 42px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kpis div { padding: 10px 6px; text-align: center; border-radius: 10px; background: rgba(150, 235, 225, .045); }
.kpis b { display: block; font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--faint); }
.kpis span { font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.note { font-size: 11px; color: var(--muted); margin-top: 6px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.actions button { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; text-align: left; transition: border-color .15s, background .15s; }
.actions button:hover { border-color: var(--acc); background: rgba(150, 235, 225, .06); }
.actions svg { width: 16px; height: 16px; flex: none; color: var(--acc); }

/* ───────── Pastki qism ───────── */
.command { position: fixed; left: 50%; bottom: var(--pad); transform: translateX(-50%); width: min(680px, calc(100vw - var(--panel-w) - var(--dock-w) - 220px)); min-width: 340px; display: flex; align-items: center; gap: 6px; padding: 7px 7px 7px 18px; border-radius: 999px; z-index: 5; transition: border-color .2s, box-shadow .2s; }
.command:focus-within { border-color: var(--teal); box-shadow: 0 18px 50px rgba(0, 0, 0, .38), 0 0 0 4px rgba(95, 227, 208, .12); }
.command-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: pulse 1.8s infinite; flex: none; }
.command input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 14px; padding: 8px 8px; }
.command input::placeholder { color: var(--faint); }
.command-mic, .command-send { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--muted); transition: color .15s, background .15s; }
.command-mic:hover { color: var(--ink); background: rgba(150, 235, 225, .08); }
.command-send { background: var(--teal); color: #042024; }
.command-send svg { stroke-width: 2.2; }

.view-ctl { position: fixed; left: var(--pad); bottom: var(--pad); display: flex; gap: 4px; padding: 6px; border-radius: 16px; z-index: 5; }
.hint { position: fixed; right: calc(var(--pad) + 6px); bottom: calc(var(--pad) + 18px); width: calc(var(--panel-w) - 12px); text-align: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--faint); transition: opacity .6s; pointer-events: none; z-index: 4; }
.hint.off { opacity: 0; }

/* ───────── Modal va toast ───────── */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(3, 9, 12, .6); backdrop-filter: blur(6px); animation: fade .2s; }
.modal-card { width: min(460px, 100%); padding: 28px; border-radius: 22px; border-color: var(--line-strong); animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.modal-tag { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--call); border: 1px dashed rgba(255, 194, 77, .5); padding: 4px 9px; border-radius: 7px; }
.modal-card h2 { margin: 16px 0 8px; font-family: var(--display); font-weight: 600; font-size: 22px; }
.modal-card p { color: #b6d3d4; line-height: 1.55; }
.modal-card ul { margin: 14px 0 22px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.modal-card li { padding-left: 20px; position: relative; color: var(--ink); font-size: 13.5px; line-height: 1.4; }
.modal-card li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--teal); transform: rotate(45deg); }

.toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 12px); padding: 11px 18px; border-radius: 12px; background: rgba(6, 20, 25, .96); border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 30; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ───────── Yuklanish ekrani ───────── */
#loader { position: fixed; inset: 0; z-index: 50; background: radial-gradient(ellipse at 50% 42%, #0b2a33 0, var(--bg) 62%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: opacity .9s ease, visibility .9s; }
#loader.done { opacity: 0; visibility: hidden; }
.loader-core { position: relative; width: 190px; height: 190px; display: grid; place-items: center; margin-bottom: 14px; }
.loader-logo { width: 104px; filter: drop-shadow(0 0 22px rgba(95, 227, 208, .7)); animation: breathe 2.4s ease-in-out infinite; }
.loader-rings i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--teal); border-right-color: rgba(95, 227, 208, .25); animation: spin 2.6s linear infinite; }
.loader-rings i:nth-child(2) { inset: 14px; animation-duration: 3.8s; animation-direction: reverse; border-top-color: var(--teal-2); }
.loader-rings i:nth-child(3) { inset: 28px; animation-duration: 5.2s; opacity: .5; }
.loader-word { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .32em; padding-left: .32em; }
.loader-sub { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 0 20px; }
.loader-bar { width: 220px; height: 2px; background: rgba(150, 235, 225, .12); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.loader-bar span { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--teal), transparent); animation: slide 1.3s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes breathe { 50% { transform: scale(1.06); filter: drop-shadow(0 0 34px rgba(95, 227, 208, .95)); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ───────── Planshet / telefon ───────── */
@media (max-width: 1180px) {
  .stats .stat { min-width: 0; padding: 2px 14px; }
  .demo-badge, .clock em { display: none; }
}
@media (max-width: 900px) {
  :root { --pad: 10px; }
  .top { flex-wrap: wrap; }
  .brand { padding: 7px 14px 7px 9px; }
  .brand-text span, .clock, .hint, [data-tip]::after { display: none; }
  .logo-mark { width: 30px; }
  .stats { order: 3; width: 100%; justify-content: space-between; padding: 6px 0; }
  .stat { flex: 1; padding: 0 4px; }
  .stat b { font-size: 16px; }
  .stat span { font-size: 8px; letter-spacing: .04em; }
  .btn-primary { padding: 9px 12px; }

  .dock { top: auto; bottom: var(--pad); left: var(--pad); right: var(--pad); transform: none; width: auto; flex-direction: row; justify-content: space-between; overflow-x: auto; padding: 6px; }
  .dock button { flex: none; }
  .dock-sep { width: 1px; height: auto; margin: 8px 2px; flex: none; }
  .command { bottom: 72px; width: calc(100vw - 2 * var(--pad)); min-width: 0; padding-left: 14px; }
  .command input { font-size: 16px; }
  .view-ctl { left: auto; right: var(--pad); bottom: auto; top: 128px; flex-direction: column; }
  .toast { bottom: 140px; }

  .panel { left: var(--pad); right: var(--pad); width: auto; top: auto; bottom: 134px; height: min(46vh, 440px); border-radius: 20px; transform: translateY(calc(100% + 150px)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); z-index: 8; }
  .panel.open { transform: none; }
  .panel-grip { display: grid; place-items: center; height: 22px; flex: none; }
  .panel-grip i { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); }
  .rlabel-in { padding: 5px 9px 6px; }
  .rlabel b { font-size: 10px; }
  .rlabel span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═════════ 2-bosqich: qavatlar, foydalanuvchi, formalar ═════════ */
.group-title { color: var(--acc, var(--muted)); }
.room-item b u { margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: var(--teal); color: #042024; font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; vertical-align: 2px; }
.tag.boss .tag-chip { border-color: rgba(245, 198, 107, .6); color: #ffe7b0; }

/* Lift */
.lift { position: fixed; left: calc(var(--pad) + var(--dock-w) + 10px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 6px; border-radius: 16px; z-index: 5; }
.lift > span { font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: var(--faint); margin-bottom: 4px; }
.lift button { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--muted); transition: color .15s, background .15s; }
.lift button:hover { color: var(--ink); background: rgba(150, 235, 225, .08); }
.lift button.active { color: #042024; background: var(--teal); box-shadow: 0 0 22px rgba(95, 227, 208, .45); }
.lift button[data-floor="3"].active { background: #f5c66b; box-shadow: 0 0 22px rgba(245, 198, 107, .5); }
.lift-all { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 11px 11px !important; }
.lift svg { width: 18px; height: 18px; }

/* Bino ko'rinishidagi qavat yorliqlari */
.flabel { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; will-change: transform; }
.flabel-in { transform: translate(-100%, -50%); margin-left: -14px; display: flex; align-items: center; gap: 11px; padding: 8px 14px 8px 8px; border-radius: 12px; background: rgba(6, 20, 25, .82); border: 1px solid var(--line-strong); white-space: nowrap; transition: border-color .2s, transform .2s; }
.flabel:hover .flabel-in { border-color: var(--teal); transform: translate(-100%, -50%) scale(1.04); }
.flabel b { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--teal); color: #042024; font-family: var(--display); font-size: 15px; }
.flabel strong { display: block; font-family: var(--display); font-weight: 600; font-size: 12.5px; letter-spacing: .03em; }
.flabel span { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* Foydalanuvchi */
.user { position: relative; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; text-align: left; }
.user-chip .ava { width: 32px; height: 32px; font-size: 13px; box-shadow: none; }
.user-text b { display: block; font-size: 13px; font-weight: 700; line-height: 1.15; }
.user-text em { display: block; font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.user-chip > svg { width: 14px; height: 14px; color: var(--muted); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; border-radius: 14px; z-index: 12; background: rgba(6, 20, 25, .96); }
.user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; text-align: left; }
.user-menu button:hover { background: rgba(150, 235, 225, .09); }
.user-menu svg { width: 17px; height: 17px; color: var(--muted); }

/* Ofis kartasi */
.ava.sq { border-radius: 14px; }
.access { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 9px; border: 1px dashed var(--line-strong); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.access svg { width: 14px; height: 14px; flex: none; }
.access.ok { border-style: solid; border-color: color-mix(in srgb, var(--teal) 50%, transparent); background: rgba(95, 227, 208, .08); color: var(--teal); }
.mini-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.actions.one { grid-template-columns: 1fr; }
.actions button:disabled { opacity: .45; cursor: default; }
.task { font-size: 13px; line-height: 1.5; color: #c7e2e2; white-space: pre-wrap; }
.dim { color: var(--muted); font-weight: 500; }
.kpis b.lit { color: var(--ink); }

/* Modal: keng variant, adminlar */
.modal-card { max-height: calc(100dvh - 40px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.modal-card.wide { width: min(560px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; }
.modal-head + p { margin-top: 10px; font-size: 13px; }
.admin-list { margin: 18px 0; display: flex; flex-direction: column; gap: 6px; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(150, 235, 225, .045); }
.admin-row.off { opacity: .55; }
.admin-info { flex: 1; min-width: 0; }
.admin-info b { display: block; font-size: 13.5px; }
.admin-info em { font-style: normal; font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--muted); }
.admin-info small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-ghost { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-strong); font-weight: 700; font-size: 13px; transition: background .15s, border-color .15s; }
.btn-ghost:hover { background: rgba(150, 235, 225, .08); border-color: var(--teal); }
.btn-ghost.sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn-danger { padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 120, 120, .4); color: #ff9c9c; font-weight: 700; font-size: 13px; }
.btn-danger:hover { background: rgba(255, 120, 120, .1); }
button:disabled { opacity: .55; cursor: default; }

/* Formalar */
#formModal .modal-card { width: min(520px, 100%); }
#formModal h2 { margin: 0 0 6px; }
#formHint { font-size: 13px; margin-bottom: 4px; }
.form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 18px; }
.ff { grid-column: 1 / -1; min-width: 0; }
.ff.half { grid-column: auto; }
.ff > label, .login-card label { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ff > label i { color: var(--call); font-style: normal; }
.ff input[type=text], .ff input[type=password], .ff textarea, .ff select, .login-card input {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line-strong); background: rgba(3, 12, 16, .55);
  color: var(--ink); font: inherit; font-size: 14px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.ff textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.ff select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.ff select option { background: #0a1f26; }
.ff input:focus, .ff textarea:focus, .ff select:focus, .login-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(95, 227, 208, .14); }
.ff input[readonly] { opacity: .6; }
.ff input::placeholder, .ff textarea::placeholder { color: var(--faint); }
.ff small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches label { cursor: pointer; }
.swatches input, .checks input { position: absolute; opacity: 0; pointer-events: none; }
.swatches span { display: block; width: 32px; height: 32px; border-radius: 10px; background: var(--c); border: 2px solid transparent; box-shadow: 0 0 0 0 var(--c); transition: box-shadow .15s, transform .15s; }
.swatches input:checked + span { border-color: #fff; box-shadow: 0 0 16px var(--c); transform: scale(1.08); }
.swatches input:focus-visible + span, .checks input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks span { display: block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.checks input:checked + span { background: var(--teal); border-color: var(--teal); color: #042024; }
.switch { grid-column: 1 / -1; display: flex; align-items: center; gap: 11px; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: rgba(150, 235, 225, .15); position: relative; flex: none; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(16px); background: #042024; }
.switch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.form-error { margin-top: 14px; padding: 10px 13px; border-radius: 10px; background: rgba(255, 110, 110, .1); border: 1px solid rgba(255, 110, 110, .35); color: #ffb1b1; font-size: 13px; font-weight: 600; }
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.form-actions span { flex: 1; }

/* ───────── Login sahifasi ───────── */
.login-wrap { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr minmax(360px, 440px); align-items: center; padding: 0 clamp(20px, 7vw, 120px); z-index: 5; pointer-events: none; }
.login-hero { align-self: end; padding-bottom: clamp(30px, 9vh, 90px); max-width: 520px; }
.login-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.12; letter-spacing: .01em; }
.login-hero h1 em { font-style: normal; color: var(--teal); }
.login-hero p { margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.login-card { pointer-events: auto; padding: 34px 32px 30px; border-radius: 24px; border-color: var(--line-strong); animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.login-brand .logo-mark { width: 46px; }
.login-brand strong { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .14em; }
.login-brand span { display: block; margin-top: 3px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.login-card h2 { font-family: var(--display); font-weight: 600; font-size: 21px; margin-bottom: 6px; }
.login-card > p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-card .lf { margin-bottom: 14px; }
.login-card input { padding: 13px 14px; font-size: 15px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 14px; font-size: 14px; margin-top: 8px; }
.login-foot { margin-top: 20px; text-align: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* ───────── Kichik ekranlar ───────── */
@media (max-width: 1180px) {
  .user-text, .user-chip > svg { display: none; }
  .user-chip { padding: 5px; }
}
@media (max-width: 900px) {
  .lift { left: var(--pad); top: 128px; transform: none; flex-direction: row; padding: 5px; }
  .lift > span { display: none; }
  .lift button { width: 38px; height: 38px; }
  .lift-all { margin: 0 0 0 4px; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 11px 11px 0 !important; }
  .flabel-in { padding: 5px 9px 5px 5px; margin-left: -6px; }
  .flabel span { display: none; }
  .form-fields { grid-template-columns: 1fr; }
  .ff.half { grid-column: 1 / -1; }
  .ff input[type=text], .ff input[type=password], .ff textarea, .ff select, .login-card input { font-size: 16px; }
  .modal-card { padding: 22px 18px; }
  .form-actions { flex-wrap: wrap; }
  .login-wrap { grid-template-columns: 1fr; align-items: end; padding: 16px; }
  .login-hero { display: none; }
  .login-card { padding: 26px 20px 22px; margin-bottom: max(8px, env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top-right { gap: 8px; }
  #btnNewOffice span { display: none; }
  #btnNewOffice { padding: 11px; }
  .user-menu { position: fixed; right: var(--pad); top: 62px; }
}

/* 3-bosqich: Damu CRM, haqiqiy xodimlar, yopiq ofislar */
.tag.human .tag-chip i { background: #fff; box-shadow: 0 0 8px #fff; }
.agent-item b u.hu, .room-item b u.hu { margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; vertical-align: 1px; }
.room-item.locked { opacity: .55; }
.note.warn { color: var(--call); }
.val .dim { font-size: 12.5px; }
