/* ═══════════════════════════════════════════
   Holy Qur'an — Themed Reading Experience
   Theme variables are now in css/theme.css
   ═══════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.quran-page {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--q-bg);
    color: var(--q-text);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    transition: background 0.5s, color 0.5s;
}

.hidden { display: none !important; }

/* ─── Custom Scrollbar ─── */
.modern-scroll::-webkit-scrollbar { width: 4px; }
.modern-scroll::-webkit-scrollbar-track { background: transparent; }
.modern-scroll::-webkit-scrollbar-thumb { background: var(--q-scroll-thumb); border-radius: 10px; }

/* ═══════════════════════════════════════════
   TOP NAVIGATION
   ═══════════════════════════════════════════ */

.q-topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 64px;
    border-bottom: 1px solid var(--q-border);
    background: var(--q-bg);
    z-index: 50;
    flex-shrink: 0;
    transition: background 0.5s, border-color 0.5s;
    position: relative;
}

.q-topnav-left, .q-topnav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.q-topnav-brand {
    flex-shrink: 0;
}

.q-nav-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--q-border);
    border-radius: 14px;
    color: var(--q-text);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    opacity: 0.8;
}
.q-nav-btn:hover {
    background: var(--q-hover);
    opacity: 1;
}
.q-nav-btn.active {
    background: var(--q-card);
    color: var(--q-accent);
    opacity: 1;
}

/* Breadcrumb */
.q-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.q-breadcrumb-root {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--q-border);
    border-radius: 14px;
    color: var(--q-text);
    opacity: 0.8;
    cursor: pointer;
    padding: 0;
    display: flex;
    transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}
.q-breadcrumb-root:hover {
    background: var(--q-hover);
    opacity: 1;
}
.q-breadcrumb-sep { opacity: 0.2; color: var(--q-text); }
.q-breadcrumb-name { font-weight: 600; }

/* Theme Switcher — now in css/theme.css */

/* ═══════════════════════════════════════════
   TYPOGRAPHY POPUP
   ═══════════════════════════════════════════ */

.q-type-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 60px;
    width: 280px;
    background: var(--q-sidebar-bg);
    border: 1px solid var(--q-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    z-index: 55;
    animation: popupFadeIn 0.2s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.q-type-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.q-type-popup-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.5;
}
.q-type-popup-close {
    background: none;
    border: none;
    color: var(--q-text);
    opacity: 0.4;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.2s;
}
.q-type-popup-close:hover { opacity: 1; }

.q-type-control { margin-bottom: 20px; }
.q-type-control:last-child { margin-bottom: 0; }
.q-type-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
    opacity: 0.7;
}

/* Range slider */
.q-type-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--q-progress-bg);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.q-type-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--q-accent);
    cursor: pointer;
    border: none;
}
.q-type-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--q-accent);
    cursor: pointer;
    border: none;
}

/* ═══════════════════════════════════════════
   SIDEBARS
   ═══════════════════════════════════════════ */

.q-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 60;
    width: 340px;
    background: var(--q-sidebar-bg);
    border-color: var(--q-border);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s, border-color 0.5s;
}
.q-sidebar-left {
    left: 0;
    border-right: 1px solid var(--q-border);
    transform: translateX(-100%);
}
.q-sidebar-left.open { transform: translateX(0); }
.q-sidebar-right {
    right: 0;
    width: 380px;
    border-left: 1px solid var(--q-border);
    transform: translateX(100%);
}
.q-sidebar-right.open { transform: translateX(0); }

.q-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px;
}

.q-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.q-sidebar-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.4;
    color: var(--q-text);
}
.q-sidebar-label svg { color: var(--q-accent); }
.q-sidebar-close {
    background: none;
    border: none;
    color: var(--q-text);
    opacity: 0.3;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.2s;
}
.q-sidebar-close:hover { opacity: 1; }

.q-sidebar-search {
    position: relative;
    margin-bottom: 20px;
    flex-shrink: 0;
}
.q-sidebar-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    color: var(--q-text);
}
.q-sidebar-search input {
    width: 100%;
    background: var(--q-input-bg);
    border: 1px solid var(--q-border);
    border-radius: 16px;
    padding: 12px 16px 12px 42px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--q-text);
    outline: none;
    transition: border-color 0.2s;
}
.q-sidebar-search input::placeholder { color: var(--q-text); opacity: 0.3; }
.q-sidebar-search input:focus { border-color: var(--q-accent); }

.q-sidebar-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Surah items in left sidebar */
.q-surah-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 2px;
}
.q-surah-item:hover { background: var(--q-hover); }
.q-surah-item.active {
    background: var(--q-card);
    border-color: var(--q-border);
}
.q-surah-item-num {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.3;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.q-surah-item-info { display: flex; flex-direction: column; }
.q-surah-item-name {
    font-size: 13px;
    font-weight: 600;
}
.q-surah-item-meta {
    font-size: 9px;
    text-transform: uppercase;
    opacity: 0.3;
    margin-top: 2px;
}

/* Sidebar toggle tabs (Surahs / Juz) */
/* Sidebar tabs row: tabs + bookmark icon */
.q-sidebar-tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.q-sidebar-tabs {
    display: flex;
    flex: 1;
    padding: 3px;
    border-radius: 16px;
    background: var(--q-input-bg);
    border: 1px solid var(--q-border);
}
.q-sidebar-tab-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--q-input-bg);
    border: 1px solid var(--q-border);
    color: var(--q-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.q-sidebar-tab-icon:hover {
    color: var(--q-text);
    background: var(--q-hover);
}
.q-sidebar-tab-icon.active {
    background: var(--q-card);
    color: var(--q-accent);
    border-color: var(--q-accent);
    box-shadow: var(--q-highlight-shadow);
}
.q-sidebar-tab {
    flex: 1;
    padding: 10px 0;
    border-radius: 13px;
    background: none;
    border: 1px solid transparent;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    color: var(--q-text-secondary);
    transition: all 0.2s;
}
.q-sidebar-tab:hover {
    color: var(--q-text);
}
.q-sidebar-tab.active {
    background: var(--q-card);
    color: var(--q-text);
    border-color: var(--q-border);
    box-shadow: var(--q-highlight-shadow);
}

/* Juz items in left sidebar */
.q-juz-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 2px;
}
.q-juz-item:hover { 
    background: var(--q-hover); 
}
.q-juz-item-num {
    font-size: 12px;
    font-weight: 800;
    color: var(--q-accent);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(var(--q-accent-rgb), 0.1);
    flex-shrink: 0;
}
.q-juz-item-info { 
    display: flex; 
    flex-direction: column; 
}
.q-juz-item-name {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Amiri', serif;
}
.q-juz-item-meta {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 2px;
}

