body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f6f8fa;
    color: #333;
}
header {
    background: #004aad;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
header nav a {
    color: white;
    margin-left: 0;
    text-decoration: none;
    font-weight: bold;
}
main {
    text-align: center;
    padding: 50px 20px;
}
.btn {
    display: inline-block;
    background: #004aad;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
}
.hide {
    display: none;
}
#exportActionBox {
    margin-top: 15px;
    text-align: center;
}
#exportActionBox button {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 18px;
    margin: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s;
}
#exportActionBox button:hover {
    background: #218838;
}
#outputEmpty {
    color: #888;
    font-style: italic;
    padding: 30px 0;
}
#outputContainer {
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 22px 26px;
    max-height: 500px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.75;
    color: #2b2f36;
    letter-spacing: 0.1px;
}

/* ── 📖 MARKDOWN OXUNUŞ TIPOQRAFİYASI (#outputContainer daxilində) ── */
#outputContainer .md-h1,
#outputContainer .md-h2,
#outputContainer .md-h3,
#outputContainer .md-h4,
#outputContainer .md-h5,
#outputContainer .md-h6 {
    text-align: left;
    font-weight: 700;
    color: #123a7a;
    line-height: 1.35;
    margin: 20px 0 10px;
    white-space: normal;
}
#outputContainer .md-h1 { font-size: 24px; border-bottom: 2px solid #e3ebf7; padding-bottom: 8px; margin-top: 6px; }
#outputContainer .md-h2 { font-size: 20px; border-bottom: 1px solid #eef2f9; padding-bottom: 6px; }
#outputContainer .md-h3 { font-size: 17.5px; }
#outputContainer .md-h4 { font-size: 16px; color: #2b5aa6; }
#outputContainer .md-h5,
#outputContainer .md-h6 { font-size: 15px; color: #4a5a72; text-transform: uppercase; letter-spacing: 0.6px; }

#outputContainer .md-p {
    margin: 0 0 12px;
    white-space: pre-wrap;
}

#outputContainer .md-ul,
#outputContainer .md-ol {
    margin: 6px 0 14px;
    padding-left: 26px;
    white-space: normal;
}
#outputContainer .md-ul li,
#outputContainer .md-ol li {
    margin: 4px 0;
    line-height: 1.65;
}
#outputContainer .md-ul li::marker { color: #004aad; }
#outputContainer .md-ol li::marker { color: #004aad; font-weight: 600; }

#outputContainer .md-quote {
    margin: 12px 0;
    padding: 8px 16px;
    border-left: 4px solid #004aad;
    background: #f5f8ff;
    border-radius: 0 6px 6px 0;
    color: #44506a;
    font-style: italic;
    white-space: pre-wrap;
}

#outputContainer .md-hr {
    border: none;
    border-top: 1px solid #e0e7f2;
    margin: 18px 0;
}

#outputContainer .md-inline-code {
    background: #eef3fb;
    color: #123a7a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13.5px;
    white-space: nowrap;
}

#outputContainer .md-code-block {
    position: relative;
    background: #1e2430;
    color: #e6edf3;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 14px 0;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.55;
}
#outputContainer .md-code-block code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13.5px;
    white-space: pre;
}
#outputContainer .md-code-lang {
    position: absolute;
    top: 6px;
    right: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7d8da8;
}

#outputContainer a {
    color: #004aad;
    text-decoration: underline;
    text-underline-offset: 2px;
}
#outputContainer strong { font-weight: 700; color: #16233a; }
#outputContainer em { font-style: italic; color: #3a465e; }

/* ========== WORKSPACE 2-COLUMN LAYOUT ========== */
.workspace-container {
    max-width: 1470px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 600px;
    gap: 24px;
    padding: 0 20px 40px;
    align-items: start;
}

.main-content {
    min-width: 0;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    /* Sadəcə qab — sticky yalnız daxildeki .alvio-card-da tətbiq olunur.
       İkiqat sticky toqquşma yaradırdı, ona görə buradan götürüldü. */
}

.sidebar-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 15px;
    color: #111827;
}

