/* ============================================================
   app.css - استایل اصلی
   ============================================================ */

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5541d6;
    --green: #00b894;
    --orange: #fdcb6e;
    --red: #ff6b6b;
    
    --bg: #0f1420;
    --bg2: #1a2130;
    --bg3: #232b3d;
    --card: #1a2130;
    --card-hover: #232b3d;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.15);
    
    --text: #f0f4ff;
    --text-secondary: #b8c1d9;
    --muted: #7a85a3;
    
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    
    --header-height: 60px;
    --sidebar-width: 260px;
}

html[data-theme="light"] {
    --bg: #f0f2f7;
    --bg2: #ffffff;
    --bg3: #e8ecf3;
    --card: #ffffff;
    --card-hover: #f8fafc;
    --border: rgba(0,0,0,0.08);
    --border-strong: rgba(0,0,0,0.15);
    --text: #1a2332;
    --text-secondary: #4a5568;
    --muted: #64748b;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ===== Auth Pages ===== */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.auth-container { width: 100%; max-width: 440px; }

.auth-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
}

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-logo { max-height: 70px; margin-bottom: 12px; }
.auth-logo-placeholder {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 12px;
}
.auth-header h1 { font-size: 22px; margin-bottom: 4px; }
.auth-header p { color: var(--muted); font-size: 13px; }

.auth-form .form-group { margin-bottom: 16px; }
.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}
.auth-footer a { color: var(--primary-light); font-weight: 600; }

.auth-copyright {
    text-align: center;
    margin-top: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}
.auth-copyright a { color: white; font-weight: 600; }

/* ===== App Layout ===== */
.app-main {
    margin-right: 0;
    min-height: 100vh;
    padding-bottom: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ===== Header ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: var(--header-height);
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 10px; }

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
}
.header-logo img { height: 36px; }
.header-logo span:first-child { font-size: 24px; }

.mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

.icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: 0.2s;
}
.icon-btn:hover { background: var(--card-hover); }

.user-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border: 2px solid var(--border-strong);
}
.user-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg2);
    border-left: 1px solid var(--border);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}
.sidebar.open + .sidebar-overlay { display: block; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand img { height: 40px; }
.sidebar-brand span:first-child { font-size: 28px; }
.brand-text { font-weight: 700; font-size: 15px; flex: 1; }

.sidebar-close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}

.sidebar-nav { flex: 1; padding: 12px; overflow-y: auto; }
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: right;
    font-family: inherit;
}
.sidebar-item:hover { background: var(--card-hover); color: var(--text); }
.sidebar-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-weight: 600;
}
.sidebar-item.danger { color: var(--red); }
.sidebar-icon { font-size: 18px; }

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

/* ===== Welcome ===== */
.welcome { margin-bottom: 24px; }
.welcome h1 { font-size: 24px; margin-bottom: 4px; }
.welcome p { color: var(--muted); font-size: 13px; }

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 8px;
}
.stat-number { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ===== Quick Actions ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.quick-action {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text);
}
.quick-action:hover { background: var(--card-hover); transform: translateY(-2px); }
.qa-icon { font-size: 22px; margin-bottom: 4px; }
.qa-label { font-size: 11px; color: var(--muted); }

/* ===== Home Search ===== */
.home-search { margin-bottom: 24px; }
.search-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
    transition: 0.2s;
}
.search-link:hover { background: var(--card-hover); border-color: var(--primary); }

/* ===== Section ===== */
.section { margin-bottom: 32px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.section-header h2 { font-size: 18px; }
.section-header a { color: var(--primary-light); font-size: 13px; }

/* ===== Properties Grid ===== */
.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.property-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: 0.2s;
    display: block;
}
.property-card:hover { 
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.property-media {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--bg3);
    overflow: hidden;
}
.property-media img,
.property-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--muted);
}
.media-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.property-info { padding: 14px; }
.property-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.property-location { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.property-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}
.property-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 6px;
}
.rent-monthly { font-size: 12px; color: var(--text-secondary); font-weight: 400; }
.price-unknown { color: var(--muted); font-size: 12px; }
.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted);
}
.my-badge {
    background: rgba(0,184,148,0.15);
    color: var(--green);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

/* ===== Appointments ===== */
.appointments-list { display: flex; flex-direction: column; gap: 8px; }

.appointment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
}
.appointment-item.today { border-color: var(--green); background: rgba(0,184,148,0.05); }