/* Settings tabs */
.q-settings-tabs {
    display: flex;
    padding: 3px;
    border-radius: 16px;
    background: var(--q-input-bg);
    border: 1px solid var(--q-border);
    margin-bottom: 20px;
    flex-shrink: 0;
}
.q-settings-tab {
    flex: 1;
    padding: 10px 0;
    border-radius: 13px;
    background: none;
    border: 1px solid transparent;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--q-text);
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.25s;
    font-family: 'Inter', sans-serif;
}
.q-settings-tab:hover { opacity: 0.7; }
.q-settings-tab.active {
    background: var(--q-card);
    border-color: var(--q-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 1;
}

/* Reciter/translation items */
.qp-reciter-item, .qp-trans-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 2px;
}
.qp-reciter-item:hover, .qp-trans-item:hover { background: var(--q-hover); }
.qp-reciter-item.active, .qp-trans-item.active {
    background: var(--q-card);
    border-color: var(--q-border);
}
.qp-reciter-item input, .qp-trans-item input[type="checkbox"] { display: none; }
.qp-reciter-name, .qp-trans-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--q-text);
}
.qp-reciter-lang {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--q-text);
}
.q-check-icon { color: var(--q-accent); flex-shrink: 0; }

.qp-trans-group { margin-bottom: 4px; }
.qp-trans-lang-header {
    padding: 10px 16px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--q-accent);
    opacity: 0.7;
}

/* Shared sidebar/header theme overrides — now in css/theme.css */

/* Footer text */
.quran-page #sidebar-footer-text {
    color: var(--q-text-secondary);
}

/* Account for mini sidebar rail on right side */
@media (min-width: 769px) {
    .quran-page.sidebar-mini .q-topnav {
        padding-right: 96px;
    }
    .quran-page.sidebar-mini .q-sidebar-right {
        right: 80px;
    }
    .quran-page.sidebar-mini .q-type-popup {
        right: 140px;
    }
}

/* Backdrop */
.q-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    z-index: 55;
    animation: backdropFade 0.3s ease;
}
@keyframes backdropFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ═══════════════════════════════════════════
   MAIN READING AREA
   ═══════════════════════════════════════════ */

.q-main {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.q-main-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 40px 200px;
    width: 100%;
}

.quran-page .q-main > #site-footer {
    margin-top: 24px;
}

/* Welcome / Surah list view */
.q-welcome-header {
    margin-bottom: 28px;
}

/* Index tabs */
.q-index-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--q-border);
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.q-index-tabs::-webkit-scrollbar { display: none; }
.q-index-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 13px;
    font-weight: 600;
    color: var(--q-text-secondary);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-radius: 0;
    white-space: nowrap;
    flex: 0 0 auto;
}
.q-index-tab:hover { color: var(--q-text); }
.q-index-tab.active {
    color: var(--q-accent);
    border-bottom-color: var(--q-accent);
}
.q-welcome-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.q-welcome-subtitle {
    font-size: 14px;
    color: var(--q-text-secondary);
    line-height: 1.6;
    max-width: 540px;
}

.q-continue-card {
    border: 1px solid var(--q-border);
    background: var(--q-card);
    border-radius: 20px;
    padding: 24px 26px;
    margin-bottom: 16px;
}

.q-continue-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.q-continue-info { flex: 1; }

.q-continue-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--q-accent);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.q-continue-label svg {
    width: 14px;
    height: 14px;
}

.q-continue-surah {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 3.8vw, 2.05rem);
    line-height: 1.16;
    margin: 0 0 6px;
}

.q-continue-meta {
    margin: 0;
    font-size: 14px;
    color: var(--q-text-secondary);
}

.q-continue-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.q-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 11px;
    background: var(--q-input-bg);
    border: 1px solid var(--q-border);
    color: var(--q-text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.q-stat-badge svg {
    width: 16px;
    height: 16px;
}

.q-stat-label {
    color: var(--q-text-secondary);
    font-weight: 500;
}

.q-play-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.q-play-glow {
    position: absolute;
    inset: 12px;
    background: var(--q-accent);
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.2;
}

.q-play-ring {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}

.q-play-btn {
    position: absolute;
    inset: 8px;
    border: none;
    border-radius: 50%;
    background: var(--q-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.q-play-btn svg {
    width: 26px;
    height: 26px;
    margin-left: 2px;
}

.q-play-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.86);
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    padding: 6px 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 10;
}

.q-play-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.86);
}

.q-play-wrap:hover .q-play-tooltip { opacity: 1; }