.sidebar-card .muted {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

/* ============================================================
   ALVIO ASSISTANT — sağ sütunu tam əhatə edən modern chat kartı
   (QtoQ üslubunda səliqəli, oxunaqlı)
   ============================================================ */
.alvio-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    position: sticky;        /* Scroll zamanı gözdən itmir */
    top: 20px;
    padding: 20px;
}.alvio-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.alvio-card .muted {
    font-size: 12.5px;
    line-height: 1.6;
    margin-bottom: 12px;
}

#alvioChatBox {
    height: 480px;           /* Sabit optimal hündürlük — qızıl orta */
    max-height: 480px;       /* Səhifə boyu uzanmır, sabit qalır */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    overflow-y: auto;
    background: #f9fafb;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mesaj baloncukları — aydın, oxunaqlı, bir-birinə sıxlaşmayan */
#alvioChatBox > div {
    padding: 12px 16px;
    border-radius: 14px;
    margin: 0;
    line-height: 1.7;
    max-width: 92%;
    word-wrap: break-word;
    font-size: 14px;
}

#alvioChatBox .alvio-msg {
    color: #1e40af;
    background: #eef4ff;
    border: 1px solid #dbe7ff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#alvioChatBox .user-msg {
    text-align: left;
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #c7f0df;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Yazı daxili abzaslar sıxlaşmasın */
#alvioChatBox .alvio-msg p,
#alvioChatBox .user-msg p {
    margin: 0 0 8px;
}

#alvioChatBox .alvio-msg p:last-child,
#alvioChatBox .user-msg p:last-child {
    margin-bottom: 0;
}

.alvio-input-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

#alvioInput {
    font-size: 13px;
    padding: 10px 12px;
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-width: 0;
    box-sizing: border-box;
}

#alvioInput:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#alvioSendBtn {
    margin: 0;
    padding: 10px 18px;
    font-size: 13px;
    background: #2563eb;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: background 0.2s ease;
}

#alvioSendBtn:hover {
    background: #1d4ed8;
}

/* ============================================================
   AD SPACE — kompakt, səliqəli anons kartı
   (Sol sütunun ən aşağısında — formanın üstünü tutmur)
   ============================================================ */
.ad-zone-wide {
    margin: 20px 0 0 0;
    background: linear-gradient(135deg, #eef4ff 0%, #dfe9fb 100%);
    border: 1px dashed #b8cdec;
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.ad-zone-wide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(0, 74, 173, 0.06), transparent 70%);
    pointer-events: none;
}

.ad-zone-wide:hover {
    border-color: #004aad;
    box-shadow: 0 6px 18px rgba(0, 74, 173, 0.12);
}

.ad-zone-wide-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.ad-zone-tag {
    font-size: 10px;
    color: #8ea3bd;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: bold;
}

.ad-zone-title {
    color: #004aad;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.ad-zone-desc {
    font-size: 12.5px;
    color: #4b5563;
    line-height: 1.55;
    margin: 2px 0 8px;
}

.ad-zone-wide button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: bold;
    margin: 0;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
}

.ad-zone-wide button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.35);
}

/* ── Aktiv reklam gələndə: premium banner görünüşü (JS idarə edir) ──
   JS .ad-zone-has-ad sinfini .ad-zone-wide-inner-ə əlavə edir.
   Bu qaydalar placeholder-i bannerə çevirir və dağılmanın qarşısını alır. */
.ad-zone-wide.ad-zone-active,
.ad-zone-wide-inner.ad-zone-has-ad {
    padding: 0;
    gap: 0;
}
.ad-zone-wide.ad-zone-active {
    border-style: solid;
    border-color: #004aad;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 74, 173, 0.14);
}
/* Banner linki — bütün kartı əhatə edir */
.ad-zone-wide .ad-zone-link {
    display: block;
    width: 100%;
    text-decoration: none;
    line-height: 0;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}
