/* =====================================================================
   Global Messenger — veb-klient (Desktop dizayni bilan bir xil).
   Ranglar FAQAT tokens.css dagi o'zgaruvchilardan (WEB_CLIENT_SPEC 3-bo'lim).
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--BG_MAIN);
  color: var(--TEXT_PRIMARY);
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif,
               "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji";
  font-size: var(--fs, 14px);
  line-height: 1.35;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--LINK_COLOR); }
.hidden { display: none !important; }
.emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }

/* ---------- scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--SCROLL_HANDLE) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--SCROLL_HANDLE); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--SCROLL_HANDLE_HOVER); background-clip: padding-box; }

/* ---------- ikonkalar (img/*.svg, mavzu rangiga bo'yaladi) ---------- */
.ic {
  display: inline-block; flex: none;
  width: 18px; height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat;
          mask: var(--ic) center / contain no-repeat;
}
.ic.sm { width: 14px; height: 14px; }
.ic.lg { width: 22px; height: 22px; }
.ic.xl { width: 28px; height: 28px; }
.ic.danger { color: var(--COLOR_DANGER); }

/* ---------- ilova tuzilishi ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.titlebar {
  height: 36px; flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; background: var(--BG_TITLEBAR); color: var(--TITLE_TEXT);
  border-bottom: 1px solid var(--BORDER); user-select: none;
}
.titlebar .logo { width: 20px; height: 20px; }
.titlebar .brand { font-weight: 700; font-size: 16px; letter-spacing: .1px; }
.titlebar .conn { margin: 0 auto; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--TEXT_SECONDARY); }
.titlebar .conn .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--COLOR_DANGER); box-shadow: 0 0 0 2px rgba(0,0,0,.15); }
.titlebar .conn.on .dot { background: var(--COLOR_GREEN); }
.titlebar .conn.on { color: var(--TITLE_TEXT); }
.titlebar .tb-btn { width: 30px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--ICON_COLOR); }
.titlebar .tb-btn:hover { background: var(--WIN_BTN_HOVER); }
.titlebar .tb-dl { height: 28px; padding: 0 10px; margin-right: 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #fff; background: var(--COLOR_ACCENT); }
.titlebar .tb-dl:hover { filter: brightness(1.1); }
@media (max-width: 640px) { .titlebar .tb-dl span { display: none; } .titlebar .tb-dl { padding: 0 7px; } }

.main { flex: 1; min-height: 0; display: flex; }
.sidebar {
  width: 44px; flex: none; background: var(--BG_TITLEBAR); display: flex; flex-direction: column;
  align-items: center; gap: 6px; padding-top: 10px; border-right: 1px solid var(--BORDER);
}
.side-btn {
  position: relative; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ICON_COLOR); opacity: .85;
}
.side-btn:hover { background: var(--BG_HOVER); opacity: 1; }
.side-btn.on { background: var(--NAVY_SIDE_CHECKED); opacity: 1; color: var(--ICON_ACCENT); }
.side-btn .badge { position: absolute; top: -4px; right: -6px; }

.listcol {
  width: var(--list-w, 320px); min-width: 260px; flex: none; display: flex; flex-direction: column;
  background: var(--BG_CHATBAR); border-right: 1px solid var(--BORDER);
}
.resizer { width: 5px; margin-left: -3px; flex: none; cursor: col-resize; z-index: 5; }
.resizer:hover, .resizer.drag { background: var(--NAVY_SOFT); }
.chatpane { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--BG_MAIN); position: relative; }

/* ---------- qidiruv paneli ---------- */
.searchbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; }
.icon-btn {
  width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center; color: var(--ICON_COLOR);
}
.icon-btn:hover { background: var(--BG_HOVER); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.search-field {
  flex: 1; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: var(--SEARCH_FIELD_BG); border: 1px solid transparent; border-radius: 18px; color: var(--TEXT_SECONDARY);
}
.search-field:hover { border-color: var(--BORDER_STRONG); }
.search-field:focus-within { background: var(--SEARCH_FIELD_FOCUS_BG); border-color: var(--NAVY_FOCUS); }
.search-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--TEXT_PRIMARY); }
.search-field input::placeholder { color: var(--TEXT_MUTED); }
.search-field .clear { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.search-field .clear:hover { background: var(--BTNS_BG_HOVER); }

/* ---------- chatlar ro'yxati ---------- */
.chatlist { flex: 1; overflow-y: auto; padding: 2px 8px 8px; }
.chatrow {
  position: relative; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 10px 0 8px;
  border-radius: 10px; margin-bottom: 2px; cursor: pointer; user-select: none;
}
.chatrow:hover { background: var(--DIALOG_ROW_HOVER); }
.chatrow.sel { background: linear-gradient(90deg, var(--NAVY_SEL_A), var(--NAVY_SEL_B)); }
.chatrow.sel::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--NAVY_SEL_EDGE); }
.chatrow.drop { outline: 2px dashed var(--COLOR_ACCENT); }
.chatrow .cr-body { flex: 1; min-width: 0; }
.cr-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cr-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--TEXT_PRIMARY); }
.cr-name .ic { vertical-align: -3px; margin-right: 4px; color: var(--TEXT_SECONDARY); }
.cr-time { flex: none; font-size: 11px; color: var(--TEXT_SECONDARY); }
.cr-prev { flex: 1; min-width: 0; margin-top: 3px; font-size: 12.5px; color: var(--TEXT_SECONDARY); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-prev.typing { color: var(--COLOR_ACCENT); }
.cr-prev .me { color: var(--TEXT_PRIMARY2); }
.chatrow.sel .cr-name { color: var(--NAVY_SEL_NAME); }
.chatrow.sel .cr-prev, .chatrow.sel .cr-time { color: var(--NAVY_SEL_SUB); }
.tick { flex: none; color: var(--TICK_SENT); }
.tick.read { color: var(--TICK_READ); }
.chatrow.sel .tick { color: var(--TICK_SENT_SEL); }
.chatrow.sel .tick.read { color: var(--TICK_READ_SEL); }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--NAVY_BADGE_A), var(--NAVY_BADGE_B)); color: var(--NAVY_BADGE_FG);
  font-size: 11.5px; font-weight: 700; flex: none;
}
.badge.muted { background: var(--BADGE_MUTED); }
.chatrow.sel .badge { background: var(--NAVY_SEL_BADGE); }
.cr-flags { display: flex; align-items: center; gap: 4px; margin-top: 3px; color: var(--TEXT_MUTED); }
.empty-list { padding: 40px 20px; text-align: center; color: var(--TEXT_SECONDARY); font-size: 13px; }

/* ---------- avatar ---------- */
.av {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .3px;
  box-shadow: 0 0 0 2px var(--COLOR_GREEN);
}
/* Rasm doim aylana ichini to'liq, proporsiyasini buzmasdan qoplaydi (xodim rasmlari portret 3:4 —
   ilgari grid ichida height:100% ishlamay, rasm cho'zilib oval bo'lib qolardi) */