.q-search-wrap {
    position: relative;
    margin-bottom: 24px;
}
.q-search-wrap svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--q-text);
    opacity: 0.3;
}
.q-search-wrap input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 1px solid var(--q-border);
    border-radius: 16px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: var(--q-card);
    color: var(--q-text);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.q-search-wrap input::placeholder { color: var(--q-text); opacity: 0.35; }
.q-search-wrap input:focus {
    border-color: var(--q-accent);
    box-shadow: 0 0 0 3px rgba(var(--q-accent-rgb), 0.08);
}

.q-popular-searches {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 16;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--q-border);
    background: var(--q-card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.q-popular-chip {
    appearance: none;
    border: 1px solid var(--q-border);
    background: var(--q-input-bg);
    color: var(--q-text);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.q-popular-chip:hover {
    border-color: var(--q-accent);
    background: var(--q-highlight-bg);
}

/* Surah Grid (list) */
.surah-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}
.surah-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.surah-card:hover {
    background: var(--q-highlight-bg);
    border-color: var(--q-highlight-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.surah-card:active { transform: scale(0.995); }

.surah-card-num {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--q-input-bg);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: var(--q-accent);
    flex-shrink: 0;
}
.surah-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.surah-card-en {
    font-size: 14px;
    font-weight: 600;
}
.surah-card-translation {
    font-size: 12px;
    color: var(--q-text-secondary);
    opacity: 0.6;
}
.surah-card-right {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.surah-card-ar {
    font-family: 'Amiri', serif;
    font-size: 20px;
    line-height: 1.2;
}
.surah-card-ayahs {
    font-size: 11px;
    color: var(--q-text-secondary);
    opacity: 0.5;
}

/* ─── Index: empty state ─── */
.q-index-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 20px;
    text-align: center;
    gap: 8px;
}
.q-index-empty p {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.45;
    margin: 0;
}
.q-index-empty span {
    font-size: 12px;
    opacity: 0.3;
}

/* ─── Index: download list ─── */
.q-download-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(var(--q-accent-rgb), 0.12), rgba(var(--q-accent-rgb), 0.04));
    border: 1px solid rgba(var(--q-accent-rgb), 0.16);
    border-radius: 20px;
}
.q-download-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--q-accent);
    margin-bottom: 10px;
}
.q-download-head-copy h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-family: 'Poppins', sans-serif;
}
.q-download-head-copy p {
    margin: 0;
    max-width: 560px;
    color: var(--q-text-secondary);
    line-height: 1.6;
    font-size: 14px;
}
.q-download-head-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 250px;
}
.q-download-reciter-btn,
.q-download-all-btn,
.q-download-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--q-border);
    background: var(--q-card);
    color: var(--q-text);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, background 0.2s, color 0.2s;
    font-family: 'Inter', sans-serif;
}
.q-download-reciter-btn:hover,
.q-download-all-btn:hover,
.q-download-inline-btn:hover {
    border-color: var(--q-accent);
    color: var(--q-accent);
    transform: translateY(-1px);
}
.q-download-reciter-btn:disabled,
.q-download-all-btn:disabled,
.q-download-inline-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
.q-download-reciter-btn {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
}
.q-download-reciter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--q-text-secondary);
}
.q-download-reciter-btn strong {
    font-size: 14px;
    line-height: 1.4;
}
.q-download-all-btn {
    background: var(--q-accent);
    border-color: var(--q-accent);
    color: #fff;
    font-weight: 700;
}
.q-download-all-btn:hover {
    color: #fff;
    filter: brightness(1.02);
}
.q-download-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.q-download-summary {
    font-size: 13px;
    color: var(--q-text-secondary);
}
.q-download-status {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(var(--q-accent-rgb), 0.08);
    color: var(--q-accent);
    font-size: 12px;
    font-weight: 600;
}
.q-download-status.is-error {
    background: rgba(214, 82, 82, 0.12);
    color: #c33b3b;
}
.q-download-status.is-success {
    background: rgba(39, 140, 92, 0.12);
    color: #21724c;
}
.q-download-list {
    display: grid;
    gap: 8px;
}
.q-download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 18px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.q-download-card:hover {
    background: var(--q-highlight-bg);
    border-color: var(--q-highlight-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.q-download-card.is-unavailable {
    opacity: 0.6;
}
.q-download-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.q-download-card-num {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(var(--q-accent-rgb), 0.1);
    color: var(--q-accent);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.q-download-card-copy {
    min-width: 0;
}
.q-download-card-topline {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.q-download-card-topline strong {
    font-size: 15px;
}
.q-download-card-topline span {
    font-family: 'Amiri', serif;
    font-size: 20px;
    line-height: 1.1;
}
.q-download-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--q-text-secondary);
}
.q-download-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    min-width: 118px;
    border-radius: 14px;
    border: 1px solid rgba(var(--q-accent-rgb), 0.18);
    background: rgba(var(--q-accent-rgb), 0.08);
    color: var(--q-accent);
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.q-download-action:hover {
    background: rgba(var(--q-accent-rgb), 0.14);
    border-color: rgba(var(--q-accent-rgb), 0.3);
    transform: translateY(-1px);
}
.q-download-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

/* ─── Index: Juz grid ─── */
.index-juz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.index-juz-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.index-juz-card:hover {
    background: var(--q-highlight-bg);
    border-color: var(--q-highlight-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.index-juz-card-num {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--q-accent-rgb), 0.1);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--q-accent);
    flex-shrink: 0;
}
.index-juz-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.index-juz-card-label {
    font-size: 13px;
    font-weight: 700;
}
.index-juz-card-surah {
    font-size: 11px;
    color: var(--q-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.index-juz-card-ayah {
    font-size: 10px;
    opacity: 0.4;
}
.index-juz-card-ar {
    font-family: 'Amiri', serif;
    font-size: 16px;
    opacity: 0.45;
    flex-shrink: 0;
}

/* ─── Index: Bookmarks grid ─── */
.index-bookmark-grid {
    display: flex;
    flex-direction: column;
}
.index-bookmark-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 4px;
    cursor: pointer;
    border-bottom: 1px solid var(--q-border);
    transition: opacity 0.2s;
}
.index-bookmark-card:last-child {
    border-bottom: none;
}
.index-bookmark-card:hover {
    opacity: 0.75;
}
.index-bookmark-card-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--q-accent-rgb), 0.1);
    border-radius: 10px;
    color: var(--q-accent);
    flex-shrink: 0;
}
.index-bookmark-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.index-bookmark-card-surah {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.index-bookmark-card-ayah {
    font-size: 11px;
    color: var(--q-text-secondary);
    opacity: 0.6;
}
.index-bookmark-card-ar {
    font-family: 'Amiri', serif;
    font-size: 16px;
    opacity: 0.45;
    flex-shrink: 0;
}
.index-bookmark-remove {
    background: none;
    border: none;
    color: var(--q-text);
    opacity: 0.2;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity 0.2s, color 0.2s;
    margin-left: auto;
}
.index-bookmark-remove:hover {
    opacity: 0.8;
    color: #e74c3c;
}

/* ═══════════════════════════════════════════
   SURAH READER
   ═══════════════════════════════════════════ */

/* Surah Header */
.q-surah-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
    padding-top: 20px;
    animation: fadeSlideUp 0.7s ease both;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.q-surah-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px;
    border-radius: 100px;
    border: 1px solid var(--q-border);
    background: var(--q-card);
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.q-surah-badge span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.6;
}
.q-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--q-accent);
    opacity: 0.5;
}

