/* =================== زون كيو — voice, moderation, communities =================== */

/* header button */
.voice-btn { position: relative; font-size: 18px; }
.voice-btn.live { background: #DCFCE7; animation: livePulse 1.6s infinite; }
.voice-btn.has-room { background: #FEF3C7; }
.vb-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--success); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, .15); } }
.room-line { color: var(--success) !important; font-weight: 700; }

/* floating voice dock */
#voice-dock { position: fixed; bottom: 22px; left: 22px; z-index: 40; width: 320px; background: linear-gradient(160deg, #1E1B39, #2E2766); color: #fff; border-radius: 24px; padding: 14px 16px; box-shadow: 0 20px 50px rgba(30, 27, 57, .45); animation: pop .25s; }
.vd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.vd-head b { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-live { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .3); animation: livePulse 1.4s infinite; flex: none; }
.vd-time { font-variant-numeric: tabular-nums; font-size: 13px; opacity: .8; }
.vd-people { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.vd-person { display: grid; justify-items: center; gap: 3px; width: 52px; }
.vd-person small { font-size: 11px; opacity: .85; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-person em { font-size: 9px; font-style: normal; color: #FDE68A; }
.vd-av { position: relative; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .08); transition: box-shadow .12s; }
.vd-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.vd-person.speaking .vd-av { box-shadow: 0 0 0 3px #22C55E, 0 0 16px rgba(34, 197, 94, .7); }
.vd-person.connecting .vd-av img { opacity: .5; }
.vd-person.empty .vd-av { border: 2px dashed rgba(255, 255, 255, .2); background: none; }
.vd-person.empty small { opacity: .4; }
.vd-mute { position: absolute; bottom: -3px; inset-inline-end: -3px; font-size: 13px; font-style: normal; background: #1E1B39; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; }
.vd-actions { display: flex; justify-content: center; gap: 14px; }
.vd-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer; font-size: 22px; background: rgba(255, 255, 255, .14); color: #fff; transition: transform .1s; }
.vd-btn:hover { transform: scale(1.06); }
.vd-btn.off { background: #F59E0B; }
.vd-btn.end { background: #EF4444; }

/* incoming call */
.incoming { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 70; width: 300px; background: linear-gradient(160deg, #1E1B39, #3B2F8F); color: #fff; border-radius: 26px; padding: 22px; text-align: center; box-shadow: 0 24px 60px rgba(30, 27, 57, .5); animation: ringIn .35s cubic-bezier(.2, 1.4, .4, 1); display: grid; justify-items: center; gap: 4px; }
@keyframes ringIn { from { transform: translate(-50%, -30px) scale(.9); opacity: 0; } }
.in-av { width: 86px; height: 86px; border-radius: 50%; margin-bottom: 6px; animation: ringPulse 1.4s infinite; }
.in-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .5); }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 100% { box-shadow: 0 0 0 22px rgba(34, 197, 94, 0); } }
.incoming b { font-size: 18px; }
.incoming small { opacity: .8; }
.in-actions { display: flex; gap: 40px; margin-top: 14px; }
.in-btn { width: 60px; height: 60px; border-radius: 50%; border: 0; font-size: 26px; cursor: pointer; color: #fff; }
.in-btn.decline { background: #EF4444; }
.in-btn.accept { background: #22C55E; animation: shake 1.2s infinite; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }

/* call log in chat */
.call-msg { align-self: center; display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 99px; padding: 8px 16px; box-shadow: var(--shadow); margin: 6px 0; font-size: 13px; }
.call-msg small { color: var(--muted); }
.call-msg.missed b { color: var(--danger); }
.call-ic { font-size: 18px; }

/* moderation */
.member-row .mr-meta { flex: 1; min-width: 0; }
.member-row .role.owner { background: #FEF3C7; color: #92400E; }
.mod-tools { display: flex; gap: 3px; }
.mod-tools button { border: 0; background: var(--bg); width: 28px; height: 28px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.mod-tools button:hover { background: var(--primary-soft); }
.details h4 small { font-weight: 600; font-size: 11px; }

/* communities */
.create-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.create-row .btn { padding: 10px 8px; font-size: 13px; }
.community-btn { background: linear-gradient(135deg, #F59E0B, #D97706); box-shadow: 0 8px 18px rgba(217, 119, 6, .3); }
.community-tag { color: #B45309 !important; font-weight: 800; font-size: 12px; }
.group-card.community { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); border: 1px solid #FDE68A; margin-bottom: 6px; }
[data-theme="dark"] .group-card.community { background: #2A2410; border-color: #5C4A12; }
.community-perks { display: grid; gap: 6px; background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; font-weight: 600; }

/* wallet: launch offer + power admin */
.pkg.offer { border-color: #F59E0B; background: linear-gradient(160deg, #FFFBEB, #FEF3C7); grid-column: span 2; }
[data-theme="dark"] .pkg.offer { background: #2A2410; }
.pkg.offer .amt { color: #B45309; font-size: 34px; }
.pkg .ribbon { position: absolute; top: -11px; inset-inline-start: 50%; transform: translateX(50%); background: linear-gradient(135deg, #EF4444, #F59E0B); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 99px; white-space: nowrap; box-shadow: 0 4px 10px rgba(239, 68, 68, .3); }
.pkg .old-price { text-decoration: line-through; color: var(--muted); font-size: 12px; margin-inline-end: 6px; }
.pkg.used { opacity: .5; cursor: not-allowed; }
.power-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #EEF2FF, #E0E7FF); border: 1px solid #C7D2FE; }
[data-theme="dark"] .power-card { background: #1E2147; border-color: #3B4290; }
.power-card .p-ic { font-size: 40px; }
.power-card .meta { flex: 1; }
.power-card small { display: block; color: var(--muted); line-height: 1.7; }

/* ---------- admin panel ---------- */
.admin-page { max-width: 1240px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; margin-bottom: 16px; }
.admin-tabs a { padding: 10px 16px; border-radius: 99px; color: var(--muted); font-weight: 700; font-size: 14px; }
.admin-tabs a.on { background: var(--primary-soft); color: var(--primary); }
.flash { padding: 12px 18px; margin-bottom: 14px; border-inline-start: 4px solid var(--primary); }
.stat { position: relative; }
.stat .stat-ic { position: absolute; top: 14px; inset-inline-end: 16px; font-size: 22px; opacity: .8; }
.chart { width: 100%; height: auto; display: block; margin: 6px 0 10px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--muted); stroke-opacity: .4; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.chart .bar path { fill: var(--primary); }
.chart .bar .hit { fill: transparent; }
.chart .bar:hover path { fill: var(--primary-2); }
.chart .bar:hover .hit { fill: var(--primary-soft); fill-opacity: .4; }
.table-wrap { overflow-x: auto; }
.admin-table .input { padding: 7px 10px; border-radius: 10px; min-width: 90px; }
.admin-table .input.num { min-width: 70px; width: 100px; }
.admin-table tr.dim { opacity: .5; }
.u-cell { display: flex; gap: 8px; align-items: center; }
.u-cell img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.u-cell small { display: block; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip.good { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.chip.bad { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.inline-form { display: flex; gap: 4px; }
.search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.live-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg); margin-bottom: 6px; }
.live-row .meta { flex: 1; }
.live-row small { display: block; color: var(--muted); }
details summary { cursor: pointer; font-size: 13px; }

@media (max-width: 560px) {
  #voice-dock { left: 10px; right: 10px; width: auto; bottom: 74px; }
  .pkg.offer { grid-column: 1 / -1; }
}

/* ---------- سمسم coin logo ---------- */
.coin-logo { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .3)); animation: coinSpin 8s ease-in-out infinite; }
@keyframes coinSpin { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(-12deg) scale(1.04); } }
.wallet-mini { position: relative; overflow: hidden; }
.wm-logo { position: absolute; width: 74px; height: 74px; inset-inline-end: -10px; top: -8px; opacity: .9; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.dd-logo { width: 30px; height: 30px; object-fit: contain; }
.pkg-logo { width: 34px; height: 34px; object-fit: contain; display: block; margin: 0 auto 4px; }
.pkg.offer .pkg-logo { width: 46px; height: 46px; }

/* admin: login info */
.login-cell { min-width: 220px; font-size: 13px; line-height: 1.7; }
.login-cell .ip { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.login-log summary { color: var(--primary); font-weight: 700; margin-top: 4px; }
.admin-table.mini { margin-top: 6px; background: var(--bg); border-radius: 12px; }
.admin-table.mini th, .admin-table.mini td { padding: 5px 6px; }
.admin-table tr.failed td { color: var(--danger); }

/* admin: reports */
.reports-list { display: grid; gap: 10px; }
.report-card { border: 1px solid var(--line); border-inline-start: 4px solid #EF4444; border-radius: 16px; padding: 14px; background: var(--surface); display: grid; gap: 10px; }
.rc-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-body { display: grid; gap: 6px; font-size: 14px; }
.rc-body blockquote { margin: 0; padding: 10px 14px; background: var(--bg); border-radius: 12px; border-inline-start: 3px solid var(--muted); white-space: pre-wrap; }
.rc-details { background: #FFFBEB; border-radius: 10px; padding: 8px 12px; }
[data-theme="dark"] .rc-details { background: #2A2410; }
.admin-tabs a { position: relative; }
