/* ============================================================
   قرآن‌یار — طراحی نرم، گرد و موبایل‌محور
   ============================================================ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #f5f8f7;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e7ebe9;

    --accent: #10b981;
    --accent-dark: #059669;
    --accent-light: #d1fae5;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
}

body[data-theme="dark"] {
    --bg: #10151a;
    --card: #1a2129;
    --text: #f0f2f5;
    --muted: #97a2af;
    --border: #262f38;
    --accent: #34d399;
    --accent-dark: #6ee7b7;
    --accent-light: #113b2d;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,.5);
}

body {
    margin: 0;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 92px;
    -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }
a { color: inherit; }

/* ---------------- Header ---------------- */

.top-header {
    position: relative;
    padding: 26px 20px 18px;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}
.header-actions {
    position: absolute;
    top: 18px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
}
.icon-round-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.icon-round-btn:active { transform: scale(0.94); }

.top-header h1 {
    font: 800 24px/1.2 'Vazirmatn';
    margin: 30px 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text);
}
.brand-icon { font-size: 22px; }
.top-header p {
    margin: 0 auto;
    max-width: 320px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

/* ---------------- Container ---------------- */

.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 4px 16px 8px;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
}

/* ---------------- Continue-listening hero card ---------------- */

.continue-card {
    display: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    margin: 10px 0 18px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}
.continue-card.visible { display: block; }
.continue-card-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.continue-icon {
    width: 46px;
    height: 46px;
    flex: none;
    background: rgba(255,255,255,0.22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.continue-info { flex: 1; min-width: 0; }
.continue-label {
    font: 600 11px/1 'Vazirmatn';
    opacity: .85;
}
.continue-title {
    font: 700 16px/1.4 'Vazirmatn';
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.continue-sub {
    font: 400 12px/1 'Vazirmatn';
    opacity: .85;
    margin-top: 5px;
}
.continue-progress {
    height: 5px;
    background: rgba(255,255,255,0.28);
    border-radius: 10px;
    margin-top: 14px;
    overflow: hidden;
}
.continue-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    border-radius: 10px;
}

/* ---------------- Search ---------------- */

.search-box {
    position: relative;
    margin-bottom: 14px;
}
.search-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.search-box input {
    width: 100%;
    padding: 13px 42px 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.search-box input::placeholder { color: var(--muted); }

.no-results {
    text-align: center;
    color: var(--muted);
    padding: 24px;
    font-size: 14px;
}

.section-label {
    padding: 4px 4px 12px;
    font: 700 13px/1 'Vazirmatn';
    color: var(--muted);
}

/* ---------------- Juz grid ---------------- */

.juz-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
}

.juz-item {
    aspect-ratio: 1 / 1;
    background: var(--card);
    border-radius: var(--radius-md);
    position: relative;
    cursor: pointer;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.juz-item:active { transform: scale(0.96); }
.juz-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.juz-item.active .juz-title-short { color: rgba(255,255,255,0.85); }
.juz-item.active .icon-btn { color: rgba(255,255,255,0.85); }
.juz-item.active .icon-btn:hover { color: #fff; }

.juz-item.last-played:not(.active) {
    box-shadow: var(--shadow-sm), inset 0 0 0 2px var(--accent);
}

.juz-cell-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.juz-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 800 14px/1 'Vazirmatn';
    color: var(--text);
}
.juz-item.active .juz-number { background: rgba(255,255,255,0.25); color: #fff; }

.juz-title {
    display: none;
}
.juz-title-short {
    font: 400 10px/1.4 'Vazirmatn';
    color: var(--muted);
    height: 14px;
    overflow: hidden;
    margin-top: 4px;
}

.juz-progress {
    height: 4px;
    background: var(--bg);
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
}
.juz-item.active .juz-progress { background: rgba(255,255,255,0.3); }
.juz-progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    border-radius: 10px;
}
.juz-item.active .juz-progress-fill { background: #fff; }

.juz-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.icon-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.juz-item.active .icon-btn:hover { background: rgba(255,255,255,0.15); }

.spinner {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Equalizer bars shown when a cell is actively playing */
.eq-bars {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}
.juz-item.is-audible .eq-bars { display: flex; }
.eq-bars-mini.is-audible { display: flex; }
.eq-bars span {
    display: block;
    width: 3px;
    background: currentColor;
    border-radius: 2px;
    animation: eq-bounce 0.9s ease-in-out infinite;
}
.eq-bars span:nth-child(1) { animation-delay: 0s; }
.eq-bars span:nth-child(2) { animation-delay: 0.15s; }
.eq-bars span:nth-child(3) { animation-delay: 0.3s; }
.eq-bars span:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq-bounce {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

/* ---------------- Mini player bar ---------------- */

.player-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: var(--card);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    z-index: 60;
    border: 1px solid var(--border);
}
.player-bar-progress {
    display: none;
}
.player-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}
.nav-btn {
    width: 36px;
    height: 36px;
    flex: none;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nav-btn:hover { background: var(--bg); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.nav-btn:disabled:hover { background: transparent; }

#globalPlayBtn {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16,185,129,0.35);
}
#globalPlayBtn:active { transform: scale(0.94); }

.player-bar-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.player-bar-title {
    font: 700 13px/1.2 'Vazirmatn';
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-bar-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font: 400 11px/1 'Vazirmatn';
    color: var(--muted);
}
.eq-bars-mini { color: var(--accent); }

/* ---------------- Full-screen detail / player sheet ---------------- */

.detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 100;
    overflow-y: auto;
}
.detail-overlay.visible { display: block; }

.detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    max-width: 480px;
    margin: 0 auto;
}
.detail-body {
    max-width: 480px;
    margin: 0 auto;
    padding: 10px 24px 32px;
    text-align: center;
}

.detail-art {
    width: 168px;
    height: 168px;
    margin: 10px auto 20px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 800 56px/1 'Vazirmatn';
    box-shadow: var(--shadow-md);
    user-select: none;
    -webkit-user-select: none;
}

.detail-eyebrow {
    font: 600 12px/1 'Vazirmatn';
    color: var(--muted);
}
.detail-title {
    font: 800 19px/1.5 'Vazirmatn';
    margin: 8px 0 24px;
}

.detail-seek {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 10px;
    background: var(--border);
    outline: none;
    margin: 0 0 8px;
}
.detail-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}
.detail-seek::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}
.detail-times {
    display: flex;
    justify-content: space-between;
    font: 400 12px/1 'Vazirmatn';
    color: var(--muted);
    direction: ltr;
    margin-bottom: 26px;
}

.detail-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-bottom: 30px;
}
.detail-nav-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.detail-nav-btn:disabled { opacity: .3; }
.detail-play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16,185,129,0.4);
}
.detail-play-btn:active, .detail-nav-btn:active { transform: scale(0.94); }