.q-surah-title-ar {
    font-family: 'Amiri', serif;
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.3;
}
.q-surah-title-en {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0.9;
    margin-bottom: 6px;
}
.q-surah-title-translation {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: 700;
    color: var(--q-text-secondary);
    opacity: 0.6;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.q-surah-title-t-sep {
    opacity: 0.5;
}

/* View Mode Toggle */
.q-view-toggle {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    background: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 12px;
    padding: 4px;
}
.q-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--q-text);
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.2s;
}
.q-view-btn:hover {
    opacity: 0.8;
}
.q-view-btn.active {
    background: var(--q-accent);
    color: #fff;
    opacity: 1;
}
.q-view-btn svg {
    width: 16px;
    height: 16px;
}

/* Bismillah */
.q-bismillah {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}
.q-bismillah-line {
    height: 1px;
    width: 120px;
    background: var(--q-accent);
    opacity: 0.2;
    margin: 0 auto 40px;
}
.q-bismillah-line:last-child {
    margin: 40px auto 0;
}
.q-bismillah-text {
    font-family: 'Amiri', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.8;
    opacity: 0.9;
}

/* ═══════════════════════════════════════════
   AYAH BLOCKS
   ═══════════════════════════════════════════ */

.q-ayahs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ayah-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.5s ease;
}

/* Active ayah highlight (glow) */
.ayah-block.ayah-active {
    background: var(--q-highlight-bg);
    border-color: var(--q-highlight-border);
    box-shadow: var(--q-highlight-shadow);
}

/* Ayah Header Row */
.ayah-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ayah-number {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border-radius: 50%;
    border: 1px solid var(--q-border);
    opacity: 0.5;
    transition: all 0.5s;
    flex-shrink: 0;
    cursor: pointer;
}
.ayah-number:hover {
    opacity: 0.8;
    border-color: var(--q-accent);
}
.ayah-active .ayah-number {
    background: var(--q-accent);
    color: #fff;
    border-color: transparent;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(var(--q-accent-rgb), 0.3);
    transform: scale(1.1);
}

/* Ayah info popup */
.ayah-info-popup {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    background-color: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    min-width: 120px;
    animation: popupFadeIn 0.2s ease;
    /* Force opaque background */
    isolation: isolate;
}
/* Theme-specific solid backgrounds */
[data-theme="sepia"] .ayah-info-popup { background-color: #ebe3cf; }
[data-theme="silver"] .ayah-info-popup { background-color: #f1f5f9; }
[data-theme="emerald"] .ayah-info-popup { background-color: #0a231e; }
[data-theme="midnight"] .ayah-info-popup { background-color: #1e293b; }

.ayah-info-popup::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--q-border);
}
.ayah-info-popup::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--q-card);
    margin-right: -1px;
}
[data-theme="sepia"] .ayah-info-popup::after { border-right-color: #ebe3cf; }
[data-theme="silver"] .ayah-info-popup::after { border-right-color: #f1f5f9; }
[data-theme="emerald"] .ayah-info-popup::after { border-right-color: #0a231e; }
[data-theme="midnight"] .ayah-info-popup::after { border-right-color: #1e293b; }

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}
.ayah-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--q-text);
    border-bottom: 1px solid var(--q-border);
}
.ayah-info-row:last-child {
    border-bottom: none;
}
.ayah-info-row span {
    opacity: 0.6;
}
.ayah-info-row strong {
    font-weight: 600;
}
.ayah-info-sajdah {
    justify-content: center;
    color: #c83232;
    font-weight: 600;
}
.ayah-info-sajdah span {
    opacity: 1;
}

/* Action buttons - horizontal row */
.ayah-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ayah-actions .ayah-action-btn {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, color 0.2s, background 0.2s;
}
.ayah-block:hover .ayah-actions .ayah-action-btn,
.ayah-active .ayah-actions .ayah-action-btn {
    visibility: visible;
    opacity: 0.4;
}
.ayah-block:hover .ayah-actions .ayah-action-btn:hover,
.ayah-active .ayah-actions .ayah-action-btn:hover {
    opacity: 1;
}
/* Always show bookmarked icon */
.ayah-actions .ayah-bookmark-btn.bookmarked {
    visibility: visible;
    opacity: 1;
}

.ayah-action-btn {
    background: none;
    border: none;
    color: var(--q-text);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: opacity 0.2s, color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ayah-action-btn:hover {
    opacity: 1;
    color: var(--q-accent);
    background: var(--q-hover);
}

/* Bookmark active state */
.ayah-bookmark-btn.bookmarked {
    opacity: 1;
    color: var(--q-accent);
}
.ayah-bookmark-btn.bookmarked svg {
    fill: var(--q-accent);
}

/* Bookmark sidebar items */
.q-bookmark-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 2px;
}
.q-bookmark-item:hover {
    background: var(--q-hover);
}
.q-bookmark-item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--q-accent);
    background: rgba(var(--q-accent-rgb), 0.1);
}
.q-bookmark-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.q-bookmark-item-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.q-bookmark-item-meta {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 2px;
}
.q-bookmark-item-ar {
    font-family: 'Amiri', serif;
    font-size: 13px;
    opacity: 0.5;
    flex-shrink: 0;
}
.q-bookmark-item-remove {
    background: none;
    border: none;
    color: var(--q-text);
    opacity: 0.25;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.q-bookmark-item-remove:hover {
    opacity: 0.8;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}
.q-bookmark-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    gap: 8px;
}
.q-bookmark-empty p {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.5;
    margin: 0;
}
.q-bookmark-empty span {
    font-size: 11px;
    opacity: 0.3;
}

