* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #070a14;
    --glass: rgba(255, 255, 255, 0.055);
    --glass-2: rgba(255, 255, 255, 0.03);
    --stroke: rgba(255, 255, 255, 0.1);
    --stroke-strong: rgba(255, 255, 255, 0.18);
    --text: #e9ecfa;
    --muted: #8f96b8;
    --grad-1: #7c5cff;
    --grad-2: #00d4ff;
    --grad-3: #ff6ec7;
    --accent: linear-gradient(120deg, #7c5cff, #00d4ff);
    --accent-warm: linear-gradient(120deg, #ff6ec7, #7c5cff);
    --success: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
    --info: #38bdf8;
    --radius: 20px;
    --radius-sm: 13px;
    --sidebar-w: 276px;
    --glow: 0 8px 30px rgba(124, 92, 255, 0.35);
}
html { scroll-behavior: smooth; }
body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.85;
    min-height: 100vh;
    overflow-x: hidden;
}
::selection { background: rgba(124, 92, 255, 0.45); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(#7c5cff, #00d4ff); border-radius: 20px; }
a { color: #9fb4ff; text-decoration: none; transition: .2s; }
a:hover { color: #c4d2ff; }

.bg-fx { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-fx::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: float 18s ease-in-out infinite alternate; }
.orb-1 { width: 560px; height: 560px; background: #7c5cff; top: -180px; right: -120px; }
.orb-2 { width: 480px; height: 480px; background: #0891b2; bottom: -160px; left: -100px; animation-delay: -6s; }
.orb-3 { width: 360px; height: 360px; background: #be3a8f; top: 40%; left: 35%; opacity: .3; animation-delay: -12s; }
@keyframes float { to { transform: translate(-40px, 50px) scale(1.12); } }

.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w);
    position: fixed; top: 14px; bottom: 14px; right: 14px; z-index: 60;
    display: flex; flex-direction: column;
    background: linear-gradient(170deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border: 1px solid var(--stroke);
    border-radius: 24px;
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.brand { display: flex; align-items: center; gap: 13px; padding: 24px 22px 20px; }
.brand-logo {
    width: 46px; height: 46px; border-radius: 15px; flex-shrink: 0;
    background: var(--accent); display: flex; align-items: center; justify-content: center;
    font-size: 22px; box-shadow: var(--glow);
    animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow { 50% { box-shadow: 0 8px 40px rgba(0, 212, 255, .5); } }
.brand-name { font-weight: 800; font-size: 15.5px; background: linear-gradient(120deg, #fff, #b9c6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-tag { font-size: 10.5px; color: var(--muted); }
.menu { flex: 1; padding: 4px 14px; overflow-y: auto; }
.menu-label { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1px; margin: 16px 12px 7px; opacity: .8; }
.menu a {
    display: flex; align-items: center; gap: 12px; padding: 11px 15px; margin-bottom: 3px;
    border-radius: 14px; color: #b9c0dd; font-weight: 500; font-size: 13.8px;
    border: 1px solid transparent; position: relative; transition: .22s;
}
.menu a i { font-style: normal; font-size: 17px; width: 22px; text-align: center; }
.menu a:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(-3px); }
.menu a.active {
    background: linear-gradient(120deg, rgba(124,92,255,.28), rgba(0,212,255,.14));
    border-color: rgba(124,92,255,.5); color: #fff; font-weight: 700;
    box-shadow: inset 0 0 24px rgba(124,92,255,.15), 0 4px 20px rgba(124,92,255,.2);
}
.menu a.active::before { content: ''; position: absolute; right: -15px; top: 22%; bottom: 22%; width: 4px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 12px var(--grad-1); }
.sidebar-footer { padding: 14px; }
.user-chip { display: flex; align-items: center; gap: 11px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); border-radius: 17px; padding: 11px 13px; }
.avatar { width: 40px; height: 40px; border-radius: 13px; background: var(--accent-warm); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; box-shadow: 0 4px 16px rgba(255,110,199,.35); }
.user-info { flex: 1; min-width: 0; }
.uname { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urole { font-size: 10.5px; color: var(--muted); }
.logout-btn { width: 34px; height: 34px; border-radius: 11px; background: rgba(251,113,133,.15); color: #fb7185; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.logout-btn:hover { background: rgba(251,113,133,.3); color: #ffb3bf; transform: rotate(90deg); }

.content { flex: 1; margin-right: calc(var(--sidebar-w) + 28px); padding: 14px 24px 0 24px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex; align-items: center; gap: 16px; padding: 15px 24px; margin-bottom: 22px;
    background: linear-gradient(170deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
    border: 1px solid var(--stroke); border-radius: 20px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    position: sticky; top: 14px; z-index: 40;
}
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { width: 22px; height: 2.5px; background: var(--text); border-radius: 4px; transition: .3s; }
.page-title { font-size: 18px; font-weight: 800; flex: 1; background: linear-gradient(120deg, #fff 30%, #a8b8ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.topbar-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); padding: 7px 15px; border-radius: 12px; }
.page-body { flex: 1; max-width: 1180px; width: 100%; animation: page-in .5s cubic-bezier(.2,.8,.2,1); }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
.app-footer { text-align: center; padding: 24px; color: var(--muted); font-size: 12px; }
.heart { color: #fb7185; animation: beat 1.4s ease infinite; display: inline-block; }
@keyframes beat { 15% { transform: scale(1.3); } 30% { transform: scale(1); } }
.overlay { display: none; position: fixed; inset: 0; background: rgba(4,6,14,.65); z-index: 55; backdrop-filter: blur(4px); }

.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, rgba(124,92,255,.3), rgba(0,212,255,.12) 55%, rgba(255,110,199,.14));
    border: 1px solid rgba(124,92,255,.4); border-radius: var(--radius);
    padding: 32px 36px; margin-bottom: 24px;
    backdrop-filter: blur(20px);
}
.hero::after { content: ''; position: absolute; top: -60%; left: -20%; width: 55%; height: 220%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.09), transparent); transform: rotate(18deg); animation: shine 5s ease-in-out infinite; }
@keyframes shine { 0%, 60%, 100% { left: -40%; } 30% { left: 110%; } }
.hero h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.hero p { color: #c8cfec; font-size: 13.5px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-box {
    background: linear-gradient(170deg, var(--glass), var(--glass-2));
    border: 1px solid var(--stroke); border-radius: var(--radius);
    padding: 20px 22px; display: flex; align-items: center; gap: 15px;
    backdrop-filter: blur(18px); transition: .3s;
    position: relative; overflow: hidden;
}
.stat-box::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 2px; background: var(--accent); opacity: 0; transition: .3s; }
.stat-box:hover { transform: translateY(-5px); border-color: var(--stroke-strong); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.stat-box:hover::before { opacity: 1; }
.stat-box .s-icon { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; background: rgba(124,92,255,.16) !important; border: 1px solid rgba(124,92,255,.3); }
.stat-box .num { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-box .label { font-size: 12px; color: var(--muted); }

.card {
    background: linear-gradient(170deg, var(--glass), var(--glass-2));
    border: 1px solid var(--stroke); border-radius: var(--radius);
    padding: 26px 28px; margin-bottom: 22px;
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.card h2 { font-size: 16px; font-weight: 800; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--stroke); display: flex; align-items: center; gap: 9px; }
.card h3 { font-size: 14px; color: #b9c3e8; margin: 22px 0 12px; display: flex; align-items: center; gap: 7px; }

.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.messenger-card {
    background: linear-gradient(170deg, var(--glass), var(--glass-2));
    border: 1px solid var(--stroke); border-radius: var(--radius);
    padding: 26px 20px; text-align: center; color: var(--text);
    backdrop-filter: blur(18px); transition: .3s; position: relative; overflow: hidden; display: block;
}
.messenger-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; opacity: .8; }
.mc-telegram::before { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.mc-bale::before { background: linear-gradient(90deg, #4ade80, #16a34a); }
.mc-eitaa::before { background: linear-gradient(90deg, #fbbf24, #d97706); }
.mc-rubika::before { background: linear-gradient(90deg, #fb7185, #e11d48); }
.messenger-card:hover { transform: translateY(-6px) scale(1.015); border-color: var(--stroke-strong); box-shadow: 0 18px 44px rgba(0,0,0,.45); color: var(--text); }
.messenger-card .m-icon { font-size: 40px; margin-bottom: 8px; filter: drop-shadow(0 6px 16px rgba(0,0,0,.4)); }
.messenger-card .m-title { font-weight: 800; font-size: 15.5px; }
.messenger-card .m-count { font-size: 12px; color: var(--muted); margin-top: 4px; }

label { display: block; font-weight: 600; font-size: 13px; color: #b9c3e8; margin-bottom: 8px; }
input[type=text], input[type=password], input[type=email], input[type=url], select, textarea {
    width: 100%; padding: 12px 16px; color: var(--text);
    background: rgba(10, 14, 28, .55); border: 1.5px solid var(--stroke);
    border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; transition: .25s;
}
input::placeholder, textarea::placeholder { color: #5c6488; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--grad-1); box-shadow: 0 0 0 4px rgba(124,92,255,.18), 0 0 24px rgba(124,92,255,.12); background: rgba(10,14,28,.8); }
select option { background: #12172b; color: var(--text); }
input.ltr { direction: ltr; text-align: left; }
textarea { resize: vertical; min-height: 120px; line-height: 1.9; }
input:disabled { opacity: .55; }
.field { margin-bottom: 18px; }
.hint { font-size: 11.8px; color: var(--muted); margin-top: 7px; line-height: 1.9; }
.hint code, .guide-box code { background: rgba(124,92,255,.15); border: 1px solid rgba(124,92,255,.25); color: #c9baff; padding: 2px 8px; border-radius: 7px; direction: ltr; display: inline-block; font-size: 11.5px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 24px; border: 1px solid transparent; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
    transition: .25s; position: relative;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 12px 40px rgba(0,212,255,.4); }
.btn-success { background: linear-gradient(120deg, #10b981, #34d399); color: #04140d; box-shadow: 0 8px 26px rgba(52,211,153,.3); }
.btn-danger { background: linear-gradient(120deg, #e11d48, #fb7185); color: #fff; box-shadow: 0 8px 26px rgba(251,113,133,.28); }
.btn-info { background: linear-gradient(120deg, #0284c7, #38bdf8); color: #fff; box-shadow: 0 8px 26px rgba(56,189,248,.28); }
.btn-light { background: rgba(255,255,255,.07); border-color: var(--stroke); color: var(--text); }
.btn-light:hover { background: rgba(255,255,255,.13); border-color: var(--stroke-strong); }
.btn-sm { padding: 7px 15px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }

.alert { padding: 13px 18px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; backdrop-filter: blur(10px); }
.alert-success { background: rgba(52,211,153,.13); color: #6ee7b7; border: 1px solid rgba(52,211,153,.35); }
.alert-danger { background: rgba(251,113,133,.13); color: #fda4af; border: 1px solid rgba(251,113,133,.35); }
.alert-info { background: rgba(56,189,248,.11); color: #7dd3fc; border: 1px solid rgba(56,189,248,.3); }
.alert-warning { background: rgba(251,191,36,.11); color: #fcd34d; border: 1px solid rgba(251,191,36,.3); }
.alert a { text-decoration: underline; }

.badge { display: inline-block; padding: 4px 13px; border-radius: 30px; font-size: 11px; font-weight: 700; }
.badge-success { background: rgba(52,211,153,.15); color: #6ee7b7; border: 1px solid rgba(52,211,153,.35); }
.badge-danger { background: rgba(251,113,133,.15); color: #fda4af; border: 1px solid rgba(251,113,133,.35); }
.badge-muted { background: rgba(255,255,255,.07); color: var(--muted); border: 1px solid var(--stroke); }

.table-wrap { overflow-x: auto; border-radius: 15px; border: 1px solid var(--stroke); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.data th { background: rgba(124,92,255,.1); padding: 13px 16px; text-align: right; font-weight: 700; color: #c4baff; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
table.data td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tr { transition: .2s; }
table.data tr:hover td { background: rgba(255,255,255,.035); }

.acc-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: rgba(255,255,255,.03); border: 1px solid var(--stroke); border-radius: 17px; margin-bottom: 12px; transition: .25s; flex-wrap: wrap; }
.acc-item:hover { border-color: rgba(124,92,255,.45); background: rgba(124,92,255,.06); transform: translateX(-4px); }
.acc-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; border: 1px solid var(--stroke); }
.acc-main { flex: 1; min-width: 160px; }
.acc-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-sub { font-size: 11.5px; color: var(--muted); direction: ltr; text-align: right; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.check-card { display: flex; align-items: center; gap: 13px; padding: 13px 16px; background: rgba(255,255,255,.03); border: 1.5px solid var(--stroke); border-radius: 15px; cursor: pointer; transition: .22s; margin-bottom: 10px; }
.check-card:hover { border-color: var(--stroke-strong); transform: translateX(-3px); }
.check-card input { width: 19px; height: 19px; accent-color: var(--grad-1); cursor: pointer; flex-shrink: 0; }
.check-card.checked { border-color: var(--grad-1); background: linear-gradient(120deg, rgba(124,92,255,.16), rgba(0,212,255,.07)); box-shadow: 0 0 22px rgba(124,92,255,.14); }
.check-card .cc-title { font-weight: 700; font-size: 13.5px; }
.check-card .cc-sub { font-size: 11px; color: var(--muted); }

.tab-nav { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-nav button { padding: 10px 22px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); border-radius: 13px; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: .25s; }
.tab-nav button:hover { color: var(--text); border-color: var(--stroke-strong); }
.tab-nav button.active { background: var(--accent); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .35s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.guide-box { background: rgba(124,92,255,.07); border: 1px solid rgba(124,92,255,.25); border-right: 4px solid var(--grad-1); padding: 18px 22px; border-radius: 15px; margin: 16px 0; }
.guide-box h4 { color: #c9baff; font-size: 14px; margin-bottom: 10px; }
.guide-box ol, .guide-box ul { padding-right: 20px; }
.guide-box li { margin-bottom: 9px; font-size: 12.8px; line-height: 2.1; color: #c3cae6; }

.test-result { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); display: none; font-size: 12.8px; }
.test-result.show { display: block; animation: fadeIn .3s; }
.guid-pick-btn { margin: 4px 2px; }
.loading { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.3); border-radius: 50%; border-top-color: #fff; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-bg { display: none; position: fixed; inset: 0; background: rgba(4,6,14,.75); z-index: 100; align-items: flex-start; justify-content: center; padding: 30px 18px; backdrop-filter: blur(6px); overflow-y: auto; }
.modal-bg.show { display: flex; }
.modal { background: linear-gradient(170deg, #171d36, #0f1426); border: 1px solid var(--stroke-strong); border-radius: 22px; padding: 28px; width: 100%; max-width: 580px; box-shadow: 0 30px 90px rgba(0,0,0,.6); animation: modal-in .35s cubic-bezier(.2,.8,.2,1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-head h3 { font-size: 16px; font-weight: 800; }
.modal-close { background: rgba(255,255,255,.08); border: 1px solid var(--stroke); color: var(--text); width: 36px; height: 36px; border-radius: 12px; cursor: pointer; font-size: 15px; transition: .25s; }
.modal-close:hover { background: rgba(251,113,133,.2); color: #fda4af; transform: rotate(90deg); }

.send-result-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px; }

.editor-shell { border: 1.5px solid var(--stroke); border-radius: var(--radius-sm); overflow: hidden; background: rgba(10,14,28,.55); transition: .25s; }
.editor-shell:focus-within { border-color: var(--grad-1); box-shadow: 0 0 0 4px rgba(124,92,255,.18); }
.ql-toolbar.ql-snow { border: none !important; border-bottom: 1px solid var(--stroke) !important; background: rgba(255,255,255,.04); direction: ltr; }
.ql-container.ql-snow { border: none !important; font-family: Vazirmatn, Tahoma, sans-serif !important; font-size: 14.5px; direction: rtl; }
.ql-editor { min-height: 190px; color: var(--text); line-height: 2; }
.ql-editor.ql-blank::before { color: #5c6488; font-style: normal; right: 15px; left: auto; }
.ql-snow .ql-stroke { stroke: #a9b1d6 !important; }
.ql-snow .ql-fill { fill: #a9b1d6 !important; }
.ql-snow .ql-picker { color: #a9b1d6 !important; }
.ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: #00d4ff !important; }
.ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: #00d4ff !important; }
.ql-snow.ql-toolbar button { border-radius: 7px; }
.ql-snow.ql-toolbar button.ql-active { background: rgba(0,212,255,.14); }
.ql-snow .ql-tooltip { background: #171d36; border: 1px solid var(--stroke-strong); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.5); border-radius: 12px; direction: ltr; }
.ql-snow .ql-tooltip input[type=text] { background: rgba(10,14,28,.8); border: 1px solid var(--stroke); color: var(--text); border-radius: 8px; }
.ql-snow .ql-tooltip a { color: #7dd3fc; }
.ql-editor code { background: rgba(124,92,255,.2); color: #c9baff; border-radius: 5px; padding: 1px 5px; }

.img-method { display: flex; gap: 8px; margin-bottom: 14px; }
.img-method button { flex: 1; }
.upload-zone { border: 2px dashed rgba(124,92,255,.4); border-radius: 15px; padding: 26px 18px; text-align: center; cursor: pointer; transition: .25s; background: rgba(124,92,255,.05); }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--grad-2); background: rgba(0,212,255,.07); }
.upload-zone .uz-icon { font-size: 34px; margin-bottom: 6px; }
.upload-zone .uz-text { font-size: 13px; font-weight: 700; color: #c3cae6; }
.upload-zone .uz-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.img-preview { display: none; position: relative; border-radius: 15px; overflow: hidden; border: 1px solid var(--stroke-strong); }
.img-preview.show { display: block; animation: fadeIn .3s; }
.img-preview img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.img-preview .remove-img { position: absolute; top: 10px; left: 10px; background: rgba(4,6,14,.75); border: 1px solid var(--stroke-strong); color: #fda4af; width: 34px; height: 34px; border-radius: 11px; cursor: pointer; font-size: 14px; backdrop-filter: blur(8px); transition: .2s; }
.img-preview .remove-img:hover { background: rgba(251,113,133,.35); color: #fff; }
.img-preview .img-badge { position: absolute; bottom: 10px; right: 10px; background: rgba(4,6,14,.75); border: 1px solid var(--stroke); color: #c3cae6; padding: 4px 12px; border-radius: 20px; font-size: 10.5px; backdrop-filter: blur(8px); }

.swal2-popup { background: linear-gradient(170deg, #171d36, #0f1426) !important; color: var(--text) !important; border: 1px solid var(--stroke-strong) !important; border-radius: 22px !important; font-family: Vazirmatn, Tahoma, sans-serif !important; }
.swal2-title { color: var(--text) !important; font-size: 19px !important; }
.swal2-html-container { color: #b9c0dd !important; font-size: 14px !important; }
.swal2-confirm { background: var(--accent) !important; border-radius: 12px !important; box-shadow: var(--glow) !important; font-family: inherit !important; }
.swal2-cancel { background: rgba(255,255,255,.09) !important; border: 1px solid var(--stroke) !important; border-radius: 12px !important; font-family: inherit !important; }
.swal2-toast { background: #171d36 !important; border: 1px solid var(--stroke-strong) !important; box-shadow: 0 14px 44px rgba(0,0,0,.55) !important; }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; }
.auth-page::before, .auth-page::after { content: ''; position: fixed; border-radius: 50%; filter: blur(100px); z-index: -1; }
.auth-page::before { width: 520px; height: 520px; background: rgba(124,92,255,.4); top: -160px; right: -120px; }
.auth-page::after { width: 460px; height: 460px; background: rgba(0,212,255,.25); bottom: -160px; left: -100px; }
.auth-box { background: linear-gradient(170deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); border: 1px solid var(--stroke-strong); border-radius: 26px; padding: 42px 38px; max-width: 440px; width: 100%; backdrop-filter: blur(26px); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.auth-box h1 { text-align: center; font-size: 21px; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.auth-link { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }

@media (max-width: 1060px) {
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
    .sidebar { transform: translateX(110%); top: 0; bottom: 0; right: 0; border-radius: 24px 0 0 24px; }
    .sidebar.open { transform: translateX(0); }
    .overlay.show { display: block; }
    .content { margin-right: 0; padding: 12px 12px 0; }
    .menu-toggle { display: flex; }
    .topbar { padding: 13px 16px; top: 10px; }
    .topbar-date { display: none; }
    .hero { padding: 24px 20px; }
    .card { padding: 20px 16px; }
    .acc-actions { width: 100%; }
    .acc-actions .btn { flex: 1; }
}
@media (max-width: 480px) {
    body { font-size: 14px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
    .stat-box { flex-direction: column; text-align: center; gap: 8px; padding: 16px 10px; }
    .tab-nav button { flex: 1; padding: 10px 12px; font-size: 12.5px; }
    .page-title { font-size: 16px; }
}

.brand-logo i, .avatar-icon { font-size: 20px; }
.menu a i { font-size: 16px; width: 22px; text-align: center; }
.logout-btn i { font-size: 15px; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); font-size: 19px; padding: 6px 8px; }
.topbar-date i { margin-left: 4px; }

.msg-logo, .msg-logo-lg, .msg-logo-md {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}
.msg-logo { width: 22px; height: 22px; max-width: 22px; max-height: 22px; }
.msg-logo-md { width: 30px; height: 30px; max-width: 30px; max-height: 30px; }
.msg-logo-lg { width: 40px; height: 40px; max-width: 40px; max-height: 40px; }

.m-icon-wrap {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.m-icon-wrap .msg-logo-lg {
    width: auto;
    height: 40px;
    max-width: 52px;
    max-height: 40px;
}

.acc-ico {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--stroke);
    overflow: hidden;
}
.acc-ico .msg-logo {
    width: auto;
    height: 22px;
    max-width: 26px;
    max-height: 22px;
}

.cc-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--stroke);
    flex-shrink: 0;
    overflow: hidden;
}
.cc-icon .msg-logo,
.cc-icon img {
    width: auto;
    height: 20px;
    max-width: 24px;
    max-height: 20px;
    object-fit: contain;
    filter: none;
}

.card h3 .msg-logo,
.tab-nav button .msg-logo,
table.data .msg-logo {
    height: 17px;
    width: auto;
    max-width: 20px;
    max-height: 17px;
    margin-left: 6px;
    position: relative;
    top: -1px;
}

.btn .msg-logo {
    height: 15px;
    width: auto;
    max-width: 18px;
    max-height: 15px;
    filter: none;
}

.stat-box .s-icon i { font-size: 21px; background: linear-gradient(120deg, #cfd8ff, #ffffff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.card h2 i, .card h3 i, .hero h2 i, .page-title i, .alert i, .btn i, .test-result i, .guide-box h4 i { font-size: .95em; }
.acc-ico { background: rgba(255,255,255,.04); }
.acc-ico img { width: 24px; height: 24px; }
.messenger-card .m-icon-wrap { height: 46px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.tab-nav button img { width: 18px; height: 18px; vertical-align: middle; margin-left: 6px; }
.check-card .cc-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); flex-shrink: 0; }
.check-card .cc-icon img { width: 22px; height: 22px; }
.check-card { align-items: center; }
.img-method button i { margin-left: 6px; }
.upload-zone .uz-icon i { font-size: 32px; color: #9fb4ff; }
.field label i, .guide-box h4 i { margin-left: 6px; }