.av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 25%; }
.av.noring { box-shadow: none; }
.av .st { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: var(--TEXT_MUTED); border: 2px solid var(--BG_CHATBAR); }
.av .st.on { background: var(--COLOR_GREEN); }
.av.s22 { width: 22px; height: 22px; font-size: 9px; box-shadow: 0 0 0 2px var(--MENU_BG); }
.av.s32 { width: 32px; height: 32px; font-size: 12px; }
.av.s36 { width: 36px; height: 36px; font-size: 13px; }
.av.s72 { width: 72px; height: 72px; font-size: 26px; }
.av.s100 { width: 100px; height: 100px; font-size: 34px; }
.av.s120 { width: 120px; height: 120px; font-size: 40px; }

/* ---------- qidiruv natijalari ---------- */
.search-res { flex: 1; overflow-y: auto; padding: 4px 8px; }
.sr-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px; color: var(--TEXT_SECONDARY); gap: 8px; }
.sr-empty .circle { width: 72px; height: 72px; border-radius: 50%; background: var(--DIALOG_ROW_BG); display: grid; place-items: center; color: var(--TEXT_SECONDARY); margin-bottom: 6px; }
.sr-empty b { color: var(--TEXT_PRIMARY); font-size: 15px; }
.sr-head { display: flex; align-items: center; gap: 8px; padding: 10px 6px 6px; font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--COLOR_ACCENT); }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--BTNS_BG); color: var(--TEXT_SECONDARY); border: 1px solid var(--BTNS_BORDER); }
.pill.acc { background: var(--NAVY_SOFT); color: var(--COLOR_ACCENT); border-color: transparent; }
.pill.owner { color: var(--OWNER_COLOR); }
.urow { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.urow:hover { background: var(--DIALOG_ROW_HOVER); }
.urow .u-body { flex: 1; min-width: 0; }
.urow .u-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .u-sub { font-size: 12px; color: var(--TEXT_SECONDARY); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.urow .u-sub.on { color: var(--COLOR_ACCENT); }

/* ---------- chat paneli ---------- */
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--TEXT_MUTED); }
.chat-empty .pill { height: 30px; padding: 0 16px; border-radius: 15px; font-size: 13px; background: var(--DATE_CHIP_BG); border-color: var(--DATE_CHIP_BORDER); color: var(--DATE_CHIP_TEXT); }
.chat-head {
  flex: none; margin: 8px 8px 0; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  background: var(--BG_CHATBAR); border: 1px solid var(--BORDER); border-radius: 12px; z-index: 3;
}
.chat-head .back { display: none; }
.ch-info { flex: 1; min-width: 0; cursor: pointer; }
.ch-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub { font-size: 12.5px; color: var(--TEXT_SECONDARY); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub.on, .ch-sub.typing { color: var(--COLOR_ACCENT); }
.ch-actions { display: flex; gap: 2px; }
.gcall-bar {
  flex: none; margin: 6px 8px 0; display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  border: 1px solid var(--GROUP_CALL_BORDER); border-radius: 10px; background: var(--NAVY_SOFT); color: var(--GROUP_CALL_TEXT); font-size: 13px;
}
.gcall-bar .grow { flex: 1; }
.player-bar {
  flex: none; margin: 6px 8px 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px; position: relative;
  border: 1px solid var(--BORDER); border-radius: 10px; background: var(--BG_CHATBAR); font-size: 12.5px; overflow: hidden;
}
.player-bar .pb-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .pb-prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--COLOR_ACCENT); }

.msgs-wrap { flex: 1; min-height: 0; position: relative; }
.msgs { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 10px 20px 12px; overscroll-behavior: contain; }
/* Xabarlar chat chetlariga yopishadi (20px oraliq), keng ekranda o'rtaga yig'ilmaydi */
.msgs-inner { display: flex; flex-direction: column; }
.msgs.scrolling .row .react-btn, .msgs.scrolling .row:hover .react-btn { display: none !important; }
.loader-top { text-align: center; padding: 8px; color: var(--TEXT_MUTED); font-size: 12px; }
.to-bottom {
  position: absolute; right: 18px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--BG_CHATBAR); border: 1px solid var(--BORDER_STRONG); color: var(--ICON_COLOR); box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 4;
}
.to-bottom .badge { position: absolute; top: -8px; right: -4px; }

.day-sep { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 8px; user-select: none; }
.day-sep::before, .day-sep::after { content: ""; flex: 0 1 220px; height: 1px; }
.day-sep::before { background: linear-gradient(90deg, transparent, var(--DATE_LINE)); }
.day-sep::after { background: linear-gradient(270deg, transparent, var(--DATE_LINE)); }
.day-sep span { padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--DATE_CHIP_BG); border: 1px solid var(--DATE_CHIP_BORDER); color: var(--DATE_CHIP_TEXT); }
.service { align-self: center; margin: 6px 0; max-width: 80%; text-align: center; padding: 4px 12px; border-radius: 12px; font-size: 12.5px; background: var(--SERVICE_BG); border: 1px solid var(--SERVICE_BORDER); color: var(--SERVICE_TEXT); }

/* ---------- xabar qatori ---------- */
.row { position: relative; display: flex; align-items: flex-end; gap: 6px; margin-top: 2px; }
.row.gap { margin-top: 8px; }
.row.mine { justify-content: flex-end; }
/* guruhda boshqalarning xabari yonida yuboruvchi rasmi (ketma-ketlikning birinchisida, tepada); bosilsa — profil */
.row .msg-av { width: 36px; flex: none; align-self: flex-start; }
.row .msg-av .av { cursor: pointer; }
.row.flash .bubble { animation: flash .45s ease-in-out 2; }
@keyframes flash { 50% { filter: brightness(1.45); } }
.row.selmode { cursor: pointer; }
.row .selbox { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--BORDER_STRONG); flex: none; align-self: center; display: grid; place-items: center; }
.row.selected .selbox { background: var(--COLOR_ACCENT); border-color: var(--COLOR_ACCENT); color: var(--ON_ACCENT); }
.row.selected .bubble { outline: 2px solid var(--COLOR_ACCENT); outline-offset: 1px; }
.react-btn {
  display: none; width: 30px; height: 30px; border-radius: 50%; align-self: center; place-items: center; flex: none;
  background: var(--REACTION_BG); font-size: 16px; line-height: 1;
}
.react-btn:hover { background: var(--REACTION_BG_HOVER); }
.row:hover .react-btn { display: grid; }
.row.mine .react-btn { order: -1; }