/* Ayah Content */
.ayah-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ayah-arabic {
    font-family: 'Amiri', serif;
    font-size: 38px;
    line-height: 2.4;
    text-align: right;
    direction: rtl;
    word-spacing: 4px;
    transition: opacity 0.5s;
    margin: 0;
}
.ayah-active .ayah-arabic { opacity: 1; }

/* End of ayah marker with Arabic numeral */
.ayah-end-marker {
    font-family: 'Amiri', serif;
    color: var(--q-accent);
    opacity: 0.7;
    margin-right: 4px;
    font-size: 0.9em;
    white-space: nowrap;
}

.ayah-translations {
    border-top: 1px solid var(--q-border);
    padding-top: 16px;
    transition: border-color 0.5s;
}
.ayah-active .ayah-translations {
    border-top-color: var(--q-border);
}

.ayah-translation {
    margin: 0;
    line-height: 1.8;
    font-size: 18px;
    color: var(--q-text);
    opacity: 0.8;
    transition: opacity 0.5s;
}
.ayah-active .ayah-translation { opacity: 0.9; }

.ayah-translation + .ayah-translation {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--q-border);
}

.ayah-tr-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 8px;
    font-weight: 700;
    color: var(--q-text-secondary);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-top: 6px;
    opacity: 0.4;
}
.ayah-tr-label::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--q-border);
}

/* ═══════════════════════════════════════════
   MUSHAF VIEW (Reading Mode)
   ═══════════════════════════════════════════ */

.mushaf-page {
    margin-bottom: 40px;
}

.mushaf-text {
    font-family: 'Amiri', 'Scheherazade New', serif;
    font-size: var(--q-arabic-size, 32px);
    line-height: 2.2;
    text-align: justify;
    text-justify: inter-word;
    color: var(--q-text);
    padding: 0 10px;
}

.mushaf-ayah {
    cursor: default;
    transition: background-color 0.3s, color 0.3s;
    padding: 2px 4px;
    border-radius: 4px;
}

.mushaf-ayah-active {
    background: rgba(var(--q-accent-rgb), 0.2);
    box-shadow: 0 0 0 2px rgba(var(--q-accent-rgb), 0.15);
}

.mushaf-ayah-num {
    font-family: 'Amiri', serif;
    color: var(--q-accent);
    font-size: 0.85em;
    padding: 0 2px;
    opacity: 0.8;
}

.mushaf-page-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--q-border);
}

.mushaf-page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: var(--q-text);
    opacity: 0.6;
}

/* ═══════════════════════════════════════════
   TRANSLATION VIEW (Translation Only Mode)
   ═══════════════════════════════════════════ */

.translation-header {
    text-align: center;
    padding: 16px 20px;
    margin-bottom: 30px;
    background: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--q-text);
}
.translation-header-label {
    font-weight: 600;
    opacity: 0.6;
    margin-right: 6px;
}

.translation-page {
    margin-bottom: 40px;
}

.translation-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 0;
    transition: background-color 0.3s;
    cursor: default;
}

.translation-row-num {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--q-accent);
    opacity: 0.7;
}
.translation-row-num::after {
    content: '';
    display: block;
    width: 15px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

.translation-row-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.translation-row-text p {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    line-height: 1.8;
    color: var(--q-text);
}

.translation-row-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--q-text-secondary);
    opacity: 0.5;
}

/* Highlight active verse in translation mode */
.translation-row-active {
    background: rgba(var(--q-accent-rgb), 0.08);
    border-radius: 12px;
    padding: 20px 16px;
    margin: 0 -16px;
}
.translation-row-active .translation-row-num {
    opacity: 1;
}

/* Loading */
.q-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 0;
    color: var(--q-text-secondary);
    font-size: 14px;
}
.q-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--q-border);
    border-top-color: var(--q-accent);
    border-radius: 50%;
    animation: qSpin 0.8s linear infinite;
}
@keyframes qSpin { to { transform: rotate(360deg); } }