.app-time {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    min-width: 60px;
    text-align: center;
}
.app-body { flex: 1; }
.app-title { font-size: 14px; font-weight: 600; }
.app-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.app-badge {
    background: var(--green);
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

/* ===== Search Page ===== */
.search-header {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.search-form { flex: 1; }
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 16px;
    height: 48px;
}
.search-input-wrap .search-icon {
    color: var(--muted);
    font-size: 18px;
    margin-left: 10px;
}
.search-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 12px 0;
    outline: none;
}
.search-clear {
    color: var(--muted);
    font-size: 18px;
    padding: 4px;
}

.filter-btn {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 18px;
    height: 48px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.filter-count {
    background: var(--primary);
    color: white;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
    scrollbar-width: thin;
}
.chips-row::-webkit-scrollbar { height: 3px; }
.chips-row::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.chip {
    padding: 6px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-secondary);
    transition: 0.2s;
}
.chip.active, .chip:hover { 
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Filter Panel ===== */
.filter-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}
.filter-panel.open {
    max-height: 2000px;
    opacity: 1;
    padding: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.filter-group label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.filter-group input:focus,
.filter-group select:focus { border-color: var(--primary); }
.filter-group.full { grid-column: 1 / -1; }

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.amenity-check {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}
.amenity-check:hover { border-color: var(--primary); }
.amenity-check input { cursor: pointer; }
.amenity-check input:checked ~ span { color: var(--primary-light); font-weight: 600; }

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* ===== Results ===== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.results-count { color: var(--muted); font-size: 13px; }
.sort-select {
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 24px 0;
    flex-wrap: wrap;
}
.page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: 0.2s;
}
.page-link:hover { border-color: var(--primary); }
.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}
.page-dots { padding: 0 6px; color: var(--muted); align-self: center; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }

.form-group textarea { min-height: 100px; resize: vertical; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-secondary);
}
.checkbox-label input { width: auto; }

/* ===== Buttons ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(108,92,231,0.3); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text);
}
.btn-outline:hover { background: var(--card-hover); }
.btn-danger { background: var(--red); color: white; }
.btn-block { width: 100%; }

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 13px;
    border: 1px solid;
}
.alert-success { background: rgba(0,184,148,0.1); color: var(--green); border-color: rgba(0,184,148,0.3); }
.alert-danger { background: rgba(255,107,107,0.1); color: var(--red); border-color: rgba(255,107,107,0.3); }
.alert-warning { background: rgba(253,203,110,0.1); color: var(--orange); border-color: rgba(253,203,110,0.3); }
.alert-info { background: rgba(108,92,231,0.1); color: var(--primary-light); border-color: rgba(108,92,231,0.3); }

/* ===== Toast ===== */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    animation: toastSlide 0.3s ease;
    pointer-events: auto;
    min-width: 240px;
    max-width: 90vw;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }
.toast.info { border-color: var(--primary-light); color: var(--primary-light); }

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

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}
.badge-success { background: rgba(0,184,148,0.15); color: var(--green); }
.badge-warning { background: rgba(253,203,110,0.15); color: var(--orange); }
.badge-danger { background: rgba(255,107,107,0.15); color: var(--red); }
.badge-primary { background: rgba(108,92,231,0.15); color: var(--primary-light); }
.badge-secondary { background: rgba(122,133,163,0.15); color: var(--muted); }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.empty-icon { font-size: 60px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

/* ===== Bottom Nav ===== */
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    align-items: center;
    z-index: 80;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 20px;
    padding: 6px 12px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: 0.2s;
}
.nav-item.active, .nav-item:hover { color: var(--primary-light); }
.nav-label { font-size: 10px; font-weight: 500; }