.detail-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.detail-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font: 600 12.5px/1 'Vazirmatn';
    cursor: pointer;
}
.detail-action-btn.active-state { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }

.detail-toast {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: var(--bg);
    padding: 10px 20px;
    border-radius: 999px;
    font: 600 13px/1 'Vazirmatn';
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 150;
    white-space: nowrap;
}
.detail-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Settings sheet ---------------- */

.sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 120;
    align-items: flex-end;
    justify-content: center;
}
.sheet-overlay.visible { display: flex; }
.sheet-panel {
    background: var(--bg);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    padding: 8px 20px 28px;
    animation: sheet-up 0.22s ease-out;
}
@keyframes sheet-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    margin: 10px auto 14px;
}
.sheet-title {
    font: 800 17px/1 'Vazirmatn';
    margin: 4px 0 18px;
    text-align: center;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}
.settings-row-text strong {
    display: block;
    font: 700 13.5px/1.4 'Vazirmatn';
}
.settings-row-text span {
    display: block;
    font: 400 11.5px/1.5 'Vazirmatn';
    color: var(--muted);
    margin-top: 3px;
}

.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: none;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(-20px); }
[dir="rtl"] .toggle-switch input:checked + .toggle-slider::before { transform: translateX(-20px); }

/* ---------------- Bookmarks list ---------------- */

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.bookmark-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.bookmark-info { flex: 1; min-width: 0; }
.bookmark-title { font: 700 13px/1.4 'Vazirmatn'; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bookmark-time { font: 400 11.5px/1 'Vazirmatn'; color: var(--muted); margin-top: 4px; direction: ltr; text-align: right; }
.bookmark-delete {
    background: transparent;
    border: none;
    color: var(--muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: none;
}
.bookmark-delete:hover { background: var(--bg); color: #ef4444; }
.bookmarks-empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13px; }

/* ---------------- Contact / designer card ---------------- */

.contact-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 8px 0 20px;
    box-shadow: var(--shadow-sm);
}
.contact-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.contact-logo {
    height: 34px;
    width: auto;
    border-radius: 6px;
}
.contact-header-text strong { display: block; font: 700 14px/1.3 'Vazirmatn'; }
.contact-header-text span { display: block; font: 400 12px/1.4 'Vazirmatn'; color: var(--muted); margin-top: 2px; }

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font: 600 13px/1 'Vazirmatn';
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
}
.contact-link.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.contact-link-label { display: flex; align-items: center; gap: 10px; }
.contact-note {
    font: 400 11.5px/1.8 'Vazirmatn';
    color: var(--muted);
    margin: 10px 2px 0;
}