/* Error */
.quran-error {
    text-align: center;
    color: #ef4444;
    padding: 40px 0;
    font-size: 14px;
}

/* ═══════════════════════════════════════════
   SURAH NAVIGATION BUTTONS
   ═══════════════════════════════════════════ */

.q-surah-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 32px 20px;
    margin-top: 24px;
    margin-bottom: 20px;
    border-top: 1px solid var(--q-border);
    border-bottom: 1px solid var(--q-border);
    background: var(--q-card);
    border-radius: 8px;
}

.q-surah-nav-btn {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px;
    background: linear-gradient(135deg, var(--q-input-bg), var(--q-card));
    border: 1px solid var(--q-border);
    border-radius: 8px;
    color: var(--q-text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.q-surah-nav-btn:not(:disabled):hover {
    background: linear-gradient(135deg, var(--q-accent), rgba(var(--q-accent-rgb), 0.8));
    color: white;
    border-color: var(--q-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--q-accent-rgb), 0.2);
}

.q-surah-nav-btn:not(:disabled):active {
    transform: translateY(0);
}

.q-surah-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.q-surah-nav-prev {
    justify-self: start;
}

.q-surah-nav-next {
    justify-self: end;
    text-align: right;
}

.q-surah-nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.q-surah-nav-arrow {
    font-size: 16px;
    font-weight: 700;
}

.q-surah-nav-prev .q-surah-nav-arrow {
    margin-right: 4px;
}

.q-surah-nav-next .q-surah-nav-arrow {
    margin-left: 4px;
}

.q-surah-nav-info {
    display: block;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
    line-height: 1.4;
}

.q-surah-nav-next .q-surah-nav-info {
    text-align: right;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .q-surah-nav {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px 16px;
        margin-bottom: 16px;
    }

    .q-surah-nav-btn {
        padding: 12px 14px;
        font-size: 12px;
    }

    .q-surah-nav-label {
        font-size: 13px;
    }

    .q-surah-nav-next {
        text-align: left;
        justify-self: start;
    }

    .q-surah-nav-next .q-surah-nav-info {
        text-align: left;
    }
}

/* ═══════════════════════════════════════════
   AUDIO PLAYER BAR
   ═══════════════════════════════════════════ */

.q-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--q-player-bg);
    border-top: 1px solid var(--q-border);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.08);
    transition: background 0.5s, border-color 0.5s, right 0.3s;
}

@media (min-width: 768px) {
    body.sidebar-mini:not(.sidebar-open) .q-player {
        right: 80px;
    }
}

/* Progress */
.q-player-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--q-progress-bg);
    cursor: pointer;
}
.q-player-progress-fill {
    height: 100%;
    background: var(--q-accent);
    width: 0%;
    transition: width 0.15s linear;
    position: relative;
}
.q-player-progress-dot {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--q-accent);
    box-shadow: 0 0 8px rgba(var(--q-accent-rgb), 0.4);
}

/* Player content */
.q-player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    max-width: 1280px;
    margin: 0 auto;
    gap: 24px;
}

.q-player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.q-player-surah {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.q-player-ayah {
    font-size: 12px;
    color: var(--q-text-secondary);
    opacity: 0.7;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s, opacity 0.2s;
}
.q-player-ayah:hover {
    background: rgba(var(--q-accent-rgb), 0.1);
    opacity: 1;
}

/* Go to ayah popup */
.q-goto-wrap { position: relative; }

.q-goto-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    background: var(--q-sidebar-bg);
    border: 1px solid var(--q-border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    z-index: 70;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .q-goto-popup {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.q-goto-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.5;
    margin-bottom: 12px;
    text-align: center;
}

.q-goto-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.q-goto-input-wrap input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid var(--q-border);
    border-radius: 10px;
    background: var(--q-bg);
    color: var(--q-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}
.q-goto-input-wrap input:focus {
    border-color: var(--q-accent);
}
.q-goto-input-wrap input::placeholder {
    opacity: 0.4;
}
/* Hide number input spinners */
.q-goto-input-wrap input::-webkit-outer-spin-button,
.q-goto-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.q-goto-input-wrap input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.q-goto-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: var(--q-accent);
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s;
}
.q-goto-btn:hover {
    opacity: 0.85;
}
.q-goto-btn:active {
    transform: scale(0.95);
}

.q-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.q-player-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--q-text);
    border-radius: 50%;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
    padding: 0;
    opacity: 0.6;
}
.q-player-btn:hover {
    opacity: 1;
    background: var(--q-hover);
}

.q-player-play {
    width: 52px;
    height: 52px;
    background: var(--q-accent);
    color: #fff;
    opacity: 1;
    margin: 0 4px;
    box-shadow: 0 4px 16px rgba(var(--q-accent-rgb), 0.3);
}
.q-player-play:hover {
    opacity: 1;
    background: var(--q-accent);
    transform: scale(1.05);
}
.q-player-play:active { transform: scale(0.95); }
.q-player-play svg { margin-left: 2px; }

.q-player-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--q-text);
    opacity: 0.6;
    flex-shrink: 0;
    min-width: 70px;
    justify-content: flex-end;
}
.q-player-time-sep { opacity: 0.4; }

/* ═══════════════════════════════════════════
   REPEAT POPUP
   ═══════════════════════════════════════════ */

.q-repeat-wrap { position: relative; }

.q-repeat-trigger.q-repeat-active {
    color: var(--q-accent);
    background: rgba(var(--q-accent-rgb), 0.1);
    opacity: 1;
}