.nav-fab {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-top: -28px;
    box-shadow: 0 8px 24px rgba(108,92,231,0.4);
    border: 4px solid var(--bg);
    cursor: pointer;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .properties-grid { grid-template-columns: repeat(2, 1fr); }
    .appointment-item { padding: 14px 20px; }
}

@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
        position: fixed;
    }
    .sidebar-close { display: none; }
    .sidebar-overlay { display: none !important; }
    .mobile-menu-btn { display: none; }
    
    .app-main {
        margin-right: var(--sidebar-width);
        padding-bottom: 20px;
    }
    
    .bottom-nav { display: none; }
    
    .container { padding: 24px 32px; }
    
    .properties-grid { grid-template-columns: repeat(3, 1fr); }
    
    .welcome h1 { font-size: 28px; }
}

@media (min-width: 1440px) {
    .properties-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { gap: 6px; }
    .quick-action { padding: 12px 4px; }
    .qa-icon { font-size: 18px; }
    .qa-label { font-size: 10px; }
}

/* ===== کادر نوتیفیکیشن‌های جدید ===== */
.unread-notif-box {
    background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(168,85,247,.08));
    border: 1px solid rgba(99,102,241,.25);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(99,102,241,.08);
}

.unread-notif-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(99,102,241,.25);
}

.unread-notif-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239,68,68,.7);
    animation: notifPulse 1.8s infinite;
}

@keyframes notifPulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.7); }
    70%  { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* گرید مرتب برای هر تعداد نوتیفیکیشن */
.unread-notif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.unread-notif-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--card, rgba(255,255,255,.04));
    border: 1px solid rgba(99,102,241,.18);
    border-radius: 12px;
    padding: 12px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.unread-notif-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99,102,241,.15);
}

.unread-notif-card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(99,102,241,.12);
    border-radius: 10px;
}

.unread-notif-card-body {
    flex: 1;
    min-width: 0;
}

.unread-notif-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unread-notif-card-message {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.unread-notif-card-time {
    font-size: 11px;
    color: var(--muted);
}

.unread-notif-card-actions {
    flex-shrink: 0;
    align-self: center;
}

/* موبایل */
@media (max-width: 640px) {
    .unread-notif-grid {
        grid-template-columns: 1fr;
    }
    .unread-notif-box {
        padding: 12px;
        border-radius: 14px;
    }
}

/* ===== آیکن نوتیفیکیشن ===== */
.notif-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    transition: transform .15s ease, opacity .15s ease;
}

.notif-btn:hover {
    transform: scale(1.08);
    opacity: .85;
}

.notif-icon {
    display: inline-block;
    font-size: 20px;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg, #fff);
    pointer-events: none;
}

/* ============================================================
   Demo Banner
   ============================================================ */
.demo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.25);
    position: relative;
    z-index: 100;
}

.demo-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.demo-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.demo-banner-content strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 2px;
}

.demo-hint {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.4;
}

.demo-cta {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.demo-cta:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* موبایل */
@media (max-width: 640px) {
    .demo-banner {
        padding: 8px 12px;
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .demo-icon {
        font-size: 18px;
    }
    
    .demo-banner-content strong {
        font-size: 12px;
    }
    
    .demo-hint {
        font-size: 10px;
    }
    
    .demo-cta {
        padding: 6px 10px;
        font-size: 11px;
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   Stat Cards Clickable
   ============================================================ */
.stat-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-link::after {
    content: '←';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 14px;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.stat-link:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(108,92,231,0.2);
}

.stat-link:hover::after {
    opacity: 1;
    transform: translateX(-3px);
    color: var(--primary-light);
}

.stat-link:active {
    transform: translateY(-1px) scale(0.98);
}