/* ---------------- Mobile bottom tab bar ---------------- */

.tab-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    z-index: 55;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab-bar-row {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    max-width: 560px;
    margin: 0 auto;
}
.tab-bar-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 9px 4px 8px;
    cursor: pointer;
    font: 600 10.5px/1 'Vazirmatn';
}
.tab-bar-btn:active { opacity: .7; }
.tab-bar-btn.tab-active { color: var(--accent); }

@media (max-width: 600px) {
    .tab-bar { display: block; }
    body { padding-bottom: 78px; }
    .player-bar { bottom: 66px; }
}

.site-footer {
    max-width: 720px;
    margin: 18px auto 0;
    padding: 24px 20px 20px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}
.site-footer a { color: inherit; text-decoration: none; }

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 18px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-logo { height: 30px; width: auto; border-radius: 6px; }
.footer-brand-text strong { display: block; font: 700 13.5px/1.3 'Vazirmatn'; color: var(--text); }
.footer-brand-text span { display: block; font: 400 11.5px/1.4 'Vazirmatn'; color: var(--muted); margin-top: 1px; }

.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font: 600 12.5px/1 'Vazirmatn';
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent-dark); }

.footer-social { display: flex; align-items: center; gap: 8px; }
.footer-social-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    box-shadow: var(--shadow-sm);
}
.footer-social-btn:hover { color: var(--accent-dark); border-color: var(--accent-dark); }

.footer-bottom {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
}
.footer-bottom a {
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}
.footer-bottom a:hover { text-decoration: underline; }

/* نمای موبایل: چیدمان ستونی و فشرده‌تر، چون ناوبری اصلی روی نوار پایین است */
@media (max-width: 600px) {
    .site-footer {
        margin-top: 8px;
        padding: 20px 16px 16px;
        text-align: center;
    }
    .footer-top {
        flex-direction: column;
        gap: 14px;
        padding-bottom: 14px;
    }
    .footer-brand { flex-direction: column; gap: 6px; text-align: center; }
    .footer-links { gap: 22px; }
    .footer-bottom { font-size: 11px; }
}

/* ============================================================
   پنل مدیریت
   ============================================================ */

.admin-body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}
.admin-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}
.admin-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-header h1 { font: 800 20px/1.2 'Vazirmatn'; margin: 0; }
.admin-section-title { font: 700 15px/1.3 'Vazirmatn'; margin: 0 0 6px; }
.admin-section-desc { font: 400 12.5px/1.7 'Vazirmatn'; color: var(--muted); margin: 0 0 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-danger { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.btn-secondary { background: var(--bg); color: var(--text); }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}
table.admin-table th { color: var(--muted); font-weight: 700; font-size: 12px; }
table.admin-table tr:hover { background: var(--bg); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.form-group input {
    width: 100%;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; }
.flash-success { background: #dcfce7; color: #15803d; }
.flash-error { background: #fee2e2; color: #b91c1c; }

.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.login-box {
    background: var(--card);
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-md);
}
.login-box h1 { text-align: center; font: 800 19px/1.3 'Vazirmatn'; margin-top: 0; }

/* ---------------- Install overlay (shared) ---------------- */

.install-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}
.install-overlay.visible { display: flex; }
.install-modal {
    background: var(--card);
    color: var(--text);
    width: 100%;
    max-width: 420px;
    padding: 26px 22px 20px;
    border-radius: 24px 24px 0 0;
    text-align: center;
    box-shadow: var(--shadow-md);
    animation: sheet-up 0.22s ease-out;
}
.install-icon { font-size: 38px; margin-bottom: 10px; }
.install-modal h2 { font: 800 18px/1.3 'Vazirmatn'; margin: 0 0 10px; }
.install-desc { font: 400 13px/1.8 'Vazirmatn'; color: var(--muted); margin: 0 0 20px; }
.install-btn { width: 100%; text-align: center; font-size: 14.5px; padding: 13px; border-radius: 999px; }
.install-ios-steps { display: flex; flex-direction: column; gap: 10px; text-align: right; margin-bottom: 4px; }
.install-ios-step { display: flex; align-items: flex-start; gap: 10px; font: 400 13px/1.7 'Vazirmatn'; background: var(--bg); padding: 10px 12px; border-radius: var(--radius-sm); }
.install-ios-num { flex: none; width: 22px; height: 22px; background: var(--accent); color: #fff; font: 700 12px/22px 'Vazirmatn'; text-align: center; border-radius: 50%; }
.install-dismiss { display: block; width: 100%; margin-top: 14px; background: none; border: none; color: var(--muted); font: 700 13px/1 'Vazirmatn'; padding: 10px; cursor: pointer; }