.q-repeat-popup {
    position: absolute;
    bottom: calc(100% + 16px);
    right: 0;
    width: 260px;
    background: var(--q-sidebar-bg);
    border: 1px solid var(--q-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    z-index: 70;
    animation: repeatIn 0.2s ease;
}
@keyframes repeatIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.q-repeat-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.5;
    margin-bottom: 20px;
}

.q-repeat-section { margin-bottom: 18px; }
.q-repeat-section:last-child { margin-bottom: 0; }
.q-repeat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 8px;
}

.q-repeat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.q-ropt {
    padding: 6px 12px;
    border: 1px solid var(--q-border);
    border-radius: 12px;
    background: none;
    color: var(--q-text);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
}
.q-ropt:hover {
    border-color: var(--q-accent);
    color: var(--q-accent);
    opacity: 1;
}
.q-ropt.active {
    background: var(--q-card);
    border-color: var(--q-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    opacity: 1;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    .q-topnav { padding: 0 64px 0 16px; height: 56px; }
    .q-topnav-left, .q-topnav-right { gap: 8px; }
    .q-nav-btn { width: 38px; height: 38px; border-radius: 10px; }
    .q-breadcrumb-root { width: 38px; height: 38px; border-radius: 10px; }
    .q-breadcrumb { font-size: 13px; }

    /* Enable global sidebar toggle on mobile for Quran app */
    .quran-page.sidebar-mini #menu-toggle {
        display: flex;
        position: fixed;
        top: 9px;
        right: 16px;
        width: 38px;
        height: 38px;
        z-index: 100;
        border-radius: 10px;
        padding: 0;
        gap: 4px;
    }
    .quran-page.sidebar-mini #menu-toggle .bar {
        width: 18px;
        height: 2px;
    }
    .quran-page.sidebar-mini #menu-toggle.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .quran-page.sidebar-mini #menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .q-theme-switcher { margin-bottom: 0; justify-content: center; }

    /* Mobile toolbar row in settings */
    #mobile-toolbar-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--q-border);
        position: relative;
    }
    #mobile-toolbar-wrapper .q-nav-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: var(--q-input-bg);
        border: 1px solid var(--q-border);
    }
    #mobile-toolbar-wrapper .q-type-popup {
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: calc(100% - 20px);
        max-width: 300px;
        z-index: 200;
        animation: mobilePopupIn 0.15s ease;
    }
    @keyframes mobilePopupIn {
        from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
        to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    /* Larger close buttons on mobile for sidebars */
    .q-sidebar-close {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: var(--q-input-bg);
        opacity: 0.7;
    }
    .q-sidebar-close:hover,
    .q-sidebar-close:active { opacity: 1; }

    .q-sidebar { width: 300px; }
    .q-sidebar-right { width: 320px; }
    .q-sidebar-inner { padding: 20px; }

    .q-main-inner { padding: 24px 16px 200px; }

    .q-continue-card { padding: 18px 16px; border-radius: 16px; }
    .q-continue-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .q-play-wrap {
        width: 80px;
        height: 80px;
    }

    .q-download-head,
    .q-download-summary-row,
    .q-download-card {
        flex-direction: column;
        align-items: stretch;
    }
    .q-download-head-actions {
        width: 100%;
        min-width: 0;
    }
    .q-download-action {
        width: 100%;
        min-width: 0;
    }

    .q-surah-title-ar { font-size: 2.5rem; }
    .q-surah-title-en { font-size: 1.3rem; }

    .ayah-block {
        gap: 12px;
        padding: 16px 14px;
        border-radius: 16px;
    }
    .ayah-number { width: 32px; height: 32px; font-size: 11px; }
    .ayah-arabic { line-height: 2.2; }
    .ayah-actions .ayah-action-btn {
        visibility: visible;
        opacity: 0.4;
    }
    .ayah-actions .ayah-bookmark-btn.bookmarked { opacity: 1; }
    .ayah-action-btn { padding: 6px; }

    .q-player-content { padding: 10px 16px; gap: 12px; }
    .q-player-play { width: 44px; height: 44px; }
    .q-player-play svg { width: 18px; height: 18px; }
    .q-player-time { min-width: 60px; font-size: 11px; }

    .q-type-popup {
        right: 8px;
        width: 260px;
    }
    .q-repeat-popup {
        right: -40px;
        width: 240px;
    }

    /* View Toggle mobile */
    .q-view-toggle {
        padding: 3px;
        gap: 2px;
    }
    .q-view-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    .q-view-btn span {
        display: none;
    }
    .q-view-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Mushaf mobile */
    .mushaf-text {
        line-height: 2;
        padding: 0;
    }
    .mushaf-page-num {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    /* Translation mobile */
    .translation-row {
        gap: 6px;
        padding: 12px;
    }
    .translation-row-num {
        font-size: 12px;
    }
    .translation-row-text p {
        font-size: 15px;
        line-height: 1.7;
    }
    .translation-header {
        padding: 12px 16px;
        font-size: 13px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .q-sidebar { width: 100%; }
    .q-sidebar-right { width: 100%; }

    .q-surah-header { margin-bottom: 40px; }
    .q-bismillah { margin-bottom: 40px; }
    .q-bismillah-line { width: 60px; margin-bottom: 24px; }
    .q-bismillah-line:last-child { margin-top: 24px; }

    .q-player-controls { gap: 4px; }
    .q-player-btn { width: 36px; height: 36px; }

    /* Mushaf very small screens */
    .mushaf-text {
        line-height: 1.9;
    }
    
    /* Translation very small screens */
    .translation-row {
        gap: 5px;
        padding: 10px;
    }
    .translation-row-num {
        font-size: 11px;
    }
    .translation-row-text p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* ─── Index: wider screens ─── */
@media (min-width: 900px) {
    .surah-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .index-juz-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1280px) {
    .surah-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .index-juz-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─── Index: small screens ─── */
@media (max-width: 480px) {
    .q-index-tab {
        font-size: 11px;
        padding: 9px 12px;
        gap: 5px;
    }
    .q-download-card-left {
        align-items: flex-start;
    }
    .q-download-card-meta {
        gap: 8px;
    }
    .index-juz-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════
   SEMANTIC SEARCH MODAL
═══════════════════════════════════════════════════════════ */
.q-search-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}
.q-search-modal.hidden { display: none; }

.q-search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(3px);
}

.q-search-modal-box {
    position: relative;
    z-index: 1;
    width: min(680px, calc(100vw - 32px));
    max-height: calc(100vh - 100px);
    background: var(--q-card);
    border: 1px solid var(--q-border);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Head */
.q-search-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--q-border);
    flex-shrink: 0;
}
.q-search-modal-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--q-text);
}
.q-search-modal-label svg { color: var(--q-accent); }