.bubble {
  position: relative; max-width: min(480px, 75%); min-width: 60px; padding: 6px 10px 5px; border-radius: 12px;
  background: var(--MSG_BG); color: var(--TEXT_COLOR); word-wrap: break-word; overflow-wrap: anywhere;
}
.row.mine .bubble { background: var(--MINE_MSG_BG); }
.row.tail .bubble { border-bottom-left-radius: 4px; }
.row.mine.tail .bubble { border-bottom-left-radius: 12px; border-bottom-right-radius: 4px; }
.bubble.wide { max-width: min(420px, 82%); }
.bubble.media { padding: 3px; }
.bubble .sender { font-weight: 700; font-size: 13px; margin-bottom: 2px; cursor: pointer; }
.bubble .text { white-space: pre-wrap; user-select: text; }
.bubble .text a { color: var(--LINK_COLOR); }
.bubble.media .sender, .bubble.media .fwd { padding: 3px 7px 2px; }
.bubble.media .caption { padding: 5px 7px 2px; }
.meta { float: right; display: inline-flex; align-items: center; gap: 4px; margin: 6px 0 -2px 10px; font-size: 11px; color: var(--BUBBLE_TIME); white-space: nowrap; user-select: none; position: relative; top: 3px; }
.row.mine .meta { color: var(--BUBBLE_TIME_MINE); }
.meta .tk { color: var(--BUBBLE_TICK_SENT); }
.meta .tk.read { color: var(--BUBBLE_TICK_READ); }
.meta .edited { font-style: italic; }
.meta.over { position: absolute; right: 8px; bottom: 8px; float: none; margin: 0; top: auto; padding: 2px 7px; border-radius: 10px; background: rgba(0,0,0,.45); color: #fff; }
.meta.over .tk { color: var(--BUBBLE_TICK_SENT_MEDIA); }
.meta.over .tk.read { color: var(--BUBBLE_TICK_READ_MEDIA); }
.meta .fail { color: var(--COLOR_DANGER); font-weight: 700; }
.clear { clear: both; }
.pending-note { font-size: 11.5px; margin-top: 3px; color: var(--BUBBLE_TIME_MINE); }
.pending-note.err { color: #ffb3a7; }
.pending-note button { text-decoration: underline; margin-left: 6px; }

.fwd { font-size: 12.5px; margin-bottom: 3px; color: var(--FWD_CAPTION); }
.row.mine .fwd { color: var(--FWD_CAPTION_MINE); }
.fwd b { display: block; color: var(--COLOR_ACCENT); cursor: pointer; }
.row.mine .fwd b { color: var(--FWD_NAME_MINE); }
.fwd b.nolink { cursor: default; }
.reply-q { display: flex; gap: 8px; margin: 2px 0 5px; padding: 4px 8px 4px 0; border-radius: 6px; background: var(--REPLY_BG_OTHER); cursor: pointer; overflow: hidden; }
.row.mine .reply-q { background: var(--REPLY_BG_MINE); }
.reply-q::before { content: ""; flex: none; width: 3px; background: var(--REPLY_ACCENT_OTHER); }
.row.mine .reply-q::before { background: var(--REPLY_ACCENT_MINE); }
.reply-q .rq-body { min-width: 0; font-size: 12.5px; }
.reply-q .rq-name { font-weight: 700; color: var(--REPLY_ACCENT_OTHER); }
.row.mine .reply-q .rq-name { color: var(--REPLY_ACCENT_MINE); }
.reply-q .rq-text { color: var(--REPLY_TEXT); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-q img { width: 34px; height: 34px; border-radius: 4px; object-fit: cover; margin-left: auto; }

.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.reaction {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px;
  background: var(--REACTION_BG); border: 1px solid transparent; font-size: 12.5px;
}
.reaction:hover { background: var(--REACTION_BG_HOVER); }
.reaction.mine { background: var(--MINE_REACTION_BG); border-color: var(--REACTION_MINE_BORDER); }
.reaction .emoji { font-size: 14px; }

/* rasm / video */
.media-box { position: relative; border-radius: 10px; overflow: hidden; background: var(--IMAGE_PLACEHOLDER_BG); cursor: pointer; display: block; }
.media-box img, .media-box video { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-box .chip { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.45); color: #fff; font-size: 11.5px; }
.media-box .play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; color: #fff; }
/* Dumaloq video xabar (file_kind=video_note) — fonsiz doira */
.bubble.vnote, .row.mine .bubble.vnote { background: transparent !important; box-shadow: none; padding: 0; }
.media-box.vnote { width: 240px; height: 240px; max-width: 70vw; max-height: 70vw; border-radius: 50%; }
.media-box.vnote { overflow: visible; }
.media-box.vnote > img, .media-box.vnote > video, .media-box.vnote > .media-missing { border-radius: 50%; overflow: hidden; }
/* vaqt belgisi videodan tashqarida — chap pastki burchakda (doira chetidan tashqari) */
.media-box.vnote .chip { left: 0; top: auto; bottom: 0; transform: none; }
/* ijroda: doira +56 px kattalashadi, chetida progress halqasi (Desktop VideoNoteBubble) */
.media-box.vnote { transition: width .18s ease, height .18s ease; }
.media-box.vnote.playing { width: 296px; height: 296px; background: transparent; }
/* halqa videoni to'smaydi: video ichkariga 6 px suriladi, halqa tashqi chetda */
.media-box.vnote.playing > img, .media-box.vnote.playing > video { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 50%; }
.media-box.vnote .vn-play-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; display: none; }
.media-box.vnote.playing .vn-play-ring { display: block; }
.vn-play-ring circle { fill: none; stroke: #fff; stroke-width: .95; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; opacity: .9; }
/* dumaloq video yozish: chat markazida 260 px doira (ko'zgu), atrof xira, qizil progress halqasi */
.vn-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.43); z-index: 900; }
body.vn-recording .composer-wrap { position: relative; z-index: 901; }
.vn-preview { position: fixed; width: 260px; height: 260px; border-radius: 50%; z-index: 902; pointer-events: none; }
.vn-preview video { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); border-radius: 50%; object-fit: cover; transform: scaleX(-1); background: #000; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.vn-preview .vn-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.vn-ring-bg { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 4; }
.vn-ring-fg { fill: none; stroke: #e5484d; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
/* bosib turib yozish: chapga surish — bekor, tepaga — qulf */
.composer .rec-slide { flex: 1; text-align: center; color: var(--TEXT_SECONDARY); font-size: 13px; white-space: nowrap; overflow: hidden; }
.composer .rec-lock { display: flex; flex-direction: column; align-items: center; color: var(--TEXT_SECONDARY); font-size: 11px; line-height: 1; opacity: .8; }
.composer .mic-btn.holding { background: var(--COLOR_ACCENT); color: var(--ON_ACCENT); border-radius: 50%; transform: scale(1.15); }
.composer .mic-btn.video .ic, .composer .mic-btn.holding .ic { opacity: 1; }
.media-box .spin { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.media-missing { padding: 26px 16px; text-align: center; font-size: 12.5px; color: var(--TEXT_SECONDARY); }
.row.mine .bubble.media { background: var(--MINE_MSG_BG); }

/* fayl karta */
.filecard { display: flex; align-items: center; gap: 10px; padding: 6px; margin: 2px 0; border-radius: 10px; background: var(--FILE_CARD_BG); cursor: pointer; min-width: 220px; }
.filecard:hover { background: var(--FILE_CARD_HOVER); }
.row.mine .filecard { background: var(--FILE_CARD_MINE_BG); }
.row.mine .filecard:hover { background: var(--FILE_CARD_MINE_HOVER); }
.fc-icon { position: relative; width: 46px; height: 46px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.fc-icon svg { position: absolute; inset: 0; }
.fc-body { min-width: 0; flex: 1; }
.fc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-sub { font-size: 11.5px; color: var(--BUBBLE_TIME); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.mine .fc-sub { color: var(--BUBBLE_TIME_MINE); }
.fc-sub.err { color: var(--MISSED_CALL_COLOR); }

/* joylashuv karta (location.js) — xarita plitkasi yo'q (ichki tarmoq), bosilganda ilova tanlanadi */
.loccard { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 2px 0; border-radius: 10px; background: var(--FILE_CARD_BG); cursor: pointer; min-width: 230px; }
.loccard:hover { background: var(--FILE_CARD_HOVER); }
.row.mine .loccard { background: var(--FILE_CARD_MINE_BG); }
.row.mine .loccard:hover { background: var(--FILE_CARD_MINE_HOVER); }
.loc-pin { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #e53935; color: #fff; }
.loc-pin .ic { width: 24px; height: 24px; }
.loc-body { min-width: 0; flex: 1; }
.loc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-coords { font-size: 11.5px; color: var(--BUBBLE_TIME); margin-top: 2px; font-variant-numeric: tabular-nums; }
.row.mine .loc-coords { color: var(--BUBBLE_TIME_MINE); }
.loc-open { font-size: 12.5px; margin-top: 3px; color: var(--LINK_COLOR, #3390ec); font-weight: 600; }

/* ovozli */
.voice { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 2px 0; }
.voice .vbtn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--COLOR_ACCENT); color: #fff; flex: none; }
.row.mine .voice .vbtn { background: var(--VOICE_BTN_MINE_BG); }
.row.mine .voice .vbtn:hover { background: var(--VOICE_BTN_MINE_HOVER); }
.voice .wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; }
.voice .wave i { flex: 1; min-width: 2px; max-width: 3px; border-radius: 2px; background: var(--WAVE_PENDING_OTHER); }
.voice .wave i.p { background: var(--WAVE_OTHER); }
.row.mine .voice .wave i { background: var(--WAVE_PENDING_MINE); }
.row.mine .voice .wave i.p { background: var(--WAVE_MINE); }
.voice .vsub { font-size: 11.5px; color: var(--BUBBLE_TIME); margin-top: 2px; }
.row.mine .voice .vsub { color: var(--BUBBLE_TIME_MINE); }

/* qo'ng'iroq bubble */
.callmsg { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.callmsg .ci { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--CALL_ICON_BG); color: #fff; flex: none; }
.callmsg .ci.missed { background: var(--COLOR_DANGER); }
.callmsg .cb { flex: 1; min-width: 0; }
.callmsg .ct { font-weight: 600; }
.callmsg .cs { font-size: 12px; color: var(--TEXT_SECONDARY); margin-top: 2px; }
.row.mine .callmsg .cs { color: var(--CALL_SUB_MINE); }
.callmsg .cs.missed { color: var(--MISSED_CALL_COLOR); }
.callmsg .recall { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--CALL_BACK_ICON); }
.callmsg .recall:hover { background: var(--REACTION_BG_HOVER); }
.row.mine .callmsg .recall { background: var(--CALL_BACK_BG_MINE); color: var(--CALL_BACK_ICON_MINE); }
.row.mine .callmsg .recall:hover { background: var(--CALL_BACK_BG_MINE_HOVER); }
.bubble.deleted { background: transparent !important; border: 1px dashed var(--DELETED_BORDER); color: var(--TEXT_SECONDARY); font-style: italic; }
.row.mine .bubble.deleted { border-color: var(--DELETED_MINE_BORDER); }

/* ---------- yozish maydoni ---------- */
.composer-wrap { flex: none; padding: 6px 8px 8px; }
.composer-panel {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 6px 8px 6px 10px; border-radius: 10px;
  background: var(--BG_CHATBAR); border: 1px solid var(--BORDER);
}
.composer-panel::before { content: ""; align-self: stretch; width: 3px; border-radius: 2px; background: var(--COMPOSER_ACCENT); }
.composer-panel.edit::before { background: var(--EDIT_ACCENT); }
.composer-panel.edit { background: var(--EDIT_SOFT); }
.composer-panel .cp-body { flex: 1; min-width: 0; font-size: 12.5px; }
.composer-panel .cp-title { font-weight: 700; color: var(--COMPOSER_ACCENT); }
.composer-panel.edit .cp-title { color: var(--EDIT_ACCENT); }
.composer-panel .cp-text { color: var(--TEXT_SECONDARY); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-panel .close { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--TEXT_SECONDARY); }
.composer-panel .close:hover { background: var(--COMPOSER_CLOSE_HOVER); color: var(--COLOR_DANGER); }
.composer {
  display: flex; align-items: flex-end; gap: 6px; padding: 4px 6px; border-radius: 12px;
  background: var(--BG_CHATBAR); border: 1px solid var(--BORDER);
}
.composer textarea {
  flex: 1; min-height: 38px; max-height: 110px; resize: none; padding: 9px 6px; border: 0; outline: 0; background: none;
  color: var(--TEXT_PRIMARY); line-height: 20px; border-radius: 8px;
}
.composer textarea::placeholder { color: var(--TEXT_MUTED); }
.send-btn { width: 34px; height: 34px; border-radius: 17px; border: 0; display: grid; place-items: center; flex: none; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, var(--NAVY_BADGE_A), var(--NAVY_BADGE_B)); }
.send-btn:hover { background: linear-gradient(180deg, #3b64d8, var(--NAVY_BADGE_A)); }
.send-btn:active { background: var(--NAVY_BADGE_B); }
.composer .icon-btn { width: 38px; height: 38px; margin-bottom: 1px; }
.rec { flex: 1; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 6px; color: var(--TEXT_SECONDARY); }
.rec .rdot { width: 10px; height: 10px; border-radius: 50%; background: var(--COLOR_DANGER); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.blocked-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--BG_CHATBAR); border: 1px solid var(--BORDER); color: var(--TEXT_SECONDARY); font-size: 13px; }
.blocked-bar .ic { color: var(--COLOR_DANGER); }
.blocked-bar .grow { flex: 1; }
.btn-danger-outline { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--COLOR_DANGER); color: var(--COLOR_DANGER); font-weight: 600; }
.btn-danger-outline:hover { background: rgba(214,69,69,.1); }
.readonly-bar { text-align: center; padding: 12px; color: var(--TEXT_MUTED); font-size: 13px; }
.selbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--SELECTION_BAR_BG); border: 1px solid var(--SELECTION_BORDER); color: var(--SELECTION_TEXT); }
.selbar .grow { flex: 1; font-weight: 600; }
.drop-layer { position: absolute; inset: 8px; border-radius: 14px; border: 2px dashed var(--COLOR_ACCENT); background: var(--DROP_BG); display: grid; place-items: center; z-index: 20; font-size: 16px; font-weight: 600; color: var(--TEXT_PRIMARY); pointer-events: none; }

/* ---------- menyu ---------- */
.menu {
  position: fixed; z-index: 1000; min-width: 170px; max-width: 320px; padding: 6px; border-radius: 10px;
  background: var(--MENU_BG); border: 1px solid var(--MENU_BORDER); box-shadow: 0 4px 24px rgba(0,0,0,.35); color: var(--TEXT_PRIMARY);
  user-select: none; animation: pop .09s ease-out;
}
[data-theme="light"] .menu { box-shadow: 0 4px 24px rgba(15,23,42,.15); }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 18px 7px 12px; border-radius: 6px; text-align: left; font-size: 13.5px; white-space: nowrap; }
.mi:hover, .mi.hot { background: var(--MENU_HOVER); color: #fff; }
.mi .ic { width: 16px; height: 16px; }
.mi.danger .ic { color: var(--COLOR_DANGER); }
.mi.danger:hover .ic { color: #fff; }
.mi:disabled { opacity: .45; }
.msep { height: 1px; margin: 5px 4px; background: var(--MENU_BORDER); }
.readers-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 6px; cursor: pointer; }
.readers-row:hover { background: var(--MENU_HOVER); color: #fff; }
.readers-row .rr-text { flex: 1; min-width: 0; font-size: 13px; }
.readers-row .rr-sub { font-size: 11.5px; color: var(--TEXT_SECONDARY); }
.readers-row:hover .rr-sub { color: rgba(255,255,255,.8); }
.readers-row .stack { display: flex; }
.readers-row .stack .av { margin-left: -7px; }
.readers-row .stack .av:first-child { margin-left: 0; }
.react-pop {
  position: fixed; z-index: 1001; width: 272px; max-height: 243px; overflow-y: auto; padding: 6px; border-radius: 12px;
  background: var(--MENU_BG); border: 1px solid var(--MENU_BORDER); box-shadow: 0 4px 24px rgba(0,0,0,.35);
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
}
.react-pop button { height: 40px; border-radius: 8px; font-size: 22px; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.react-pop button:hover { background: var(--REACTION_PICK_HOVER_SOLID); }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: rgba(0,0,0,.35); padding: 16px; }
.overlay.blur { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dialog {
  width: 440px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--DIALOG_BG); border: 1px solid var(--BORDER); border-radius: 14px; box-shadow: 0 4px 24px rgba(0,0,0,.35);
  color: var(--TEXT_PRIMARY); animation: pop .12s ease-out;
}
[data-theme="light"] .dialog { box-shadow: 0 4px 24px rgba(15,23,42,.15); }
.dialog.w520 { width: 520px; height: min(800px, calc(100vh - 32px)); }
.dialog.w820 { width: 820px; height: min(620px, calc(100vh - 32px)); }
.dlg-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--BORDER); }
.dlg-head .title { flex: 1; font-weight: 700; font-size: 16px; }
.dlg-head .x { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--TEXT_SECONDARY); }
.dlg-head .x:hover { background: var(--BTNS_BG_HOVER); color: var(--CLOSE_BTN_HOVER); }
.dlg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.dlg-foot { flex: none; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px 14px; }
.dlg-foot .left { margin-right: auto; }
.btn { height: 36px; padding: 0 16px; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn.acc { background: var(--COLOR_ACCENT); color: var(--ON_ACCENT); }
.btn.acc:hover { filter: brightness(1.1); }
.btn.gray { background: var(--BTNS_BG); border: 1px solid var(--BTNS_BORDER); color: var(--TEXT_PRIMARY); }
.btn.gray:hover { background: var(--BTNS_BG_HOVER); border-color: var(--BTNS_BORDER_HOVER); }
.btn.danger { background: var(--COLOR_DANGER); color: #fff; }
.btn.danger:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.block { width: 100%; }
.field { margin-bottom: 12px; }
.field label, .flabel { display: block; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--COLOR_ACCENT); margin: 0 0 6px 2px; }
.inp {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--FIELD_BORDER);
  background: var(--INPUT_BG); color: var(--INPUT_COLOR); outline: 0;
}
textarea.inp { height: 84px; padding: 9px 12px; resize: none; }
.inp:focus { border-color: var(--NAVY_FOCUS); }
.inp::placeholder { color: var(--TEXT_MUTED); }
.counter { text-align: right; font-size: 11px; color: var(--TEXT_MUTED); margin-top: 3px; }
.err-text { color: var(--COLOR_DANGER); font-size: 12.5px; margin-top: 6px; min-height: 16px; }
.hint { font-size: 12px; color: var(--TEXT_SECONDARY); }
.card { background: var(--DIALOG_ROW_BG); border-radius: 12px; padding: 12px; }
.card + .card { margin-top: 10px; }
.card-title { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--COLOR_ACCENT); margin: 14px 2px 6px; }
.card-title:first-child { margin-top: 0; }
.kv { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--BORDER); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv .k { width: 130px; flex: none; color: var(--TEXT_SECONDARY); }
.kv .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.confirm-row { display: flex; gap: 14px; align-items: flex-start; }
.confirm-row .qicon { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--NAVY_SOFT); color: var(--COLOR_ACCENT); font-weight: 800; font-size: 20px; }
.confirm-row .qicon.danger { background: rgba(214,69,69,.14); color: var(--COLOR_DANGER); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; cursor: pointer; user-select: none; font-size: 13.5px; }
.check input { display: none; }
.check .box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--BORDER_STRONG); display: grid; place-items: center; flex: none; }
.check input:checked + .box { background: var(--COLOR_ACCENT); border-color: var(--COLOR_ACCENT); color: #fff; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; border-radius: 11px; background: var(--SURFACE_3); transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--COLOR_ACCENT); }
.switch input:checked + span::after { left: 19px; }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 6px 0; border-bottom: 1px solid var(--BORDER); }
.set-row:last-child { border-bottom: 0; }
.set-row .sr-label { flex: 1; min-width: 0; font-size: 13.5px; }
.set-row .sr-label small { display: block; color: var(--TEXT_SECONDARY); font-size: 12px; margin-top: 2px; }
/* sarlavha siqilib, so'zma-so'z ustun bo'lib qolmasin; tugmalar sig'masa — keyingi qatorga */
.set-row { flex-wrap: wrap; }
.set-row .sr-label { min-width: 180px; }
.set-row.stack { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; }
.set-row .sr-key { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.set-row.stack .sr-key { flex-direction: row-reverse; align-items: flex-start; }
.set-row.stack .sr-key .sr-code { flex: 1; min-width: 0; }
.set-row .sr-code {
  display: block; padding: 8px 10px; border-radius: 8px; background: var(--INPUT_BG); border: 1px solid var(--FIELD_BORDER);
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; line-height: 1.55; color: var(--TEXT_PRIMARY2);
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; user-select: all;
}
/* ochiladigan ro'yxat (ui.js combo): maydon .inp uslubida + ilova menyusi */
.combo { position: relative; min-width: 200px; max-width: 260px; }
.combo.full { max-width: none; width: 100%; }
.combo .cb-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px 0 12px; border-radius: 8px;
  background: var(--INPUT_BG); border: 1px solid var(--FIELD_BORDER); color: var(--INPUT_COLOR); font-size: 13.5px; text-align: left;
  cursor: pointer; transition: border-color .12s;
}
.combo .cb-btn:hover { border-color: var(--TEXT_MUTED); }
.combo .cb-btn:focus-visible, .combo.open .cb-btn { outline: 0; border-color: var(--NAVY_FOCUS); }
.combo .cb-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo .cb-arrow { width: 14px; height: 14px; flex: none; color: var(--TEXT_SECONDARY); transition: transform .15s; }
.combo.open .cb-arrow { transform: rotate(180deg); }
.menu.combo-menu { max-height: 300px; overflow-y: auto; max-width: 360px; }
.menu.combo-menu .mi { white-space: normal; }
.menu.combo-menu .mi + .mi { margin-top: 2px; }   /* variantlar orasida 2 px */
.menu.combo-menu .mi:hover:not(.hot) { background: transparent; color: inherit; }
.menu.combo-menu .mi .ic { color: var(--COLOR_ACCENT); }
.menu.combo-menu .mi:hover .ic, .menu.combo-menu .mi.hot .ic { color: #fff; }

/* profil / guruh oynasi */
.prof-card { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 12px; background: var(--DIALOG_ROW_BG); }
.prof-card.col { flex-direction: column; text-align: center; gap: 10px; }
.prof-card .pc-name { font-weight: 700; font-size: 18px; }
.prof-card .pc-sub { color: var(--TEXT_SECONDARY); font-size: 13px; margin-top: 3px; }
.prof-card .pc-sub.on { color: var(--COLOR_ACCENT); }
.actions4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px; background: var(--DIALOG_ROW_BG); font-size: 12px; color: var(--TEXT_PRIMARY); }
.act:hover { background: var(--DIALOG_ROW_HOVER); }
.act .ic { color: var(--ICON_ACCENT); width: 20px; height: 20px; }
.act.danger .ic { color: var(--COLOR_DANGER); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--BORDER); margin: 14px 0 8px; overflow-x: auto; }
.tab { padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--TEXT_SECONDARY); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--TEXT_PRIMARY); }
.tab.on { color: var(--COLOR_ACCENT); border-bottom-color: var(--COLOR_ACCENT); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid3 .cell { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--IMAGE_PLACEHOLDER_BG); cursor: pointer; }
.grid3 .cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid3 .cell .dur { position: absolute; left: 5px; bottom: 5px; padding: 1px 6px; border-radius: 8px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; }
.month-h { font-size: 12px; font-weight: 700; color: var(--TEXT_SECONDARY); margin: 12px 4px 4px; }
.list-empty { text-align: center; color: var(--TEXT_MUTED); padding: 30px 10px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 4px; border-radius: 14px; background: var(--NAVY_SOFT); border: 1px solid var(--BORDER); font-size: 12.5px; }
.chip .av { box-shadow: none; }
.chip button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--TEXT_SECONDARY); }
.chip button:hover { background: var(--COMPOSER_CLOSE_HOVER); color: var(--COLOR_DANGER); }
.pickrow { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.pickrow:hover { background: var(--DIALOG_ROW_HOVER); }
.pickrow .pr-body { flex: 1; min-width: 0; }
.pickrow .pr-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickrow .pr-sub { font-size: 12px; color: var(--TEXT_SECONDARY); }
.pickrow .tickbox { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--BORDER_STRONG); display: grid; place-items: center; flex: none; color: #fff; }
.pickrow.on .tickbox { background: var(--COLOR_ACCENT); border-color: var(--COLOR_ACCENT); }
.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border-radius: 12px; background: linear-gradient(180deg, var(--SURFACE_2), var(--DIALOG_ROW_BG)); margin-bottom: 14px; }
.avatar-pick .av { cursor: pointer; }
.avatar-pick .pen { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--COLOR_ACCENT); color: #fff; display: grid; place-items: center; border: 2px solid var(--DIALOG_BG); }

