/* ============================================================
   dashboard-extra.css
   achievements.php / shop.php kabi sahifalarda ishlatiladigan
   .panel / .vip-pkg-* / .ach-stat-pill* / .shop-alert* klasslarini
   SB++ning theme.css'idagi dizayn belgilariga (--brand-600, --border,
   --bg-muted, --radius-md va h.k.) moslashtiradi.

   inc/header.php'da theme.css'DAN KEYIN ulanadi, shunda shu fayldagi
   qoidalar ustunlik qiladi va SB++ dizayn o'zgaruvchilaridan
   foydalanadi (fallback qiymatlar bilan — agar theme.css o'sha
   o'zgaruvchini bermasa ham sahifa buzilmaydi).
   ============================================================ */

/* ---------- Umumiy konteyner ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.page-banner {
    margin-bottom: 1.5rem;
}
.page-banner h1 {
    font-size: var(--fs-2xl, 1.5rem);
    font-weight: 600;
    margin: 0;
    color: var(--text, #18181b);
}

/* ---------- Panel (karta konteyner) ---------- */
.panel {
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius-md, 10px);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.panel-head {
    margin-bottom: 1rem;
}
.panel-head h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--text, #18181b);
}

.empty-state {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted, #71717a);
    font-size: 0.875rem;
}

/* ---------- Login tugmasi ---------- */
.login-btn {
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md, 8px);
    background: var(--brand-600, #ea580c);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    transition: filter 0.15s;
}
.login-btn:hover {
    filter: brightness(0.92);
    color: #fff;
    text-decoration: none;
}
.login-btn svg {
    width: 16px;
    height: 16px;
}