.q-search-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--q-input-bg);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--q-text-secondary);
    transition: background .15s, color .15s;
}
.q-search-modal-close:hover { background: var(--q-hover); color: var(--q-text); }

/* Input row */
.q-search-modal-input-row {
    display: flex;
    gap: 8px;
    padding: 16px 20px 6px;
    flex-shrink: 0;
}
.q-search-modal-input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--q-border);
    border-radius: 10px;
    background: var(--q-input-bg);
    color: var(--q-text);
    font-size: 15px;
    outline: none;
    transition: border-color .15s;
}
.q-search-modal-input:focus { border-color: var(--q-accent); }

.q-search-modal-submit {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: none;
    border-radius: 10px;
    background: var(--q-accent);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}
.q-search-modal-submit:hover { opacity: .85; }

/* Hint text */
.q-search-modal-hint {
    margin: 4px 20px 10px;
    font-size: 12px;
    color: var(--q-text-secondary);
    opacity: .75;
    flex-shrink: 0;
}

/* Status bar */
.q-search-modal-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    font-size: 12px;
    color: var(--q-text-secondary);
    flex-shrink: 0;
}
.q-search-modal-status.hidden { display: none; }

.q-search-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--q-border);
    border-top-color: var(--q-accent);
    border-radius: 50%;
    animation: q-spin .6s linear infinite;
    flex-shrink: 0;
}

/* Results */
.q-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.q-search-no-results,
.q-search-error {
    text-align: center;
    padding: 32px 16px;
    color: var(--q-text-secondary);
    font-size: 14px;
}
.q-search-error { color: #e57373; }

/* Result card */
.q-search-result-card {
    background: var(--q-input-bg);
    border: 1px solid var(--q-border);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.q-search-result-card:hover {
    border-color: var(--q-accent);
    background: var(--q-hover);
}

.q-src-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.q-src-ref {
    font-size: 11px;
    font-weight: 700;
    color: var(--q-accent);
    background: rgba(var(--q-accent-rgb), .12);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.q-src-surah {
    flex: 1;
    font-size: 12px;
    color: var(--q-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.q-src-open {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--q-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.q-src-open:hover { background: var(--q-accent); color: #fff; }

.q-src-arabic {
    font-family: 'Amiri', serif;
    font-size: 22px;
    line-height: 1.8;
    color: var(--q-text);
    margin: 0 0 8px;
    text-align: right;
}
.q-src-trans {
    font-size: 13px;
    line-height: 1.6;
    color: var(--q-text-secondary);
    margin: 0;
    font-style: italic;
}

@media (max-width: 600px) {
    .q-search-modal { padding-top: 16px; }
    .q-search-modal-box {
        max-height: calc(100vh - 32px);
        border-radius: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════
   AI SEARCH — inline index panel
═══════════════════════════════════════════════════════════ */
.q-ai-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.q-ai-search-bar input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--q-border);
    border-radius: 12px;
    background: var(--q-input-bg);
    color: var(--q-text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
}
.q-ai-search-bar input:focus { border-color: var(--q-accent); }
.q-ai-search-bar button {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 12px;
    background: var(--q-accent);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}
.q-ai-search-bar button:hover { opacity: .85; }

.q-ai-search-hint {
    font-size: 12px;
    color: var(--q-text-secondary);
    margin: 0 0 12px;
    opacity: .75;
}

.q-ai-search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

/* Translation attribution label under each result */
.q-src-trans-item { margin-top: 8px; }
.q-src-trans-name {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--q-accent);
    opacity: .65;
    margin-bottom: 2px;
}

/* ── AI Search: load more ───────────────────────────────────── */
.q-ai-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 4px 0 16px;
}
.q-ai-load-more-wrap--modal {
    padding: 4px 20px 16px;
    flex-shrink: 0;
}
.q-ai-load-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: 1.5px solid var(--q-border);
    border-radius: 20px;
    background: var(--q-input-bg);
    color: var(--q-text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.q-ai-load-more:hover {
    border-color: var(--q-accent);
    color: var(--q-accent);
    background: var(--q-hover);
}
.q-ai-load-more--loading {
    pointer-events: none;
    opacity: .7;
}
.q-ai-load-more--loading::before {
    content: '';
    width: 13px;
    height: 13px;
    border: 2px solid var(--q-border);
    border-top-color: var(--q-accent);
    border-radius: 50%;
    animation: q-spin .6s linear infinite;
    flex-shrink: 0;
}
.q-ai-load-more--loading svg { display: none; }
.q-ai-load-more-count {
    background: rgba(var(--q-accent-rgb), .12);
    color: var(--q-accent);
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
}
@media (min-width: 768px) {
    body.sidebar-mini:not(.sidebar-open) main {
        padding-right: 75px !important;
    }
}