/* sozlamalar */
.settings { display: flex; height: 100%; min-height: 0; }
.set-nav { width: 200px; flex: none; padding: 10px 8px; border-right: 1px solid var(--BORDER); overflow-y: auto; }
.set-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left; font-size: 13.5px; }
.set-nav button:hover { background: var(--DIALOG_ROW_HOVER); }
.set-nav button.on { background: var(--NAVY_SIDE_CHECKED); color: var(--COLOR_ACCENT); font-weight: 600; }
.set-body { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 18px; }

/* fayl yuborish oynasi */
.fs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fs-grid .cell { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--IMAGE_PLACEHOLDER_BG); }
.fs-grid .cell img, .fs-grid .cell video { width: 100%; height: 100%; object-fit: cover; }
.fs-grid .cell .rm, .fs-row .rm { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.fs-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 36px 8px 8px; border-radius: 10px; background: var(--DIALOG_ROW_BG); margin-bottom: 6px; }
.fs-row .rm { top: 50%; margin-top: -11px; right: 8px; background: var(--BTNS_BG_HOVER); color: var(--TEXT_PRIMARY); }
.warn { font-size: 12.5px; color: var(--COLOR_DANGER); margin-top: 8px; }

/* media ko'ruvchi */
.viewer { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.94); backdrop-filter: blur(6px); display: flex; flex-direction: column; color: #fff; }
.viewer .vw-top { flex: none; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.viewer .vw-top .grow { flex: 1; min-width: 0; }
.viewer .vw-top .vw-name { font-weight: 600; }
.viewer .vw-top .vw-sub { font-size: 12px; opacity: .7; }
.viewer .vw-btn { height: 34px; min-width: 34px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.viewer .vw-btn:hover { background: rgba(255,255,255,.14); }
.viewer .vw-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; }
.viewer .vw-stage img { max-width: 94vw; max-height: calc(100vh - 150px); object-fit: contain; transform-origin: center; user-select: none; -webkit-user-drag: none; cursor: grab; }
.viewer .vw-stage video { max-width: 94vw; max-height: calc(100vh - 150px); }
.viewer .vw-nav { position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.08); }
.viewer .vw-nav:hover { background: rgba(255,255,255,.18); }