/* ---------- Xabar banner (claim natijasi) ---------- */
.shop-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md, 8px);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}
.shop-alert.success {
    background: color-mix(in srgb, #16a34a 12%, transparent);
    border-color: color-mix(in srgb, #16a34a 35%, transparent);
    color: #15803d;
}
.shop-alert.error {
    background: color-mix(in srgb, #dc2626 12%, transparent);
    border-color: color-mix(in srgb, #dc2626 35%, transparent);
    color: #b91c1c;
}

/* ---------- Statistika pillari (kills / gold) ---------- */
.ach-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.ach-stat-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-muted, #f4f4f5);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius-md, 10px);
    padding: 0.75rem 1.1rem;
    min-width: 190px;
    flex: 1 1 190px;
}
.ach-stat-pill-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full, 999px);
    background: color-mix(in srgb, var(--brand-600, #ea580c) 14%, transparent);
    color: var(--brand-600, #ea580c);
    flex-shrink: 0;
}
.ach-stat-pill-body {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.ach-stat-pill-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text, #18181b);
}
.ach-stat-pill-label {
    font-size: 0.75rem;
    color: var(--text-muted, #71717a);
}

/* ---------- Achievement / VIP karta gridi ---------- */
.vip-pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.vip-pkg-card {
    position: relative;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius-md, 10px);
    padding: 1.1rem 1.1rem 1.25rem;
    border-top: 3px solid var(--pkg-color, var(--brand-600, #ea580c));
    transition: box-shadow 0.15s, transform 0.15s;
}
.vip-pkg-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}
.vip-pkg-crown {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.vip-pkg-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text, #18181b);
    margin-bottom: 0.25rem;
}
.vip-pkg-info {
    font-size: 0.8rem;
    color: var(--text-muted, #71717a);
    margin-bottom: 0.6rem;
    min-height: 2.2em;
}
.vip-pkg-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--pkg-color, var(--brand-600, #ea580c));
    margin-bottom: 0.5rem;
}

/* ---------- Progress bar ---------- */
.bar-track {
    height: 6px;
    border-radius: var(--radius-full, 999px);
    background: var(--bg-muted, #e4e4e7);
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: var(--radius-full, 999px);
    transition: width 0.25s ease;
}

/* ---------- Olingan / bloklangan holat belgilari ---------- */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #15803d;
    background: color-mix(in srgb, #16a34a 12%, transparent);
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-md, 8px);
}

.vip-pkg-btn {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md, 8px);
    border: none;
    background: var(--brand-600, #ea580c);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: filter 0.15s;
}
.vip-pkg-btn:hover:not(:disabled) {
    filter: brightness(0.92);
}
.vip-pkg-btn:disabled {
    background: var(--bg-muted, #e4e4e7);
    color: var(--text-faint, #a1a1aa);
    cursor: not-allowed;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ============================================================
   Chat Log (chat_logs.php) — .stats-strip / .cl-* klasslari.
   Sahifaning o'zida yoki boshqa joyda aniqlanmagan edi, shuning
   uchun stillanmagan matn bo'lib chiqardi. ---------- */

/* ---------- Umumiy statistika chiplari (Всего сообщений va h.k.) ---------- */
.stats-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.stat-chip {
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius-md, 10px);
    padding: 0.85rem 1.1rem;
    min-width: 150px;
    flex: 1 1 150px;
}
.stat-chip .v {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text, #18181b);
}
.stat-chip .l {
    font-size: 0.78rem;
    color: var(--text-muted, #71717a);
    margin-top: 0.15rem;
}

/* ---------- Umumiy status / kanal belgisi ---------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-full, 999px);
    background: var(--bg-muted, #f4f4f5);
    color: var(--text-muted, #71717a);
    white-space: nowrap;
}
.status-badge.muted {
    background: var(--bg-muted, #f4f4f5);
    color: var(--text-muted, #71717a);
}
.status-badge.online {
    background: color-mix(in srgb, #16a34a 14%, transparent);
    color: #15803d;
}

/* ---------- Xaritalar gridi (kartalar) ---------- */
.cl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.cl-card {
    position: relative;
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--border, #e4e4e7);
    background-color: var(--bg-muted, #18181b);
    background-size: cover;
    background-position: center;
    min-height: 150px;
    padding: 0.9rem;
    cursor: pointer;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}
.cl-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.75) 100%);
    pointer-events: none;
}
.cl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.cl-card > * {
    position: relative;
    z-index: 1;
}
.cl-card-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.cl-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    word-break: break-word;
}
.cl-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.cl-card-bar {
    height: 5px;
    border-radius: var(--radius-full, 999px);
    background: rgba(255,255,255,0.25);
    overflow: hidden;
}
.cl-card-bar-fill {
    height: 100%;
    background: var(--brand-600, #ea580c);
    border-radius: var(--radius-full, 999px);
}
.cl-card-last {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.8);
}

.cl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full, 999px);
    background: rgba(255,255,255,0.16);
    color: #fff;
}

/* ---------- Sessiya / chat panellari ---------- */
.cl-hidden {
    display: none !important;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.panel-head-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.cl-sub {
    font-size: 0.8rem;
    color: var(--text-muted, #71717a);
    padding: 0 22px 0.75rem;
}
.cl-close-btn {
    border: 1px solid var(--border, #e4e4e7);
    background: var(--bg, #fff);
    color: var(--text-muted, #71717a);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.cl-close-btn:hover {
    background: var(--bg-muted, #f4f4f5);
    color: var(--text, #18181b);
}
.cl-search {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border, #e4e4e7);
    background: var(--bg, #fff);
    color: var(--text, #18181b);
    font-size: 0.875rem;
}
.cl-search:focus {
    outline: none;
    border-color: var(--brand-600, #ea580c);
}

.cl-sess-date-group {
    margin-bottom: 1rem;
}
.cl-sess-date-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text, #18181b);
    margin-bottom: 0.5rem;
}
.cl-sess-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
}
.cl-sess-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    text-align: left;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius-md, 8px);
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.cl-sess-btn:hover {
    border-color: var(--brand-600, #ea580c);
}
.cl-sess-btn.active {
    border-color: var(--brand-600, #ea580c);
    background: color-mix(in srgb, var(--brand-600, #ea580c) 8%, transparent);
}
.cl-sess-time {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text, #18181b);
}
.cl-sess-meta {
    font-size: 0.75rem;
    color: var(--text-muted, #71717a);
}

/* ---------- Xabarlar jadvali ---------- */
.panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.panel table thead th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, #71717a);
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border, #e4e4e7);
}
.panel table tbody td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--border, #e4e4e7);
    color: var(--text, #18181b);
    vertical-align: middle;
}
.panel table tbody tr:hover td {
    background: var(--bg-muted, #f4f4f5);
}
.cl-msg-row.team-row td {
    background: color-mix(in srgb, var(--brand-600, #ea580c) 5%, transparent);
}
.cl-msg-text {
    word-break: break-word;
}
.cl-loading-row td {
    text-align: center;
    color: var(--text-muted, #71717a);
    padding: 1.25rem 0.6rem;
}

/* ============================================================
   Shop (shop.php) — .shop-tab / .shop-pane / .item-shop-*
   klasslari sahifaning hech qayerida aniqlanmagan edi. Bundan
   tashqari shop.php o'zining ichki <style> blokida eski, mustaqil
   sayt uchun mo'ljallangan "oltin/qorong'i" o'zgaruvchilardan
   (--chrome-border, --gold-bright va h.k.) foydalanadi — bularni
   SB++ning theme.css o'zgaruvchilariga moslashtiramiz. ---------- */
:root {
    --chrome-border: var(--border, #e4e4e7);
    --gold-bright: var(--brand-600, #ea580c);
    --gold-dim: var(--brand-600, #ea580c);
    --dusk: var(--bg, #fff);
    --ink: var(--text, #18181b);
    --ink-soft: var(--text-muted, #71717a);
}
:root.dark, :root[data-theme="dark"] {
    --dusk: var(--bg, #18181b);
}

/* ---------- Do'kon tablari ---------- */
.shop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border, #e4e4e7);
    margin-bottom: 1.25rem;
    padding-bottom: 0.1rem;
}
.shop-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted, #71717a);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none;
    display: inline-block;
}
.shop-tab:hover {
    color: var(--text, #18181b);
}
.shop-tab.active {
    color: var(--brand-600, #ea580c);
    border-bottom-color: var(--brand-600, #ea580c);
}

.shop-pane {
    display: none;
}
.shop-pane.active {
    display: block;
}

/* ---------- Buyum do'koni: guruh / grid / karta ---------- */
.item-shop-group {
    margin-bottom: 1.5rem;
}
.item-shop-group-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text, #18181b);
    margin-bottom: 0.75rem;
}
.item-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.85rem;
}
.item-shop-card {
    position: relative;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius-md, 10px);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 3px solid var(--pkg-color, var(--brand-600, #ea580c));
}
.item-shop-icon {
    font-size: 1.5rem;
    line-height: 1;
}
.item-shop-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text, #18181b);
}
.item-shop-price {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--brand-600, #ea580c);
}
.item-shop-desc {
    font-size: 0.78rem;
    color: var(--text-muted, #71717a);
    line-height: 1.4;
}
.item-shop-btn {
    margin-top: auto;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: var(--radius-md, 8px);
    background: var(--brand-600, #ea580c);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: filter 0.15s;
}
.item-shop-btn:hover:not(:disabled) {
    filter: brightness(0.92);
}
.item-shop-btn:disabled {
    background: var(--bg-muted, #e4e4e7);
    color: var(--text-faint, #a1a1aa);
    cursor: not-allowed;
}

/* ---------- Xarid tarixi jadvali ---------- */
.shop-hist-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full, 999px);
}
.shop-hist-badge.delivered {
    background: color-mix(in srgb, #16a34a 14%, transparent);
    color: #15803d;
}
.shop-hist-badge.pending {
    background: color-mix(in srgb, #ea580c 14%, transparent);
    color: #c2410c;
}

/* ---------- Dark mode: SB++ theme.css shu klasslarni belgilaganda
   ishlaydi (data-theme="dark" yoki .dark) ---------- */
:root.dark .panel,
:root.dark .vip-pkg-card,
:root.dark .stat-chip,
:root.dark .cl-sess-btn,
:root.dark .item-shop-card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .vip-pkg-card,
:root[data-theme="dark"] .stat-chip,
:root[data-theme="dark"] .cl-sess-btn,
:root[data-theme="dark"] .item-shop-card {
    background: var(--bg, #18181b);
}

/* ============================================================
   Bildirishnomalar (notifications.php / notification.php) va
   sidebar'dagi qo'ng'iroq belgisi (bell) uchun uslublar.
   ============================================================ */

/* ---------- .connect-mini-btn (global) ----------
   Ilgari faqat player.php ichida e'lon qilingan edi; boshqa
   sahifalarda (masalan notification.php) ham ishlashi uchun
   bu yerga ko'chirildi. player.php'dagi lokal <style> ustunlik
   qiladi (u keyinroq yuklanadi), shu bilan bir xil ko'rinishni
   saqlaydi. */
.connect-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    transition: background 0.15s, border-color 0.15s;
}
.connect-mini-btn:hover {
    border-color: var(--accent, #ea580c);
    color: var(--accent, #ea580c);
    text-decoration: none;
}

/* ---------- Sidebar qo'ng'iroq (bell) tugmasi ---------- */
.notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md, 8px);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.notif-bell-btn:hover {
    background: var(--bg-muted);
    color: var(--text);
}
.notif-bell-btn i,
.notif-bell-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}
.notif-bell-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: var(--radius-full, 9999px);
    background: var(--danger, #dc2626);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.05rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px var(--bg, #fff);
}
:root.dark .notif-bell-badge,
:root[data-theme="dark"] .notif-bell-badge {
    box-shadow: 0 0 0 2px var(--bg, #18181b);
}

/* ---------- Bildirishnoma ro'yxati (notifications.php) ---------- */
.nt-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    margin-bottom: 0.625rem;
    overflow: hidden;
    background: var(--bg);
}
.nt-item:last-child {
    margin-bottom: 0;
}
.nt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    user-select: none;
}
.nt-header:hover {
    background: var(--bg-muted);
}
.nt-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}
.nt-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.nt-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-sm, 4px);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}
.nt-link-icon:hover {
    background: var(--bg-muted);
    color: var(--accent, #ea580c);
    text-decoration: none;
}
.nt-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1;
}
.nt-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.18s ease;
    border-top: 1px solid transparent;
}
.nt-item.open .nt-body {
    grid-template-rows: 1fr;
    border-top-color: var(--border);
}
.nt-body-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 0.9rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.nt-item.open .nt-body-inner {
    padding: 0.75rem 0.9rem;
}

/* Daraja rangi — chap chegara + sarlavha rangi */
.nt-item.level-success { border-left: 3px solid var(--success); }
.nt-item.level-warning { border-left: 3px solid var(--warning); }
.nt-item.level-muted   { border-left: 3px solid var(--border); }
.nt-item.level-success .nt-title { color: var(--success); }
.nt-item.level-warning .nt-title { color: var(--warning); }

/* ---------- notification.php (bitta e'lon, to'liq sahifa) ---------- */
.nt-full-body {
    color: var(--text);
}

/* ============================================================
   Topbar til almashtirish (lang-switch) tugmasi
   ============================================================ */
.lang-switch {
    position: relative;
}
.lang-switch > summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.lang-switch > summary::-webkit-details-marker {
    display: none;
}
.lang-switch[open] > summary {
    background: var(--bg-muted);
    color: var(--text);
}
.lang-switch__menu {
    position: absolute;
    top: calc(100% + 0.375rem);
    right: 0;
    min-width: 9.5rem;
    background: var(--bg-surface, var(--bg));
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    z-index: 40;
}
.lang-switch__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8125rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
.lang-switch__item:hover {
    background: var(--bg-muted);
    text-decoration: none;
}
.lang-switch__item.is-active {
    color: var(--accent, #ea580c);
    font-weight: 600;
}
.lang-switch__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.25rem;
    border-radius: var(--radius-sm, 4px);
    background: var(--bg-muted);
    font-size: 0.625rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Tashqariga bosilganda yopilishi uchun — theme.js'dagi umumiy
   "click outside closes open <details>" naqshiga mos (agar mavjud
   bo'lmasa ham, <details> o'zi summary'ga qayta bosilganda yopiladi). */

/* ============================================================
   Onlayn o'yinchi — avatar atrofida "glow" (aylana) va ism porlashi
   Manba: avatar_helper.php dagi isPlayerOnline()/avatarTag() shu klassni
   qo'shadi ('is-online'), ism uchun onlineNameClass() ' player-name-online'
   qaytaradi. Barcha sahifalarda (bu fayl header.php orqali global ulanadi)
   bir xil ko'rinishda ishlaydi: dashboard, rating, economy, connections,
   player profili va h.k.
   ============================================================ */
img.is-online {
    border-radius: 50%;
    box-shadow:
        0 0 0 2px var(--bg-surface, #16161a),
        0 0 0 4px #22c55e,
        0 0 12px 3px rgba(34, 197, 94, .6);
    animation: dsOnlineGlowPulse 2.2s ease-in-out infinite;
}
@keyframes dsOnlineGlowPulse {
    0%, 100% {
        box-shadow:
            0 0 0 2px var(--bg-surface, #16161a),
            0 0 0 4px #22c55e,
            0 0 10px 2px rgba(34, 197, 94, .55);
    }
    50% {
        box-shadow:
            0 0 0 2px var(--bg-surface, #16161a),
            0 0 0 4px #22c55e,
            0 0 18px 6px rgba(34, 197, 94, .85);
    }
}
/* Harakatga sezgir foydalanuvchilar uchun pulsatsiyani o'chiramiz (glow qoladi) */
@media (prefers-reduced-motion: reduce) {
    img.is-online { animation: none; }
}

.player-name-online {
    color: #22c55e !important;
    text-shadow: 0 0 8px rgba(34, 197, 94, .55);
    font-weight: 600;
}
.player-name-online:hover { color: #22c55e !important; }
/* Onlaynlikni bildiruvchi kichik yashil nuqta, ism yonida */
.player-name-online::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 0.375rem;
    margin-bottom: 1px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px 1px rgba(34, 197, 94, .9);
    vertical-align: middle;
}