/* Banner şəkli — tam en, sabit nisbət, kəsilmiş görünüş */
.ad-zone-wide .ad-zone-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.35s ease;
}
.ad-zone-wide .ad-zone-link:hover .ad-zone-img {
    transform: scale(1.02);
}
/* Banner başlığı — şəkilsiz halda da səliqəli görünsün */
.ad-zone-wide .ad-zone-link .ad-zone-title {
    display: block;
    padding: 14px 18px;
    color: #004aad;
    font-size: 15px;
    letter-spacing: 0.2px;
    line-height: 1.4;
}
/* Şəkil varsa başlığı şəklin üzərinə qoy (overlay) */
.ad-zone-wide .ad-zone-link .ad-zone-img + .ad-zone-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0));
    padding: 26px 18px 14px;
}
/* Aktiv reklamda "Sponsored Content" etiketi yuxarı solda otursun */
.ad-zone-wide.ad-zone-active .ad-zone-tag {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 3;
    margin: 0;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #ffffff;
    font-size: 9.5px;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

@media (max-width: 900px) {
    .workspace-container {
        grid-template-columns: 1fr;
    }
    /* Mobil: Alvio kartı çox uzun olmasın, rahat oxunan hündürlük */
    .alvio-card {
        position: static;
    }
    #alvioChatBox {
        height: 380px;
        max-height: 60vh;
    }
    .ad-zone-wide {
        padding: 16px 14px;
    }
    .ad-zone-desc {
        font-size: 12.5px;
    }
}

/* ================================================================
   HEADER NAV DROPDOWN PANELLƏRİ (About Us & Pricing)
   ================================================================ */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-panel {
    display: none; /* Susmaya görə tam gizli — menyunu sıxmaması üçün */
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    margin-top: 10px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 16px;
}

.nav-dropdown-panel.active {
    display: block !important; /* Yalnız aktiv olduqda açılır */
}

/* =============================================================
   ABOUT US DROPDOWN — yığcam card (Micro-UX Polish)
   ============================================================= */
#dropdownAbout {
    width: 420px;
    max-width: 90vw;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

#dropdownAbout h4 {
    font-size: 15px !important;
}

#dropdownAbout p {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
}

/* About daxilindəki statistik badge-lər */
#dropdownAbout .about-stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

#dropdownAbout .about-stat {
    text-align: center;
    flex: 1;
    min-width: 90px;
}

/* =============================================================
   ADVERTISE WITH US DROPDOWN — LƏĞV EDİLDİ (16.11.2026)
   Artıq ayrı /advertise səhifəsidir — köhnə popup stilləri silindi.
   ============================================================= */

/* =============================================================
   PRICING — CASCADING (nested) CONTEXT MENU
   Pricing ▼ → şaquli siyahı → sola açılan alt-panellər
   ============================================================= */
#dropdownPricing {
    width: 260px;
    max-width: 92vw;
    padding: 14px 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
    /* Panel menyu düyməsinin altından sağa doğru oturur ki,
       sola açılan alt-panellər üçün yer təmin olunsun */
    left: auto;
    right: 0;
}