/* toast (bildirishnoma kartasi) */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.ntoast {
  pointer-events: auto; position: relative; width: 360px; max-width: calc(100vw - 32px); padding: 10px 12px 12px; border-radius: 14px;
  background: var(--TOAST_BG); border: 1px solid var(--TOAST_BORDER); box-shadow: 0 4px 24px rgba(0,0,0,.35); cursor: pointer; overflow: hidden;
  animation: slidein .22s ease-out;
}
[data-theme="light"] .ntoast { box-shadow: 0 4px 24px rgba(15,23,42,.15); }
@keyframes slidein { from { transform: translateX(110%); opacity: .3; } }
.ntoast .nt-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--TEXT_SECONDARY); margin-bottom: 8px; }
.ntoast .nt-top img { width: 14px; height: 14px; }
.ntoast .nt-top .grow { flex: 1; font-weight: 600; }
.ntoast .nt-x { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; visibility: hidden; }
.ntoast:hover .nt-x { visibility: visible; }
.ntoast .nt-x:hover { background: var(--BTNS_BG_HOVER); }
.ntoast .nt-main { display: flex; gap: 10px; }
.ntoast .nt-body { flex: 1; min-width: 0; }
.ntoast .nt-title { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ntoast .nt-title .nt-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntoast .nt-text { font-size: 13px; color: var(--TEXT_PRIMARY2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ntoast .nt-text b { color: var(--COLOR_ACCENT); font-weight: 600; }
.ntoast .nt-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--COLOR_ACCENT); animation: ntbar 5s linear forwards; }
.ntoast:hover .nt-bar { animation-play-state: paused; }
@keyframes ntbar { from { width: 100%; } to { width: 0; } }
.stoast {
  pointer-events: auto; max-width: min(460px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 12px; font-size: 13px;
  background: var(--TOAST_BG); border: 1px solid var(--TOAST_BORDER); box-shadow: 0 4px 24px rgba(0,0,0,.35); animation: slidein .2s ease-out;
}
.stoast.err { border-left: 3px solid var(--COLOR_DANGER); }

/* ---------- qo'ng'iroq ---------- */
.call-overlay {
  position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #1a2533 0%, #05090d 75%); color: #e8edf2;
}
.call-overlay .co-top { position: absolute; top: 16px; left: 20px; right: 20px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #aab6c6; z-index: 3; }
.call-overlay .co-top .grow { flex: 1; }
.call-overlay .co-peer { display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 2; }
.call-overlay .co-name { font-size: 22px; font-weight: 700; }
.call-overlay .co-status { font-size: 14px; color: #aab6c6; }
.call-overlay .remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #05090d; z-index: 1; }
.call-overlay .local-video { position: absolute; right: 20px; bottom: 110px; width: 220px; max-width: 30vw; border-radius: 12px; background: #000; z-index: 3; box-shadow: 0 4px 20px rgba(0,0,0,.5); transform: scaleX(-1); }
.call-overlay .co-ctrls { position: absolute; bottom: 30px; display: flex; gap: 14px; z-index: 3; }
.cbtn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; }
.cbtn:hover { background: rgba(255,255,255,.22); }
.cbtn.off { background: #fff; color: #111; }
.cbtn.red { background: #d64545; }
.cbtn.green { background: #2e9e5b; }
.cbtn .ic { width: 24px; height: 24px; }
.incoming {
  position: fixed; top: 50px; left: 50%; transform: translateX(-50%); z-index: 1250; width: 340px; max-width: calc(100vw - 32px);
  padding: 18px; border-radius: 16px; background: var(--TOAST_BG); border: 1px solid var(--TOAST_BORDER); box-shadow: 0 8px 40px rgba(0,0,0,.45);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.incoming .in-name { font-weight: 700; font-size: 17px; }
.incoming .in-sub { color: var(--TEXT_SECONDARY); font-size: 13px; }
.incoming .in-btns { display: flex; gap: 30px; margin-top: 8px; }
.call-mini {
  position: fixed; right: 16px; top: 46px; z-index: 1150; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px;
  background: var(--COLOR_OK); color: #fff; cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.35); font-size: 13px; font-weight: 600;
}
.gc-grid { position: absolute; inset: 60px 16px 110px; display: grid; gap: 10px; z-index: 2; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-rows: minmax(160px, 1fr); }
.gc-tile { position: relative; border-radius: 14px; overflow: hidden; background: #1a232e; display: grid; place-items: center; border: 2px solid transparent; }
.gc-tile.speaking { border-color: #3ccf6e; }
.gc-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gc-tile .gt-name { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 10px; background: rgba(0,0,0,.55); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.gc-tile .gt-menu { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; color: #fff; }
.gc-req { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; gap: 8px; }
.gc-req .rq { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(23,33,43,.95); border: 1px solid rgba(255,255,255,.1); font-size: 13px; }

/* ---------- kirish oynasi ---------- */
.danger-note { margin: 4px 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45;
  background: rgba(214, 69, 69, .1); border: 1px solid rgba(214, 69, 69, .35); color: var(--TEXT_PRIMARY2); }
.check-line { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; font-size: 13px; color: var(--TEXT_SECONDARY); cursor: pointer; }
.check-line input { width: 16px; height: 16px; accent-color: var(--COLOR_DANGER); }
.lock-screen { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: var(--BG_MAIN); }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--BORDER_STRONG); border-top-color: var(--COLOR_ACCENT); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-fill { flex: 1; display: grid; place-items: center; }

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  .sidebar { display: none; }
  .listcol { width: 100% !important; border-right: 0; }
  .resizer { display: none; }
  .chatpane { display: none; }
  body.chat-open .listcol { display: none; }
  body.chat-open .chatpane { display: flex; }
  .chat-head .back { display: grid; }
  .msgs { padding: 8px 8px 10px; }
  .bubble { max-width: 86%; }
  /* Telefon: oynalar ekran kengligidan chiqmaydi, sozlamalar bo'limlari tepada gorizontal */
  .overlay { padding: 8px; }
  .dialog { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dialog.w520, .dialog.w820 { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .settings { flex-direction: column; }
  .set-nav { width: auto; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--BORDER); padding: 8px; flex: none; }
  .set-nav button { white-space: nowrap; flex: none; width: auto; }
  .set-body { padding: 12px; }
  .set-row { flex-wrap: wrap; gap: 8px; }
  .form-col { min-width: 0; }
  .actions4 { grid-template-columns: repeat(2, 1fr); }
  .call-overlay .local-video { width: 120px; bottom: 100px; right: 12px; }
}

/* Parolni almashtirish / hisobni o'chirish oynalari */
.form-col { display: flex; flex-direction: column; min-width: min(420px, 80vw); }
.form-col .check-line input { accent-color: var(--COLOR_ACCENT); }

/* Ilovani yuklab olish */
.dl-list { display: flex; flex-direction: column; gap: 8px; }
.dl-item, .dl-item * { box-sizing: border-box; }
.dl-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: inherit;
  border: 1px solid var(--BORDER); background: var(--DIALOG_ROW_BG, transparent); transition: background .12s, border-color .12s; }
.dl-item:hover { background: var(--DIALOG_ROW_HOVER, var(--BG_HOVER)); border-color: var(--BORDER_STRONG); }
.dl-item.mine { border-color: var(--COLOR_ACCENT); }
.dl-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--BTNS_BG); color: var(--ICON_ACCENT, var(--COLOR_ACCENT)); }
.dl-body { flex: 1; min-width: 0; }
.dl-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--COLOR_ACCENT); color: var(--ON_ACCENT, #fff); }
.dl-note { margin-top: 4px; }

/* Profil rasmlari (Sozlamalar → Profil) */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.ph-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--IMAGE_PLACEHOLDER_BG, #222); border: 2px solid transparent; }
.ph-tile.cur { border-color: var(--COLOR_ACCENT); }
.ph-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-badge { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--COLOR_ACCENT); color: #fff; }
.ph-acts { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.ph-tile:hover .ph-acts { opacity: 1; }
.ph-acts button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; }
.ph-add { aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--BORDER_STRONG); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--TEXT_SECONDARY); font-size: 12px; }
.ph-add:hover { border-color: var(--COLOR_ACCENT); color: var(--TEXT_PRIMARY); }
.prof-form { display: flex; flex-direction: column; gap: 12px; }
.prof-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prof-form textarea.inp { resize: vertical; min-height: 64px; font: inherit; }
@media (max-width: 640px) { .prof-form .grid2 { grid-template-columns: 1fr; } }

/* Menyu tugmasidagi profil rasmi va "Mening profilim" */
.icon-btn.me-btn { width: 40px; height: 40px; padding: 2px; border-radius: 50%; }
.icon-btn.me-btn .av { width: 36px; height: 36px; font-size: 13px; }
.av.clickable { cursor: pointer; }
.av.clickable:hover { filter: brightness(1.08); }
.myp-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; text-align: center; }
.myp-name { font-weight: 700; font-size: 18px; margin-top: 4px; }
.myp-count { align-self: flex-end; }
.myp-ro { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--BORDER); }
.myp-ro:last-of-type { border-bottom: none; }

/* Profil oynasida bio — ism ostida */
.prof-card .pc-bio { margin-top: 8px; font-size: 13px; color: var(--TEXT_PRIMARY); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; max-width: 420px; }
.prof-card.col .pc-bio { text-align: center; margin-left: auto; margin-right: auto; }

/* Ekran qulfi (Desktop'dagi kabi: soat, sana, karta) */
.lock-screen { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(ellipse at top, var(--SURFACE_2, #1a2633), var(--BG_MAIN) 70%); padding: 16px; }
.lk-clock { font-size: 64px; font-weight: 300; letter-spacing: 1px; color: var(--TEXT_PRIMARY); line-height: 1; }
.lk-date { color: var(--TEXT_SECONDARY); font-size: 15px; margin-bottom: 26px; text-transform: capitalize; }
.lk-card { width: min(340px, calc(100vw - 32px)); background: var(--DIALOG_BG); border: 1px solid var(--BORDER); border-radius: 16px;
  padding: 24px 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.lk-card .inp { width: 100%; margin-top: 6px; }
.lk-name { font-weight: 700; font-size: 17px; }
.lk-info { color: var(--COLOR_DANGER); font-size: 12.5px; min-height: 16px; }
.lk-out { margin-top: 2px; font-size: 13px; }
.lk-card.shake { animation: lk-shake .4s; }
@keyframes lk-shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.titlebar .tb-lock { margin-right: 6px; }

/* Chat ichida qidirish (Desktop ChatSearchBar kabi) */
.chat-search { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px; background: var(--SURFACE_2, var(--BG_SIDEBAR)); border-bottom: 1px solid var(--BORDER); }
.chat-search > .ic { opacity: .6; }
.chat-search .inp { flex: 1; min-width: 0; height: 32px; }
.chat-search .cs-count { min-width: 58px; text-align: center; font-size: 12.5px; color: var(--TEXT_SECONDARY); }
.chat-search .cs-count.empty { color: var(--COLOR_DANGER); }
.chat-search .icon-btn:disabled { opacity: .35; cursor: default; }
mark.hl { background: #ffe082; color: #1b1b1b; border-radius: 2px; padding: 0 1px; }
mark.hl.cur { background: #ff9f43; }
/* Ochilmagan media nuqtasi */
.unopened-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--COLOR_ACCENT, #3390ec); border: 1px solid rgba(255,255,255,.85); margin-left: 6px; vertical-align: middle; }
.row.mine .unopened-dot { background: #fff; border-color: var(--COLOR_ACCENT, #3390ec); }
.has-dot { position: relative; }
.has-dot > .unopened-dot { position: absolute; top: 8px; right: 8px; margin: 0; z-index: 2; }
/* Yozish maydonidagi emoji paneli */
/* Yozish maydoni tugmalari (emoji, yuborish, mikrofon) — bir xil: 34×34, belgi 20×20, fonsiz; fon faqat hover'da */
.composer .icon-btn.emoji-btn, .composer .send-btn, .composer .icon-btn.mic-btn {
  box-sizing: border-box; width: 34px; height: 34px; min-width: 34px; padding: 0; border: 0; border-radius: 17px; margin: 0 0 2px;
  transform: none; background: transparent; }
.composer .emoji-btn .ic, .composer .send-btn .ic, .composer .mic-btn .ic { width: 20px; height: 20px; }
.composer .icon-btn.emoji-btn { margin-left: -4px; }
.composer .send-btn { color: var(--COLOR_ACCENT); }
.composer .icon-btn.emoji-btn:hover, .composer .send-btn:hover, .composer .icon-btn.mic-btn:hover,
.composer .icon-btn.emoji-btn:active, .composer .send-btn:active, .composer .icon-btn.mic-btn:active { background: var(--NAVY_SOFT); }
.emoji-pop { position: fixed; z-index: 600; width: 340px; max-width: calc(100vw - 16px); max-height: 300px; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 2px; padding: 8px; background: var(--DIALOG_BG); border: 1px solid var(--BORDER); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.emoji-pop button { font-size: 22px; height: 38px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.emoji-pop button:hover { background: var(--HOVER, rgba(127,127,127,.15)); }
/* Kimlar reaksiya bosgani */
.rx-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rx-tab { border: 1px solid var(--BORDER); background: none; color: var(--TEXT_PRIMARY); border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 13px; }
.rx-tab.on { background: var(--COLOR_ACCENT, #3390ec); border-color: transparent; color: #fff; }
.reactors { max-height: 360px; overflow-y: auto; }
.rx-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.rx-row:hover { background: var(--HOVER, rgba(127,127,127,.12)); }
.rx-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-emoji { font-size: 20px; }
.selbar .sel-count { text-align: center; }
.vsub-line { display: flex; align-items: center; }
.cr-pin { opacity: .55; display: inline-flex; margin-left: 4px; }
.cr-pin .ic { transform: rotate(45deg); }
/* Lokal parol oynasi (Desktop InstallPasswordDialog kabi) */
.lockpw .lp-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.lockpw .lp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--NAVY_SOFT); color: var(--COLOR_ACCENT); }
.lockpw .lp-title { font-weight: 700; margin-bottom: 3px; }
.lockpw .hint { margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap .inp { width: 100%; padding-right: 40px; }
.pw-wrap .pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--TEXT_SECONDARY); background: none; border: 0; cursor: pointer; }
.pw-wrap .pw-eye:hover { background: var(--NAVY_SOFT); }
.inp.bad { border-color: var(--COLOR_DANGER) !important; }
.ll-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.lockpw { width: auto; min-width: min(390px, 78vw); }
.lockpw .inp, .lockpw select.inp, .pw-wrap .inp { box-sizing: border-box; width: 100%; max-width: 100%; }

/* @username maydoni */
.uname-wrap { position: relative; }
.uname-wrap .uname-at { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--COLOR_TEXT_2); pointer-events: none; }
.uname-wrap .inp { padding-left: 26px; }
.uname-status { display: block; min-height: 16px; margin-top: 4px; }
.uname-status.ok { color: var(--COLOR_GREEN); }
.uname-status.bad { color: var(--COLOR_DANGER); }
.uname-line { color: var(--COLOR_ACCENT); font-size: 14px; }

/* "Tizim haqida" — Desktop bilan bir xil ko'rinish, matn serverdan (/api/app/about) */
.about { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-height: 120px; }
.about-logo { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 6px; }
.about-title { font-weight: 700; font-size: 20px; }
.about-ver { margin-top: 8px; padding: 3px 12px; border-radius: 12px; background: var(--BG_HOVER); font-size: 12.5px; }
.about-sep { align-self: stretch; height: 1px; background: var(--BORDER); margin: 14px 0 10px; }
.about-credit { font-weight: 700; }
.about-fields { display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; text-align: left; align-self: stretch; margin: 14px 0 4px; }
.about-note { align-self: stretch; text-align: left; line-height: 1.5; margin-top: 10px; }

/* @username — xabar ichida bosiladigan havola (matn sifatida belgilanadi/nusxa olinadi) */
.bubble .text a.mention, a.mention { color: var(--LINK_COLOR); text-decoration: none; cursor: pointer; user-select: text; }
a.mention:hover { text-decoration: underline; }

/* Ekran ulashish — kadr kesilmaydi, belgi */
.gc-tile video.screen { object-fit: contain; background: #05090d; }
.screen-badge { font-size: 12.5px; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.45); color: #fff; margin-right: 8px; }
.gt-screen { position: absolute; top: 8px; left: 8px; z-index: 2; }

.boot-fail{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;padding:16px;min-height:100vh}
.search-field input::-webkit-search-cancel-button { display: none; }