/* Şaquli siyahı (1-ci səviyyə) */
.pricing-cascade {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pc-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.pc-item:hover {
    background: #eef4ff;
    color: #004aad;
}

.pc-item-popular .pc-label {
    color: #004aad;
}

.pc-arrow {
    font-size: 15px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.15s ease;
    /* Alt-panellər sola açıldığı üçün ox da sola baxır */
    transform: scaleX(-1);
    display: inline-block;
}

.pc-item:hover > .pc-arrow {
    transform: scaleX(-1) translateX(2px);
    color: #004aad;
}

/* ===== Sola açılan alt-panel (2-ci / 3-cü səviyyə) =====
   Sol tərəfə açılır ki, ekranın sağ kənarından kənara çıxmasın. */
.pc-subpanel {
    display: none;
    position: absolute;
    top: -6px;
    right: 100%;
    left: auto;
    margin-right: 6px;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
    z-index: 1001;
    cursor: default;
    white-space: normal;
}

/* Hover ilə açılır (təzə açılan alt-panel üstündə qalır) */
.pc-item:hover > .pc-subpanel {
    display: block;
}

.pc-subpanel-title {
    font-size: 15px;
    font-weight: bold;
    color: #004aad;
    margin-bottom: 8px;
}

.pc-price {
    font-size: 24px;
    font-weight: bold;
    color: #111827;
    margin: 4px 0;
}

.pc-price span {
    font-size: 12px;
    color: #6b7280;
}

.pc-tokens {
    font-size: 12px;
    color: #059669;
    font-weight: bold;
    margin-bottom: 8px;
}

.pc-desc {
    font-size: 11.5px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 12px;
}

.pc-btn {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    border: none;
}

.pc-btn-primary {
    background: linear-gradient(135deg, #004aad, #0066ff);
    color: #fff;
}

.pc-btn-light {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.pc-badge {
    display: inline-block;
    background: #004aad;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}

/* Extra Tokens alt-siyahısı üçün panel daxili görünüş */
.pc-submenu-list .pricing-cascade {
    margin-top: 6px;
}

.pc-submenu-list .pc-item {
    padding: 8px 10px;
    font-size: 13px;
}

/* Kiçik ekran: alt-panellər sağa yox, aşağı açılsın */
@media (max-width: 768px) {
    #dropdownPricing {
        width: 92vw;
    }
    .pc-subpanel {
        position: static;
        display: none;
        left: auto;
        top: auto;
        margin: 6px 0 0;
        min-width: 0;
    }
    .pc-item:hover > .pc-subpanel {
        display: block;
    }
}

/* ================================================================
   ⚡ TOKEN FUEL GAUGE — userHeaderBar daxilində zövqlü vizual göstərici
   ================================================================ */
.fuel-gauge {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
    max-width: 260px;
}

.fuel-gauge-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.fuel-label {
    font-size: 11px;
    font-weight: bold;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.fuel-value {
    font-size: 13px;
    font-weight: bold;
    color: #111827;
}

.fuel-bar-track {
    width: 100%;
    height: 9px;
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.fuel-bar-fill {
    height: 100%;
    width: 100%;
    border-radius: 20px;
    transition: width 0.5s ease, background 0.4s ease;
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* 🔴 Aşağı balans (< 1000 token) — qırmızı təcili rejim */
.fuel-bar-fill.fuel-low {
    background: linear-gradient(90deg, #dc2626, #f87171);
    animation: fuelPulse 1.4s ease-in-out infinite;
}

/* 🟠 Orta balans (faiz < 30%) — narıncı xəbərdarlıq */
.fuel-bar-fill.fuel-mid {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* 🟢 Yaxşı balans — yaşıl/mavi gradient */
.fuel-bar-fill.fuel-ok {
    background: linear-gradient(90deg, #004aad, #10b981);
}

@keyframes fuelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.fuel-gauge-bottom {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.fuel-percent {
    font-size: 12px;
    font-weight: bold;
    color: #004aad;
}

.fuel-limit {
    font-size: 10.5px;
    color: #9ca3af;
}

/* ================================================================
   ⚠️ LOW TOKEN WARNING — token < 1000 olduqda avtomatik açılan zərif panel
   ================================================================ */
.low-token-warning {
    max-width: 780px;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.10);
    animation: ltwSlideIn 0.35s ease;
}

@keyframes ltwSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ltw-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ltw-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.ltw-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ltw-text strong {
    font-size: 14px;
    color: #b91c1c;
}

.ltw-text span {
    font-size: 12.5px;
    color: #7f1d1d;
    line-height: 1.45;
}

.ltw-btn {
    flex-shrink: 0;
    margin: 0;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12.5px;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.28);
}

.ltw-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    box-shadow: 0 5px 14px rgba(220, 38, 38, 0.4);
}

/* Mobil: Fuel Gauge və Warning rahat oxunsun */
@media (max-width: 768px) {
    #userHeaderBar {
        flex-wrap: wrap;
        gap: 12px;
    }
    .fuel-gauge {
        min-width: 160px;
        max-width: 100%;
        flex: 1;
    }
    .ltw-content {
        flex-wrap: wrap;
    }
    .ltw-btn {
        width: 100%;
    }
}

/* ================================================================
   📊 PERSONAL DASHBOARD — 4 Quick Stats Widget kartı (userHeaderBar)
   ================================================================ */
.user-header-bar {
    max-width: 1030px;
    margin: 0 auto 20px auto;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.qh-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.qh-card:hover {
    box-shadow: 0 6px 16px rgba(0, 74, 173, 0.10);
    transform: translateY(-1px);
}

/* Qısa stat kartı (icon + value + label) */
.qh-stat {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.qh-stat-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}

.qh-stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.qh-stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.qh-stat-label {
    font-size: 10.5px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* 💡 Boş vəziyyət (Empty State) yönləndirici mətni — data olmayanda görünür */
.qh-stat-hint {
    font-size: 10px;
    color: #9ca3af;
    font-style: italic;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qh-stat-hint.hide {
    display: none;
}

/* Identity kartı (email + plan + action düymələri) */
.qh-identity {
    gap: 8px;
}

.qh-identity-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.qh-identity-row strong {
    font-size: 14px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.qh-sub {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}

.qh-sub #headerPlan {
    font-weight: bold;
    color: #059669;
}

.qh-identity-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.qh-btn-analytics,
.qh-btn-vault,
.qh-btn-logout {
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 11.5px;
    padding: 6px 10px;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.qh-btn-analytics {
    background: linear-gradient(135deg, #004aad, #0066ff);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 74, 173, 0.25);
}
.qh-btn-analytics:hover { background: linear-gradient(135deg, #00367a, #004ecc); }

.qh-btn-vault {
    background: #eef4ff;
    color: #004aad;
    border: 1px solid #cddff7;
}
.qh-btn-vault:hover { background: #dfe9fb; }

.qh-btn-logout {
    background: #dc2626;
    color: #fff;
}
.qh-btn-logout:hover { background: #b91c1c; }

/* Mobil / dar ekran: kartlar alt-alta düşsün */
@media (max-width: 1100px) {
    .user-header-bar {
        grid-template-columns: 1fr 1fr;
    }
    .qh-identity {
        grid-column: 1 / -1;
    }
}
@media (max-width: 600px) {
    .user-header-bar {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   📊 / 🗂️ SHARED MODAL STYLES (Analytics + Content Vault)
   ================================================================ */
.alvion-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 16px;
    overflow-y: auto;
    backdrop-filter: blur(2px);
    animation: alvionFadeIn 0.2s ease;
}

.alvion-modal-overlay.hide {
    display: none !important;
}

@keyframes alvionFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.alvion-modal {
    background: #fff;
    border-radius: 16px;
    width: 720px;
    max-width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: alvionModalPop 0.25s ease;
}

@keyframes alvionModalPop {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.alvion-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(135deg, #f8faff, #eef4ff);
}

.alvion-modal-head h2 {
    margin: 0;
    font-size: 17px;
    color: #004aad;
}

.alvion-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}
.alvion-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.alvion-modal-body {
    padding: 22px;
    max-height: 70vh;
    overflow-y: auto;
}

/* ---- Analytics content ---- */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.analytics-summary-item {
    background: #f8faff;
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
}

.analytics-summary-item .asv {
    font-size: 20px;
    font-weight: bold;
    color: #004aad;
    display: block;
    line-height: 1.3;
}

.analytics-summary-item .asl {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.analytics-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analytics-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    gap: 10px;
}

.analytics-row-label {
    font-size: 13.5px;
    font-weight: bold;
    color: #374151;
}

.analytics-row-meta {
    font-size: 11.5px;
    color: #6b7280;
    white-space: nowrap;
}

.analytics-row-meta b {
    color: #004aad;
}

.analytics-bar-track {
    width: 100%;
    height: 12px;
    background: #eef2f7;
    border-radius: 20px;
    overflow: hidden;
}

.analytics-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #004aad, #10b981);
    transition: width 0.6s ease;
}

.analytics-empty {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 30px 0;
    font-size: 14px;
}

/* ---- Content Vault content ---- */
.vault-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vault-item {
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fbfdff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.vault-item:hover {
    border-color: #cddff7;
    box-shadow: 0 4px 14px rgba(0, 74, 173, 0.08);
}

.vault-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.vault-item-title {
    font-size: 13.5px;
    font-weight: bold;
    color: #004aad;
}

.vault-item-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 10.5px;
}

.vault-tag {
    background: #eef4ff;
    color: #2563eb;
    border-radius: 20px;
    padding: 2px 9px;
    font-weight: bold;
}

.vault-tag-date {
    background: #f3f4f6;
    color: #6b7280;
}

.vault-item-text {
    font-size: 12.5px;
    color: #4b5563;
    line-height: 1.6;
    max-height: 96px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 10px 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.vault-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.vault-btn {
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    padding: 7px 14px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.vault-btn-copy {
    background: #eef4ff;
    color: #004aad;
    border: 1px solid #cddff7;
}
.vault-btn-copy:hover { background: #dfe9fb; }

.vault-btn-regen {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.vault-btn-regen:hover { background: linear-gradient(135deg, #059669, #047857); }

@media (max-width: 600px) {
    .analytics-summary {
        grid-template-columns: 1fr;
    }
    .alvion-modal-overlay {
        padding: 20px 10px;
    }
}

/* ============================================================
   FAZA 6 — SUPER ADMIN PANEL MODAL
   ============================================================ */
.admin-modal-wide {
    max-width: 920px;
    width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
}
.admin-section {
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.admin-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.admin-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 14px;
    letter-spacing: 0.01em;
}

/* Statistika kartları */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}
.admin-stat-card {
    padding: 16px 18px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.admin-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.42);
}
.admin-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 6px;
}
.admin-stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.1;
}

/* Reklam əlavə etmə forması */
.admin-ad-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    margin-bottom: 14px;
}
.admin-ad-form .admin-form-full { grid-column: 1 / -1; }
.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-form-group label {
    font-size: 0.78rem;
    color: #94a3b8;
    letter-spacing: 0.03em;
}
.admin-form-group input,
.admin-form-group select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.admin-form-group input:focus,
.admin-form-group select:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}
.admin-form-msg {
    font-size: 0.82rem;
    color: #94a3b8;
    min-height: 18px;
    margin-top: 4px;
}
.admin-form-msg.success { color: #34d399; }
.admin-form-msg.error { color: #f87171; }

/* Düymələr */
.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}
.admin-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.38);
}
.admin-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Reklam siyahısı */
.admin-ads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-ad-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.14);
}
.admin-ad-item.is-inactive {
    opacity: 0.55;
}
.admin-ad-thumb {
    width: 72px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.16);
}
.admin-ad-info {
    flex: 1;
    min-width: 0;
}
.admin-ad-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.9rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-ad-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-ad-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.admin-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.admin-badge-active { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.admin-badge-inactive { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.admin-btn-sm {
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.7);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}
.admin-btn-sm:hover {
    border-color: rgba(99, 102, 241, 0.55);
    color: #fff;
}
.admin-btn-danger {
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}
.admin-btn-danger:hover {
    border-color: rgba(248, 113, 113, 0.7);
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}
.admin-empty {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* ── Admin Panel: JS-in tələb etdiyi əlavə siniflər ── */
.admin-btn-toggle {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.admin-btn-toggle:hover {
    background: rgba(245, 158, 11, 0.28);
    border-color: #fbbf24;
}

.admin-btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.admin-btn-delete:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: #f87171;
}

.ad-status-active {
    color: #34d399;
    font-weight: 600;
}
.ad-status-paused {
    color: #94a3b8;
    font-weight: 600;
}
.ad-status-expired {
    color: #f87171;
    font-weight: 600;
}

.admin-form-msg-ok {
    color: #34d399;
    font-size: 0.8rem;
    margin-top: 8px;
}
.admin-form-msg-err {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 8px;
}

@media (max-width: 640px) {
    .admin-ad-form { grid-template-columns: 1fr; }
    .admin-ad-item { flex-wrap: wrap; }
    .admin-ad-actions { width: 100%; justify-content: flex-end; }
    .admin-modal-wide { width: 95vw; padding: 18px; }
}
