/* ==========================================================================
   مؤسسة اللؤلؤة العقارية - PEARL REAL ESTATE (PRE)
   نظام إدارة وتسجيل قضايا ومطالبات المحامي
   التصميم: أحمر وأبيض (Red & White Luxury Identity)
   ========================================================================== */

:root {
    /* الألوان الرسمية لشعار PRE اللؤلؤة العقارية */
    --brand-red-900: #540d18;
    --brand-red-800: #701120;
    --brand-red-700: #8b1528;
    --brand-red-600: #a6192e;
    --brand-red-500: #c8102e;
    --brand-red-100: #ffe8ec;
    --brand-red-50: #fff5f7;
    
    --charcoal-900: #141416;
    --charcoal-800: #23262f;
    --charcoal-700: #353945;
    
    --surface-bg: #f5f6f8;
    --surface-card: #ffffff;
    --surface-border: #e6e8ec;
    --surface-border-focus: #b1b5c3;
    
    --text-main: #141416;
    --text-muted: #4b5563;
    --text-light: #9ca3af;
    
    --success-bg: #ecfdf5;
    --success-text: #065f46;
    --success-border: #a7f3d0;
    
    --warning-bg: #fffbeb;
    --warning-text: #92400e;
    --warning-border: #fde68a;
    
    --info-bg: #eff6ff;
    --info-text: #1e40af;
    --info-border: #bfdbfe;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 14px rgba(139, 21, 40, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-red: 0 4px 16px rgba(166, 25, 46, 0.28);
    
    --font-tajawal: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-cairo: 'Cairo', sans-serif;
}

/* التنسيق العام */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-tajawal);
    background-color: var(--surface-bg);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ==========================================================================
   العلامة المائية الشفافة الفاخرة للوقو في خلفية الموقع بالكامل (Burgundy Watermark)
   ========================================================================== */
.site-watermark-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.site-watermark-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(139, 21, 40, 0.035) 0%, rgba(112, 17, 32, 0.075) 100%);
    pointer-events: none;
}

.site-watermark-img {
    width: 700px;
    max-width: 88vw;
    height: auto;
    max-height: 82vh;
    object-fit: contain;
    opacity: 0.065; /* شفافية ناعمة وواضحة باللون العنابي الملكي */
    filter: drop-shadow(0 0 50px rgba(112, 17, 32, 0.45)) sepia(0.35) hue-rotate(325deg) saturate(1.9);
    mix-blend-mode: multiply;
    pointer-events: none;
    user-select: none;
    transform: scale(1.02);
}

.main-container,
.landing-page-wrap,
.login-page-screen,
.app-header {
    position: relative;
    z-index: 1;
}

/* شريط التنقل العلوي الفاخر (الأحمر والأبيض الملوكي) */
.app-header {
    background: linear-gradient(135deg, #400a12 0%, #701120 50%, #8b1528 100%);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2.5px solid rgba(255, 215, 0, 0.4);
}

.header-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* قسم اللوقو والهوية - مكبر وبارز جداً */
.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.brand-logo-wrap {
    width: 140px;
    height: 52px;
    border-radius: 12px;
    background: #ffffff;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 0 2px #ffd700;
    overflow: hidden;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.brand-logo-wrap:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 0 3px #ffd700;
}

.brand-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.brand-text h1 {
    font-family: var(--font-cairo);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    color: #ffffff;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brand-badge {
    background: #ffd700;
    color: #701120;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 2px 9px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.brand-text p {
    font-size: 0.82rem;
    color: #fde68a;
    font-weight: 600;
    margin: 0;
}

/* خيارات وأزرار النظام المنظمة */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.group-operations {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-case-btn {
    background: #ffffff;
    color: #701120;
    font-weight: 900;
    font-family: var(--font-cairo);
    font-size: 0.92rem;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1.5px rgba(255, 215, 0, 0.5);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-case-btn:hover {
    background: #fdf2f4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 2px #ffd700;
}

.group-tools {
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.group-tools .btn-outline-white {
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #f1f5f9;
    font-weight: 700;
    box-shadow: none;
}

.group-tools .btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-1px);
}

.group-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* الأزرار الرئيسية */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    line-height: 1;
}

/* الزر الأحمر الرئيسي */
.btn-red {
    background: linear-gradient(135deg, var(--brand-red-600), var(--brand-red-700));
    color: #ffffff;
    box-shadow: var(--shadow-red);
}

.btn-red:hover {
    background: linear-gradient(135deg, var(--brand-red-500), var(--brand-red-600));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(166, 25, 46, 0.4);
}

.btn-white {
    background: #ffffff;
    color: var(--brand-red-700);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-weight: 800;
}

.btn-white:hover {
    background: #fff0f3;
    transform: translateY(-2px);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffffff;
}

.btn-outline-dark {
    background: #ffffff;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-outline-dark:hover {
    background: #f1f5f9;
    border-color: #8b1528;
    color: #8b1528;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-icon-only {
    padding: 0.6rem;
    border-radius: var(--radius-md);
}

.btn-whatsapp {
    background: #25d366;
    color: #ffffff;
    font-weight: 700;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-ejar {
    background: #00875a;
    color: #ffffff;
}

.btn-ejar:hover {
    background: #00704a;
}

.btn-lessor {
    background: var(--brand-red-700);
    color: #ffffff;
}

.btn-lessor:hover {
    background: var(--brand-red-600);
}

/* شاشة لوحة تحكم الإدارة والموظفين والمحامي بالخلفية السينمائية الفاخرة */
#mainAppScreen {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(55, 8, 18, 0.90) 50%, rgba(10, 10, 18, 0.94) 100%), 
                url('../assets/justice_hero_bg.jpg') center top / cover fixed no-repeat;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* الحاوية الرئيسية */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    flex: 1;
    position: relative;
    z-index: 2;
}

/* شريط الإحصائيات (Glassmorphism & Gold Accent) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 215, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    border-color: #ffd700;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--brand-red-700);
}

.stat-card.stat-red::before { background: var(--brand-red-600); }
.stat-card.stat-amber::before { background: #f59e0b; }
.stat-card.stat-purple::before { background: #8b5cf6; }
.stat-card.stat-green::before { background: #10b981; }

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: var(--brand-red-50);
    color: var(--brand-red-700);
}

.stat-info .stat-num {
    font-family: var(--font-cairo);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-info .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

/* شريط التحكم، البحث والتصفية */
.control-panel {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.search-box-wrap {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-box-wrap input {
    width: 100%;
    padding: 0.75rem 2.8rem 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    background: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box-wrap input:focus {
    border-color: var(--brand-red-600);
    box-shadow: 0 0 0 3px rgba(166, 25, 46, 0.15);
}

.search-box-wrap .search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    pointer-events: none;
}

.status-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.status-tab-btn {
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.status-tab-btn:hover {
    background: #f1f5f9;
    color: var(--brand-red-700);
}

.status-tab-btn.active {
    background: var(--brand-red-700);
    color: #ffffff;
    border-color: var(--brand-red-700);
}

.status-tab-btn .tab-count {
    display: inline-block;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 10px;
    margin-right: 4px;
}

.status-tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

.view-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle-btn {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: #ffffff;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.view-toggle-btn.active {
    background: var(--brand-red-700);
    color: #ffffff;
    border-color: var(--brand-red-700);
}

/* بطاقات القضايا (Grid View) */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.case-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
    border-color: #ffd700;
}

.case-card-header {
    padding: 1.1rem 1.25rem;
    background: #fffbfc;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.case-num-badge {
    font-family: var(--font-cairo);
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--brand-red-700);
    background: var(--brand-red-50);
    border: 1px solid var(--brand-red-100);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
}

.case-title-name {
    font-family: var(--font-cairo);
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nationality-tag {
    font-size: 0.75rem;
    background: #f3f4f6;
    color: #374151;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

/* الشارات للحالة */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.status-pill.status-new {
    background: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-border);
}

.status-pill.status-with_lawyer {
    background: var(--brand-red-50);
    color: var(--brand-red-700);
    border: 1px solid var(--brand-red-100);
}

.status-pill.status-in_court {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #d8b4fe;
}

.status-pill.status-judgment_issued {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.status-pill.status-completed {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.case-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    border-bottom: 1px dashed #f1f5f9;
    padding-bottom: 0.4rem;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-value {
    color: var(--text-main);
    font-weight: 700;
}

.info-value.amount {
    color: var(--brand-red-700);
    font-family: var(--font-cairo);
    font-weight: 900;
    font-size: 1.1rem;
}

.case-claim-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.case-claim-box strong {
    color: var(--brand-red-800);
    display: block;
    margin-bottom: 3px;
    font-size: 0.82rem;
}

/* روابط منصة إيجار ومعلومات المؤجر */
.case-links-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-link-action {
    flex: 1;
    min-width: 140px;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.case-card-footer {
    padding: 0.9rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.footer-actions-left {
    display: flex;
    gap: 0.4rem;
}

.footer-actions-right {
    display: flex;
    gap: 0.4rem;
}

/* جدول القضايا (Table View) */
.table-responsive {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.cases-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.9rem;
}

.cases-table th {
    background: #f9fafb;
    color: var(--text-muted);
    font-weight: 800;
    padding: 1rem;
    border-bottom: 1px solid var(--surface-border);
    white-space: nowrap;
}

.cases-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--surface-border);
    vertical-align: middle;
}

.cases-table tbody tr:hover {
    background: #fff9fa;
}

.cases-table tbody tr:last-child td {
    border-bottom: none;
}

/* حالة عدم وجود قضايا */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface-card);
    border: 2px dashed var(--surface-border);
    border-radius: var(--radius-xl);
    margin: 2rem 0;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.empty-state h3 {
    font-family: var(--font-cairo);
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 450px;
    margin: 0 auto 1.5rem auto;
    font-size: 0.92rem;
}

/* النوافذ المنبثقة (Modals) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    padding: 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-container {
    background: #f8fafc; /* خلفية ناعمة وراقية مريحة جداً للعين وتزيل الوهج الأبيض الفاقع */
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s;
    margin: auto;
    border: 1px solid #e2e8f0;
}

.modal-container form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #701120 0%, #8b1528 100%);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(112, 17, 32, 0.2);
}

.modal-header h2 {
    font-family: var(--font-cairo);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #ffffff;
}

.modal-body {
    padding: 1.5rem;
    background: #f8fafc; /* لون مريح يبرز البطاقات والمدخلات بوضوح تام */
    overflow-y: auto !important;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 120px;
    max-height: calc(100vh - 180px);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* بطاقة عنوان القضية العلوية داخل النافذة */
.lawyer-case-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border: 1.5px solid #fecdd3;
    border-right: 4.5px solid #8b1528;
    border-radius: 10px;
    padding: 11px 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(139, 21, 40, 0.05);
}

/* شريط تمرير أنيق وواضح */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--brand-red-600);
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f1f5f9;
    border-top: 1.5px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* نماذج الإدخال (Forms) */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}

.form-group-full {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1e293b; /* داكن ومريح للعين وواضح جداً */
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label .required {
    color: var(--brand-red-600);
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.95rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a; /* لون خط داكن وواضح 100% */
    background: #ffffff;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.form-control:focus {
    border-color: #8b1528;
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(139, 21, 40, 0.12);
}

select.form-control {
    cursor: pointer;
    background-color: #ffffff;
}

input[type="date"].form-control {
    color: #0f172a;
    font-weight: 700;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
    line-height: 1.6;
}

/* وسوم سريعة للمطالبة */
.quick-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.quick-tag-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.quick-tag-btn:hover {
    background: var(--brand-red-50);
    color: var(--brand-red-700);
    border-color: var(--brand-red-100);
}

/* رفع الشعار وتخصيصه */
.logo-preview-box {
    width: 130px;
    height: 130px;
    margin: 0 auto 1rem auto;
    border-radius: var(--radius-lg);
    border: 2px solid var(--brand-red-600);
    padding: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.logo-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==========================================================================
   أنماط خطاب الإحالة الرسمي للمحامي (Official Legal Dispatch Letter)
   ========================================================================== */

.letter-page {
    background: #ffffff;
    color: #1e293b;
    font-family: var(--font-tajawal);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}

.letter-company-name {
    font-family: var(--font-cairo);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--brand-red-700);
    margin-bottom: 1px;
}

.letter-company-eng {
    font-size: 0.85rem;
    font-weight: 800;
    color: #141416;
    letter-spacing: 1px;
}

.letter-company-sub {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
}

.letter-company-cr, .letter-company-phone {
    font-size: 0.82rem;
    color: #475569;
}

.letter-logo-box {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.letter-meta-info {
    text-align: left;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
}

.letter-divider {
    height: 3px;
    background: linear-gradient(90deg, var(--brand-red-700) 0%, #c8102e 50%, var(--brand-red-700) 100%);
    margin: 10px 0 20px 0;
    border-radius: 2px;
}

.letter-title-container {
    text-align: center;
    margin-bottom: 20px;
}

.letter-main-title {
    font-family: var(--font-cairo);
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    background: var(--brand-red-700);
    display: inline-block;
    padding: 6px 28px;
    border-radius: 8px;
}

.letter-recipient {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: #1e293b;
}

.letter-greeting {
    margin: 8px 0;
    font-weight: 700;
}

.letter-intro-text {
    font-size: 0.92rem;
    color: #334155;
    text-align: justify;
    margin-bottom: 15px;
}

.letter-section-title {
    font-family: var(--font-cairo);
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand-red-700);
    border-bottom: 2px solid #fee2e2;
    padding-bottom: 4px;
    margin: 15px 0 10px 0;
}

.letter-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.letter-table td {
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
}

.letter-table .td-label {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
    width: 22%;
}

.letter-table .td-value {
    color: #0f172a;
    width: 28%;
}

.highlight-name {
    font-weight: 800 !important;
    color: var(--brand-red-700) !important;
}

.highlight-nat {
    font-weight: 700 !important;
    color: #1f2937 !important;
}

.highlight-amount {
    font-weight: 900 !important;
    color: var(--brand-red-700) !important;
    font-size: 1.05rem;
}

.letter-link {
    color: var(--brand-red-600);
    text-decoration: underline;
    word-break: break-all;
    font-size: 0.85rem;
}

.letter-box-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.claim-text {
    color: #0f172a;
    font-weight: 500;
}

.notes-box {
    background: #fff5f7;
    border-color: #fecdd3;
    font-size: 0.88rem;
}

.letter-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 15px;
}

.letter-sign-block, .letter-stamp-block {
    width: 45%;
    text-align: center;
}

.sign-title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.sign-name {
    font-size: 0.85rem;
    color: #475569;
}

.sign-space {
    height: 40px;
}

.stamp-box {
    width: 110px;
    height: 110px;
    border: 2px dashed var(--brand-red-700);
    border-radius: 50%;
    margin: 10px auto 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--brand-red-700);
    font-weight: 800;
}

.letter-bottom-bar {
    margin-top: 25px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* التذييل العام للبرنامج */
.app-footer {
    background: #141416;
    color: #9ca3af;
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-footer a {
    color: var(--brand-red-500);
    text-decoration: none;
}

/* ==========================================================================
   تنسيقات نظام الحسابات وإدارة الصلاحيات
   ========================================================================== */

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.32);
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    padding: 4px 10px 4px 6px;
    border-radius: 100px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #ffffff;
    color: #701120;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name-text {
    font-size: 0.84rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
}

.user-role-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    margin-top: 1px;
}

.user-role-pill.role-admin {
    background: #ffd700;
    color: #701120;
}

.user-role-pill.role-lawyer {
    background: #e0e7ff;
    color: #3730a3;
}

.user-role-pill.role-staff {
    background: #fee2e2;
    color: #991b1b;
}

.user-role-pill.role-marketing {
    background: #e0f2fe;
    color: #0369a1;
}

.btn-logout {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-right: 2px;
}

.btn-logout:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* بطاقات التبديل السريع للحسابات */
.quick-login-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.quick-login-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-login-card:hover {
    border-color: var(--brand-red-600);
    background: var(--brand-red-50);
    transform: translateY(-2px);
}

.quick-login-card .icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.quick-login-card .title {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-main);
}

.quick-login-card .sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==========================================================================
   تنسيقات صفحة تسجيل الدخول المقسمة ذات الترويسة الفاخرة (Split Card Login)
   مطابقة لطلب المستخدم وبألوان اللؤلؤة العقارية الملكية (Royal Red)
   ========================================================================== */

.login-page-screen {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 30%, #350711 0%, #1a0308 60%, #0d0104 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    position: relative;
    overflow-y: auto;
}

.login-split-card-wrapper {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-top-nav-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.btn-login-back-landing {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.btn-login-back-landing:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    border-color: #ffd700;
}

/* بطاقة تسجيل الدخول المركزية المقسمة */
.login-split-card {
    background: #1f2937;
    border-radius: 24px;
    box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: loginCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* الترويسة العلوية باللون العنابي الرسمي */
.login-split-header {
    background: linear-gradient(135deg, #701120 0%, #8b1528 50%, #5b0d1b 100%);
    color: #ffffff;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1.5px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.split-header-info {
    display: flex;
    flex-direction: column;
}

.split-header-title {
    font-family: var(--font-cairo);
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 3px 0;
}

.split-header-subtitle {
    font-size: 0.84rem;
    color: #fde68a;
    font-weight: 600;
    margin: 0;
}

.split-header-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* جسم البطاقة المقسم (نموذج + صورة) */
.login-split-body {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 420px;
}

/* عمود نموذج الدخول */
.split-form-col {
    background: #1e2632;
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

/* شريط تبويبات الأدوار السريعة */
.split-role-tabs-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.split-role-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 4px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.split-role-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.split-role-tab.active {
    background: linear-gradient(135deg, #8b1528, #701120);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(139, 21, 40, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.35);
}

.split-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* صندوق تنبيه الخطأ الاحترافي داخل صفحة تسجيل الدخول */
.login-error-alert {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1.5px solid #ef4444;
    border-right: 4px solid #dc2626;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.12);
    animation: loginAlertShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes loginAlertShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.login-error-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.login-error-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.login-error-text {
    font-size: 0.84rem;
    font-weight: 700;
    color: #991b1b;
    line-height: 1.4;
    font-family: var(--font-cairo);
}

.login-error-close {
    background: transparent;
    border: none;
    color: #b91c1c;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.login-error-close:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #7f1d1d;
}

/* تمييز حقول الإدخال عند حدوث خطأ */
.split-input-field.input-error {
    border-color: #ef4444 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.split-input-group {
    position: relative;
    width: 100%;
}

.split-input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #64748b;
    pointer-events: none;
}

.split-input-field {
    width: 100%;
    height: 52px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 26px;
    padding: 0 50px 0 46px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
    transition: all 0.2s;
}

.split-input-field:focus {
    background: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
    outline: none;
}

.btn-toggle-eye {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.2s;
}

.btn-toggle-eye:hover {
    color: #0f172a;
}

.split-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    color: #cbd5e1;
    padding: 0 6px;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #cbd5e1;
    user-select: none;
}

.remember-me-label input {
    accent-color: #8b1528;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-pw-link {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-pw-link:hover {
    color: #fde68a;
    text-decoration: underline;
}

.btn-split-login-submit {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #8b1528 0%, #a6192e 50%, #701120 100%);
    color: #ffffff;
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    border-radius: 26px;
    font-size: 1.1rem;
    font-weight: 900;
    font-family: var(--font-cairo);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(139, 21, 40, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 4px;
}

.btn-split-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 21, 40, 0.6), 0 0 15px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

.login-submit-arrow {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.btn-split-login-submit:hover .login-submit-arrow {
    transform: translateX(-4px);
}

.split-card-footer-text {
    text-align: center;
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 6px;
}

/* عمود الصورة ومكتب العمل */
.split-photo-col {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    min-height: 380px;
    display: flex;
}

.split-office-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.split-photo-col:hover .split-office-img {
    transform: scale(1.04);
}

.split-photo-overlay-tag {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

@media (max-width: 820px) {
    .login-split-body {
        grid-template-columns: 1fr;
    }
    .split-photo-col {
        display: none;
    }
}
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

/* ==========================================================================
   دورة الاعتماد والموافقة - Approval Workflow Styles
   الموظف يرفع → الإدارة تعتمد → المحامي يستلم
   ========================================================================== */

/* بطاقة بانتظار الموافقة - تمييز بصري خاص */
.case-card.card-pending-highlight {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 60%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
    position: relative;
}

.case-card.card-pending-highlight::before {
    content: '⏳ بانتظار موافقة الإدارة';
    position: absolute;
    top: -1px;
    right: 16px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.02em;
    z-index: 1;
    font-family: var(--font-cairo);
}

/* لمدير النظام (الإدارة) */
.case-card.card-pending-highlight.card-pending-admin::before,
body[data-role="admin"] .case-card.card-pending-highlight::before {
    content: '⏳ بانتظار موافقتك';
}

/* للموظف */
.case-card.card-pending-highlight.card-pending-staff::before,
body[data-role="staff"] .case-card.card-pending-highlight::before {
    content: '⏳ بانتظار موافقة الإدارة';
}

/* بطاقة تحتاج لتعديل - تمييز بصري خاص */
.case-card.card-rejected-highlight {
    border: 2px solid #ef4444;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 60%);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.18);
    position: relative;
}

.case-card.card-rejected-highlight::before {
    content: '❌ تحتاج تعديل واستكمال';
    position: absolute;
    top: -1px;
    right: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.02em;
    z-index: 1;
    font-family: var(--font-cairo);
}

/* صندوق ملاحظات الرفض داخل البطاقة */
.rejection-card-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: #991b1b;
}

.rejection-card-box strong {
    display: block;
    font-weight: 800;
    margin-bottom: 2px;
}

.rejection-card-box p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #7f1d1d;
}

/* تنبيه الرفض داخل نموذج التعديل */
.case-rejection-alert {
    background: #fef2f2;
    border: 1.5px solid #f87171;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #991b1b;
}

.rejection-alert-title {
    font-family: var(--font-cairo);
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rejection-alert-desc {
    font-size: 0.88rem;
    font-weight: 700;
    color: #7f1d1d;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.rejection-alert-hint {
    font-size: 0.8rem;
    color: #b91c1c;
}

/* تبويب "بانتظار موافقتك" مميز بلون أصفر للإدارة */
.status-tab-btn.tab-highlight-pending {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border-color: #f59e0b;
    font-weight: 800;
    position: relative;
}

.status-tab-btn.tab-highlight-pending.active,
.status-tab-btn.tab-highlight-pending:hover {
    background: #f59e0b;
    color: #ffffff;
    border-color: #d97706;
}

/* حالة مرفوضة */
.status-pill.status-rejected {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* حالة بانتظار الموافقة */
.status-pill.status-pending_approval {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

/* أزرار القرار في footer المدير */
.approval-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* زر الموافقة الخضراء */
.btn-approve {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 7px 14px;
    font-size: 0.83rem;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font-cairo);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3);
}

.btn-approve:hover {
    background: linear-gradient(135deg, #15803d, #14532d);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(22, 163, 74, 0.4);
}

/* رسالة توجيهية للموظف في modal القضية */
.staff-info-banner {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* workflow indicator - مؤشر مسار العملية */
.workflow-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
}

.workflow-step.active {
    color: var(--brand-red-700);
}

.workflow-step.done {
    color: #16a34a;
}

.workflow-arrow {
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* شارة "تحديث المحامي" داخل نافذة التحديث */
.lawyer-update-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1.5px solid #6ee7b7;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.lawyer-update-badge .badge-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.lawyer-update-badge .badge-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #064e3b; /* أخضر غامق واضح جداً */
    margin-bottom: 3px;
}

.lawyer-update-badge .badge-sub {
    font-size: 0.8rem;
    color: #047857; /* تباين مريح للعين */
    font-weight: 600;
    opacity: 0.95;
}

/* شارة "آخر تحديث من المحامي" على البطاقة */
.lawyer-updated-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1.5px solid #10b981;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #065f46;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.lawyer-updated-tag .updated-icon {
    font-size: 0.95rem;
    animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* بانر تحديث المحامي الواضح والبارز داخل بطاقة القضية للموظف والإدارة */
.lawyer-update-banner {
    background: linear-gradient(135deg, #f0fdf4 0%, #e6fcf0 100%);
    border: 1.5px solid #a7f3d0;
    border-right: 4px solid #10b981;
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lawyer-update-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 800;
    color: #065f46;
}

.lawyer-update-banner-header .lawyer-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #047857;
}

.lawyer-update-banner-date {
    font-size: 0.72rem;
    color: #059669;
    font-weight: 600;
}

.lawyer-update-banner-note {
    font-size: 0.8rem;
    color: #1e293b;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px dashed #86efac;
    margin-top: 3px;
    line-height: 1.4;
}

/* تاريخ الجلسة القادمة في البطاقة */
.hearing-date-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1.5px solid #60a5fa;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #1e40af;
    margin-top: 4px;
}

/* موعد الإخلاء في البطاقة */
.eviction-date-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1.5px solid #fb923c;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #c2410c;
    margin-top: 4px;
}

/* حالة مخصصة (أخرى) */
.status-pill.status-other {
    background: #fdf4ff;
    color: #86198f;
    border-color: #f0abfc;
}

/* ==========================================================================
   شاشة البداية المتحركة للوقو - Splash Intro Screen
   ========================================================================== */
.splash-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #701120 0%, #400a12 60%, #1f0408 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-intro-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.splash-logo-halo {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 215, 0, 0.6);
    animation: rotateRing 12s linear infinite;
}

.splash-pulse-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166, 25, 46, 0.6) 0%, rgba(255, 215, 0, 0.2) 40%, transparent 70%);
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

.splash-logo-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.4), 0 0 80px rgba(166, 25, 46, 0.8);
    animation: scaleInLogo 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    z-index: 2;
}

.splash-title-text {
    color: #ffffff;
    font-family: var(--font-cairo);
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    animation: fadeInUpText 1s 0.3s ease both;
}

.splash-sub-text {
    color: #fde68a;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
    animation: fadeInUpText 1s 0.5s ease both;
}

.splash-badge-text {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 18px;
    border-radius: 30px;
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    animation: fadeInUpText 1s 0.7s ease both;
}

.splash-skip-btn {
    position: absolute;
    bottom: 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.splash-skip-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    from { transform: scale(0.9); opacity: 0.5; }
    to { transform: scale(1.15); opacity: 1; }
}

@keyframes scaleInLogo {
    0% { transform: scale(0.2) rotate(-15deg); opacity: 0; }
    70% { transform: scale(1.08) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

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

/* ==========================================================================
   الصفحة الرئيسية الفاخرة للزوار - Visitor Landing Page
   ========================================================================== */
.landing-page-wrap {
    min-height: 100vh;
    background: #f8fafc;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

/* شريط التنقل العلوي للزوار */
.landing-nav-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(139, 21, 40, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.landing-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.landing-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.landing-logo-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--brand-red-700);
    box-shadow: 0 2px 10px rgba(139, 21, 40, 0.2);
}

.landing-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing-brand-name {
    font-family: var(--font-cairo);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--brand-red-800);
    line-height: 1.1;
}

.landing-brand-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    list-style: none;
}

.landing-nav-link {
    color: var(--charcoal-800);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
    padding: 6px 0;
}

.landing-nav-link:hover,
.landing-nav-link.active {
    color: var(--brand-red-700);
}

.landing-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2.5px;
    background: var(--brand-red-700);
    border-radius: 2px;
    transition: width 0.25s ease;
}

.landing-nav-link:hover::after,
.landing-nav-link.active::after {
    width: 100%;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   قسم البطل السينمائي الفاخر (Cinematic Law & Real Estate Hero Section)
   مطابق تماماً للفكرة المطلوبة بخلفية ميزان العدالة والأزرار المركزة
   ========================================================================== */
.landing-hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem;
    position: relative;
    background-image: url('../assets/justice_hero_bg.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: #ffffff;
    overflow: hidden;
}

.landing-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.72) 0%, rgba(40, 6, 12, 0.86) 65%, rgba(10, 10, 15, 0.95) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-centered-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 980px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fef08a;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-title-centered {
    font-family: var(--font-cairo);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.hero-title-centered span {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.hero-desc-centered {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #f1f5f9;
    margin-bottom: 2.5rem;
    max-width: 820px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    font-weight: 500;
}

.hero-buttons-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

/* زر الواتساب الأبيض المستدير في الهيرو */
.hero-btn-whatsapp {
    background: #ffffff;
    color: #0f172a;
    padding: 0.9rem 2.2rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    font-family: var(--font-cairo);
}

.hero-btn-whatsapp:hover {
    background: #25d366;
    color: #ffffff;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

/* زر الجوال الكحلي / العنابي */
.hero-btn-phone {
    background: #1e293b;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    padding: 0.9rem 2.2rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    font-family: var(--font-cairo);
}

.hero-btn-phone:hover {
    background: #334155;
    border-color: #ffd700;
    color: #fef08a;
    transform: translateY(-3px) scale(1.03);
}

/* زر دخول النظام */
.hero-btn-login {
    background: linear-gradient(135deg, #8b1528, #701120);
    color: #ffffff;
    border: 1.5px solid #ffd700;
    padding: 0.9rem 2rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 25px rgba(139, 21, 40, 0.4);
    transition: all 0.25s ease;
    font-family: var(--font-cairo);
}

.hero-btn-login:hover {
    background: linear-gradient(135deg, #a81c34, #8b1528);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(139, 21, 40, 0.6);
}

/* زر الواتساب العائم في أسفل الشاشة */
.floating-quick-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.3);
    z-index: 9999;
    text-decoration: none;
    transition: all 0.25s ease;
    animation: waPulse 2.5s infinite;
}

.floating-quick-whatsapp:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.7), 0 0 0 5px rgba(255, 255, 255, 0.5);
}

@keyframes waPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* شريط الإحصائيات السريع للزوار */
.landing-stats-bar {
    max-width: 1200px;
    margin: -3rem auto 3rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 35px rgba(139, 21, 40, 0.12);
    border: 1px solid #f1f5f9;
    padding: 1.8rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

.stat-item {
    text-align: center;
    border-left: 1px solid #e2e8f0;
    padding: 0 10px;
}

.stat-item:last-child {
    border-left: none;
}

.stat-item-num {
    font-family: var(--font-cairo);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--brand-red-700);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-item-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* الأقسام العامة في الموقع */
.landing-section {
    padding: 4.5rem 1.5rem;
}

.landing-section.alt-bg {
    background: #f1f5f9;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header-wrap {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.section-badge {
    display: inline-block;
    background: var(--brand-red-100);
    color: var(--brand-red-700);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-cairo);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--charcoal-900);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* شبكة الخدمات (Services Grid) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.service-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(139, 21, 40, 0.12);
    border-color: var(--brand-red-500);
}

.service-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--brand-red-50);
    color: var(--brand-red-700);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    border: 1px solid var(--brand-red-100);
}

.service-card-title {
    font-family: var(--font-cairo);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--charcoal-900);
    margin-bottom: 10px;
}

.service-card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

/* شبكة من نحن (About Us Grid) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.about-text-wrap h3 {
    font-family: var(--font-cairo);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--brand-red-800);
    margin-bottom: 1.2rem;
    line-height: 1.35;
}

.about-text-wrap p {
    font-size: 1.05rem;
    color: var(--charcoal-700);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.about-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--charcoal-900);
}

.about-feature-item .check-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.about-cards-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.about-stat-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.about-stat-box .box-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.about-stat-box .box-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand-red-800);
    margin-bottom: 4px;
}

.about-stat-box .box-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* قسم تواصل معنا (Contact Section) */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card-item {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.contact-card-item:hover {
    border-color: var(--brand-red-600);
    transform: translateX(-4px);
    box-shadow: 0 6px 18px rgba(139, 21, 40, 0.1);
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--brand-red-50);
    color: var(--brand-red-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-card-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-card-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--charcoal-900);
}

.contact-form-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
}

.contact-form-card h3 {
    font-family: var(--font-cairo);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-red-800);
    margin-bottom: 1.2rem;
}

/* الفوتر للزوار */
.landing-footer {
    background: #141416;
    color: #ffffff;
    padding: 3.5rem 1.5rem 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-bottom-text {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* تجاوب الشاشات (Responsive) */
@media (max-width: 992px) {
    .landing-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-desc {
        margin: 0 auto 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 0;
    }
    
    .stat-item:nth-child(2) {
        border-left: none;
    }
}

@media (max-width: 768px) {
    .landing-nav-links {
        display: none;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-cards-col {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.1rem;
    }
    
    .landing-stats-bar {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .stat-item {
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 12px;
    }
    
    .stat-item:last-child {
        border-bottom: none;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .header-actions {
        justify-content: space-between;
    }
    
    .quick-login-grid {
        grid-template-columns: 1fr;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group-full {
        grid-column: span 1;
    }
    
    .search-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-tabs {
        width: 100%;
        overflow-x: auto;
    }
}

/* ==========================================================================
   ودجت ونافذة المساعد العقاري الذكي (AI Assistant Widget)
   ========================================================================== */
.ai-widget-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    font-family: var(--font-cairo), sans-serif;
}

/* الزر العائم للمساعد الذكي */
.ai-floating-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #701120 0%, #a6192e 50%, #8b1528 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 215, 0, 0.6);
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(139, 21, 40, 0.4), 0 0 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.ai-floating-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(139, 21, 40, 0.5), 0 0 25px rgba(255, 215, 0, 0.5);
    border-color: #ffd700;
}

.ai-floating-btn.active {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.ai-btn-icon {
    font-size: 1.3rem;
    animation: rotateAIIcon 4s ease-in-out infinite alternate;
}

@keyframes rotateAIIcon {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.15) rotate(15deg); }
}

.ai-btn-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 44px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    animation: aiPulseRing 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
}

@keyframes aiPulseRing {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* نافذة الدردشة المنبثقة */
.ai-chat-window {
    position: absolute;
    bottom: 64px;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 36px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: aiSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

@keyframes aiSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ترويسة الدردشة */
.ai-chat-header {
    background: linear-gradient(135deg, #701120 0%, #8b1528 100%);
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
}

.ai-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #701120;
}

.ai-header-title {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.ai-header-sub {
    font-size: 0.72rem;
    color: #fde68a;
    font-weight: 600;
}

.ai-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.ai-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* جسم المحادثة وقائمة الرسائل */
.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: aiMsgIn 0.25s ease;
}

@keyframes aiMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-bot-message {
    align-self: flex-start;
    max-width: 90%;
}

.ai-user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    max-width: 85%;
}

.ai-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ai-user-message .ai-msg-avatar {
    background: var(--brand-red-700);
    color: #fff;
    border-color: var(--brand-red-800);
}

.ai-msg-content {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 14px 14px 14px 4px;
    padding: 12px 14px;
    font-size: 0.88rem;
    line-height: 1.55;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.ai-user-message .ai-msg-content {
    background: linear-gradient(135deg, #8b1528 0%, #a6192e 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px 14px 4px 14px;
    box-shadow: 0 4px 12px rgba(139, 21, 40, 0.25);
}

.ai-msg-content p {
    margin-bottom: 6px;
}

.ai-msg-content p:last-child {
    margin-bottom: 0;
}

.ai-msg-content ul,
.ai-msg-content ol {
    margin-bottom: 6px;
}

.ai-msg-action-wrap {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
}

.ai-msg-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
    border: none;
}

.ai-msg-action-btn.ai-btn-green {
    background: #10b981;
    color: #ffffff;
}

.ai-msg-action-btn.ai-btn-green:hover {
    background: #059669;
}

.ai-msg-action-btn.ai-btn-red {
    background: var(--brand-red-700);
    color: #ffffff;
}

.ai-msg-action-btn.ai-btn-red:hover {
    background: var(--brand-red-800);
}

.ai-msg-action-btn.ai-btn-gold {
    background: #d97706;
    color: #ffffff;
}

.ai-msg-action-btn.ai-btn-gold:hover {
    background: #b45309;
}

/* الأسئلة المقترحة السريعة */
.ai-suggestions-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.ai-suggestion-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--brand-red-800);
    padding: 7px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    font-family: inherit;
}

.ai-suggestion-chip:hover {
    background: #fff1f2;
    border-color: var(--brand-red-500);
    transform: translateX(-3px);
}

/* مؤشر الكتابة للذكاء الاصطناعي */
.ai-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
}

.ai-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-red-600);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

/* تذييل الدردشة وحقل الإدخال */
.ai-chat-footer {
    background: #ffffff;
    padding: 10px 14px;
    border-top: 1px solid #e2e8f0;
}

.ai-chat-footer form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    border-color: var(--brand-red-700);
    box-shadow: 0 0 0 3px rgba(139, 21, 40, 0.1);
}

.ai-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--brand-red-700);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    background: var(--brand-red-800);
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .ai-widget-container {
        bottom: 16px;
        left: 16px;
    }
    
    .ai-chat-window {
        width: calc(100vw - 32px);
        height: 480px;
        bottom: 60px;
    }
    
    .ai-floating-btn {
        padding: 10px 16px;
        font-size: 0.88rem;
    }
}

/* ==========================================================================
   تنسيقات محدد نوع الرفع (مطالبة مالية / إخلاء عقار / أخرى) والمستندات الأربعة
   ========================================================================== */
.claim-type-selector-wrap {
    margin-bottom: 20px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 16px;
}

.claim-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.claim-type-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    user-select: none;
}

.claim-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.claim-type-card:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.claim-type-card.active {
    border-color: var(--brand-red-700);
    background: #fff1f2;
    box-shadow: 0 4px 15px rgba(139, 21, 40, 0.12);
}

.claim-type-card .type-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f1f5f9;
    border-radius: 10px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.claim-type-card.active .type-icon {
    background: #ffe4e6;
}

.claim-type-card .type-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
}

.claim-type-card.active .type-title {
    color: var(--brand-red-800);
}

.claim-type-card .type-sub {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.3;
}

/* شارة نوع الطلب على بطاقات القضايا */
.filing-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 6px;
    width: fit-content;
}

.filing-type-pill.type-claim {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.filing-type-pill.type-eviction {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.filing-type-pill.type-other {
    background: #f5f3ff;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}

/* قسم المستندات الأربعة الإضافية */
.other-docs-container {
    background: #fbfbfe;
    border: 1.5px dashed #8b5cf6;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.docs-section-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #5b21b6;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.doc-upload-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.doc-upload-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}

.doc-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ede9fe;
    color: #6d28d9;
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-name-input {
    font-weight: 700;
    font-size: 0.85rem;
}

.doc-card-inputs {
    display: flex;
    gap: 6px;
    align-items: center;
}

.doc-card-inputs input[type="url"] {
    flex: 1;
    font-size: 0.82rem;
}

.doc-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.doc-file-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.doc-file-btn input[type="file"] {
    display: none;
}

.doc-preview-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* قائمة المستندات المرفقة في بطاقة القضية */
.card-attached-docs-wrap {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.attached-docs-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #5b21b6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.attached-docs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attached-doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
    color: #5b21b6;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.attached-doc-badge:hover {
    background: #ede9fe;
    border-color: #8b5cf6;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .claim-type-tabs {
        grid-template-columns: 1fr;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   تنسيقات نافذة الشات والمحادثات الداخلية (Team Chat System - فخمة وفسيحة)
   ========================================================================== */
.btn-chat-highlight {
    background: rgba(255, 255, 255, 0.16);
    border-color: #ffd700;
    font-weight: 800;
    position: relative;
}

.btn-chat-highlight:hover {
    background: #ffd700;
    color: #701120;
}

/* طبقة التعتيم والتمركز */
.team-chat-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10500;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.team-chat-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* حاوية نافذة الشات المركزية الفسيحة */
.team-chat-modal-dialog {
    width: 95vw;
    max-width: 1200px;
    height: 86vh;
    max-height: 840px;
    min-height: 580px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(15px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-chat-modal-overlay.active .team-chat-modal-dialog {
    transform: scale(1) translateY(0);
}

/* ترويسة الشات الفخمة */
.team-chat-dialog-header {
    background: linear-gradient(135deg, #701120 0%, #8b1528 55%, #5b0d1b 100%);
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-header-main-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-header-avatar {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid #fde68a;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-header-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-title {
    font-family: var(--font-cairo);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.chat-header-badge {
    background: rgba(16, 185, 129, 0.25);
    border: 1px solid #10b981;
    color: #a7f3d0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.chat-header-subtitle {
    font-size: 0.78rem;
    color: #fde68a;
    font-weight: 600;
    margin-top: 3px;
}

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

.chat-online-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fef08a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.chat-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-close-btn:hover {
    background: rgba(239, 68, 68, 0.85);
    transform: rotate(90deg);
}

/* التخطيط الداخلي المقسم (قنوات + محادثة) */
.team-chat-body-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    background: #f8fafc;
    overflow: hidden;
}

/* الشريط الجانبي: القنوات وقائمة القضايا */
.team-chat-channels-panel {
    width: 330px;
    flex-shrink: 0;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    gap: 8px;
}

.chat-search-box {
    position: relative;
    margin-bottom: 6px;
}

.chat-search-box .search-mini-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #94a3b8;
    pointer-events: none;
}

.chat-search-box input {
    width: 100%;
    height: 38px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 34px 0 12px;
    font-size: 0.82rem;
    font-family: inherit;
    transition: all 0.2s;
}

.chat-search-box input:focus {
    background: #ffffff;
    border-color: var(--brand-red-400);
    box-shadow: 0 0 0 2px rgba(139, 21, 40, 0.08);
}

.channels-section-heading {
    font-size: 0.76rem;
    font-weight: 800;
    color: #64748b;
    padding: 0 4px;
    text-transform: uppercase;
}

.chat-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-align: right;
    transition: all 0.2s;
    width: 100%;
    font-family: inherit;
    position: relative;
}

.chat-channel-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(-2px);
}

.chat-channel-item.active {
    background: #fff1f2;
    border-color: #fca5a5;
    box-shadow: 0 2px 8px rgba(139, 21, 40, 0.06);
}

.channel-avatar-icon {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.chat-channel-item.active .channel-avatar-icon {
    background: #ffe4e6;
    border-color: #fecdd3;
}

.channel-meta {
    flex: 1;
    min-width: 0;
}

.channel-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-channel-item.active .channel-title {
    color: var(--brand-red-800);
}

.channel-desc {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-channels-scroll-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 2px;
}

.case-channels-scroll-area::-webkit-scrollbar {
    width: 5px;
}

.case-channels-scroll-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* منطقة المحادثة والرسائل الرئيسية */
.team-chat-conversation-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f8fafc;
    overflow: hidden;
}

.current-conversation-header {
    padding: 14px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.curr-conv-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.curr-conv-icon {
    width: 40px;
    height: 40px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.curr-conv-title {
    font-family: var(--font-cairo);
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.curr-conv-desc {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 2px;
}

/* جدول مسار الرسائل الفسيح */
.team-chat-stream-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

.team-chat-stream-container::-webkit-scrollbar {
    width: 6px;
}

.team-chat-stream-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* بطاقة الرسالة */
.team-msg-card {
    display: flex;
    flex-direction: column;
    max-width: 78%;
    animation: chatMsgAnim 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatMsgAnim {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.team-msg-card.msg-self {
    align-self: flex-start;
}

.team-msg-card.msg-other {
    align-self: flex-end;
}

.team-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0 4px;
}

.msg-sender-pill {
    padding: 3px 10px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.msg-sender-pill.role-admin {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.msg-sender-pill.role-lawyer {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.msg-sender-pill.role-staff {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.msg-timestamp {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
}

.team-msg-body {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: 16px 16px 16px 4px;
    font-size: 0.92rem;
    color: #1e293b;
    line-height: 1.6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    word-break: break-word;
}

.team-msg-card.msg-self .team-msg-body {
    background: #ffffff;
    border-color: var(--brand-red-400);
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 3px 10px rgba(139, 21, 40, 0.06);
}

/* شريط الردود السريعة */
.chat-quick-suggestions-bar {
    padding: 8px 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.quick-suggest-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: #64748b;
    flex-shrink: 0;
}

.quick-suggest-chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
}

.quick-suggest-chips-scroll::-webkit-scrollbar {
    height: 4px;
}

.quick-chip-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    flex-shrink: 0;
}

.quick-chip-btn:hover {
    background: #fff1f2;
    border-color: var(--brand-red-400);
    color: var(--brand-red-800);
    transform: translateY(-1px);
}

/* صندوق الإدخال والإرسال الفسيح */
.team-chat-input-toolbar {
    padding: 14px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-msg-input {
    flex: 1;
    height: 48px;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
    padding: 0 18px;
    font-size: 0.92rem;
    background: #f8fafc;
    font-family: inherit;
    transition: all 0.2s;
}

.chat-msg-input:focus {
    background: #ffffff;
    border-color: #8b1528;
    box-shadow: 0 0 0 3px rgba(139, 21, 40, 0.1);
    outline: none;
}

.chat-msg-send-btn {
    height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b1528 0%, #701120 100%);
    color: #ffffff;
    border: none;
    font-weight: 800;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(139, 21, 40, 0.25);
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-msg-send-btn:hover {
    background: linear-gradient(135deg, #a01830 0%, #8b1528 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 21, 40, 0.35);
}

.chat-msg-send-btn:active {
    transform: translateY(0);
}

.send-arrow-icon {
    font-size: 1rem;
    transform: scaleX(-1);
}

@media (max-width: 900px) {
    .team-chat-modal-dialog {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .team-chat-body-layout {
        flex-direction: column;
    }
    
    .team-chat-channels-panel {
        width: 100%;
        height: 180px;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

/* ==========================================================================
   تنسيقات إدارة وتعديل حسابات المستخدمين (User Accounts Management)
   ========================================================================== */
.users-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-account-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-account-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.user-account-card.active-editing {
    border-color: var(--brand-red-500);
    background: #fff9fa;
    box-shadow: 0 0 0 3px rgba(139, 21, 40, 0.12);
}

.user-account-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.user-avatar-badge {
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.user-main-details {
    flex: 1;
    min-width: 0;
}

.user-name-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    color: #0f172a;
}

.user-current-tag {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
}

.user-login-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
}

.user-login-meta code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    color: #334155;
}

.user-role-badge {
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-account-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
}

.user-phone-info {
    color: #475569;
}

.user-phone-info a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 700;
}

.user-actions-btns {
    display: flex;
    gap: 8px;
}

.btn-edit-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    padding: 6px 14px;
}

/* صندوق نموذج تعديل الحساب */
.user-edit-form-box {
    background: #ffffff;
    border: 2px solid var(--brand-red-400);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px -8px rgba(139, 21, 40, 0.15);
    margin-top: 15px;
    animation: userFormSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.user-edit-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid #fee2e2;
}

.btn-close-sub {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-close-sub:hover {
    color: #dc2626;
    background: #fee2e2;
}

.btn-toggle-pw {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    padding: 2px 8px;
    cursor: pointer;
    margin-right: 8px;
}

.btn-toggle-pw:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   تنسيقات بوابة التسويق وبلاغات وشكاوى المستأجرين (Tenant Complaints Portal)
   ========================================================================== */
.btn-marketing-highlight {
    background: rgba(255, 255, 255, 0.16);
    border-color: #f59e0b;
    font-weight: 800;
    position: relative;
}

.btn-marketing-highlight:hover {
    background: #f59e0b;
    color: #1e1b4b;
}

.complaints-counter-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 10px;
    margin-right: 6px;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* طبقة ونافذة بوابة الشكاوى الفسيحة */
.complaints-portal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10500;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.complaints-portal-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#complaintFormModal {
    z-index: 13000 !important;
}

.complaints-portal-modal-dialog {
    width: 96vw;
    max-width: 1240px;
    height: 88vh;
    max-height: 880px;
    min-height: 600px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(15px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.complaints-portal-modal-overlay.active .complaints-portal-modal-dialog {
    transform: scale(1) translateY(0);
}

/* ترويسة بوابة الشكاوى */
.complaints-portal-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #334155 100%);
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.comp-header-main-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.comp-header-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid #f59e0b;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.comp-header-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comp-header-title {
    font-family: var(--font-cairo);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.comp-header-badge {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.comp-header-subtitle {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 600;
    margin-top: 3px;
}

.comp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* جسم البوابة الداخلي */
.complaints-portal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f8fafc;
    overflow: hidden;
    padding: 16px 24px;
    gap: 14px;
}

/* شريط الإحصائيات السريعة للشكاوى */
.complaints-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    flex-shrink: 0;
}

.comp-stat-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.comp-stat-pill:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.comp-stat-pill .cstat-icon {
    font-size: 1.4rem;
    width: 38px;
    height: 38px;
    background: #f8fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comp-stat-pill .cstat-info {
    display: flex;
    flex-direction: column;
}

.comp-stat-pill .cstat-num {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    font-family: var(--font-cairo);
}

.comp-stat-pill .cstat-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 2px;
}

.comp-stat-urgent:hover { border-color: #fca5a5; background: #fff5f5; }
.comp-stat-new:hover { border-color: #fde68a; background: #fffdf5; }
.comp-stat-prog:hover { border-color: #bfdbfe; background: #f0f7ff; }
.comp-stat-resolved:hover { border-color: #a7f3d0; background: #f0fdf4; }

/* شريط البحث والتصفية */
.complaints-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 16px;
    flex-shrink: 0;
}

.comp-search-wrap {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.comp-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.comp-search-input {
    width: 100%;
    height: 42px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 38px 0 12px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s;
}

.comp-search-input:focus {
    background: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
    outline: none;
}

.comp-filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.comp-filter-tab {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.comp-filter-tab:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.comp-filter-tab.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

/* قائمة وبطاقات الشكاوى */
.complaints-cards-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-left: 4px;
}

.complaints-cards-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.complaints-cards-scroll-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.complaints-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

/* بطاقة الشكوى المستقلة */
.complaint-item-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.complaint-item-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.complaint-item-card.border-urgent {
    border-right: 5px solid #ef4444;
}

.complaint-item-card.border-medium {
    border-right: 5px solid #f59e0b;
}

.complaint-item-card.border-normal {
    border-right: 5px solid #10b981;
}

.comp-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.comp-priority-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
}

.comp-priority-pill.priority-urgent {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.comp-priority-pill.priority-medium {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.comp-priority-pill.priority-normal {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.comp-status-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
}

.comp-status-pill.status-new {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.comp-status-pill.status-in_progress {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.comp-status-pill.status-resolved {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.comp-card-main-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comp-tenant-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comp-tenant-name {
    font-family: var(--font-cairo);
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.comp-unit-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
}

.comp-phone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 12px;
}

.comp-phone-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1e293b;
    font-family: monospace;
}

.comp-phone-actions {
    display: flex;
    gap: 6px;
}

.btn-phone-call {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-phone-call:hover {
    background: #dbeafe;
}

.btn-whatsapp-direct {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-whatsapp-direct:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.comp-category-tag {
    font-size: 0.76rem;
    font-weight: 700;
    color: #64748b;
}

.comp-details-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.86rem;
    color: #1e293b;
    line-height: 1.5;
    word-break: break-word;
}

.comp-resolution-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: #1e40af;
    line-height: 1.4;
}

.comp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.74rem;
    color: #94a3b8;
}

.comp-footer-actions {
    display: flex;
    gap: 6px;
}

@media (max-width: 900px) {
    .complaints-portal-modal-dialog {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .complaints-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* بانر بوابة التسويق الفاخر والمستقل */
.marketing-hero-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 55%, #334155 100%);
    border-radius: 20px;
    padding: 24px 30px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.m-banner-content {
    flex: 1;
}

.m-banner-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #fde68a;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.m-banner-title {
    font-family: var(--font-cairo);
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.m-banner-desc {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
    max-width: 700px;
}

.m-banner-actions {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .marketing-hero-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
}

/* ==========================================================================
   صفحة تسجيل الدخول المقسمة الفاخرة (Split-Card Login Screen)
   مستوحاة من التصميم المطلوب بألوان الهوية العنابية الملكية ومكتب العمل
   ========================================================================== */
.login-page-screen {
    min-height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(55, 8, 18, 0.90) 50%, rgba(10, 10, 18, 0.94) 100%), 
                url('../assets/justice_hero_bg.jpg') center top / cover fixed no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow-y: auto;
}

.login-page-screen::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 21, 40, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.login-page-screen::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.login-split-card-wrapper {
    width: 100%;
    max-width: 960px;
    margin: auto;
    position: relative;
    z-index: 10;
    animation: loginCardFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-split-card {
    background: #ffffff;
    border-radius: 26px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ترويسة بطاقة تسجيل الدخول باللون العنابي الرسمي */
.login-split-header {
    background: linear-gradient(135deg, #701120 0%, #8b1528 50%, #5b0d1b 100%);
    color: #ffffff;
    padding: 22px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.split-header-info {
    flex: 1;
}

.split-header-title {
    font-family: var(--font-cairo);
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.split-header-subtitle {
    font-size: 0.86rem;
    color: #fde68a;
    font-weight: 600;
    margin: 0;
}

.split-header-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.14);
    border: 1.5px solid #ffd700;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

/* جسم البطاقة المقسم */
.login-split-body {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 440px;
}

/* الجانب الأيمن / الأيسر: نموذج تسجيل الدخول */
.split-form-col {
    padding: 34px 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
}

/* شريط تبويبات الأدوار */
.split-role-tabs-strip {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.split-role-tab {
    flex: 1;
    padding: 9px 8px;
    border-radius: 10px;
    border: none;
    background: transparent;
    font-family: var(--font-cairo);
    font-size: 0.88rem;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.split-role-tab:hover {
    color: var(--brand-red-800);
    background: rgba(255, 255, 255, 0.6);
}

.split-role-tab.active {
    background: #ffffff;
    color: var(--brand-red-800);
    box-shadow: 0 2px 10px rgba(139, 21, 40, 0.12);
    border: 1px solid #e2e8f0;
}

/* حقول الإدخال */
.split-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.split-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.split-input-icon {
    position: absolute;
    right: 14px;
    font-size: 1.15rem;
    color: #94a3b8;
    pointer-events: none;
}

.split-input-field {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    padding: 0 46px 0 44px;
    font-size: 0.95rem;
    background: #f8fafc;
    font-family: inherit;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s;
}

.split-input-field:focus {
    background: #ffffff;
    border-color: var(--brand-red-700);
    box-shadow: 0 0 0 3.5px rgba(139, 21, 40, 0.12);
    outline: none;
}

.btn-toggle-eye {
    position: absolute;
    left: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    border-radius: 8px;
    color: #64748b;
    transition: background 0.2s;
}

.btn-toggle-eye:hover {
    background: #f1f5f9;
}

/* خيارات تذكرني ونسيت كلمة المرور */
.split-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.84rem;
    margin-top: -4px;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.remember-me-label input[type="checkbox"] {
    accent-color: var(--brand-red-700);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-pw-link {
    color: var(--brand-red-700);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.forgot-pw-link:hover {
    color: var(--brand-red-900);
    text-decoration: underline;
}

/* زر الدخول العريض باللون العنابي الرسمي */
.btn-split-login-submit {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b1528 0%, #701120 100%);
    color: #ffffff;
    border: none;
    font-family: var(--font-cairo);
    font-size: 1.08rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(139, 21, 40, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 6px;
}

.btn-split-login-submit:hover {
    background: linear-gradient(135deg, #a01830 0%, #8b1528 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(139, 21, 40, 0.45);
}

.btn-split-login-submit:active {
    transform: translateY(0);
}

.login-submit-arrow {
    font-size: 1.15rem;
    transition: transform 0.2s;
}

.btn-split-login-submit:hover .login-submit-arrow {
    transform: translateX(-5px);
}

.split-card-footer-text {
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 22px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    font-weight: 600;
}

/* الجانب الثاني: صورة مكتب وفريق العمل الواقعية */
.split-photo-col {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    min-height: 100%;
}

.split-office-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.split-photo-col:hover .split-office-img {
    transform: scale(1.05);
}

.split-photo-overlay-tag {
    position: absolute;
    bottom: 18px;
    left: 18px;
    right: 18px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    line-height: 1.4;
}

.split-photo-overlay-tag .spot-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

@media (max-width: 820px) {
    .login-split-body {
        grid-template-columns: 1fr;
    }
    .split-photo-col {
        display: none;
    }
    .split-form-col {
        padding: 24px 20px;
    }
}

/* ==========================================================================
   نظام الوضع الليلي المتطور والفاخر - Professional Dark Mode System
   ========================================================================== */

body.dark-theme,
[data-theme="dark"] {
    --surface-bg: #0b0f19;
    --surface-card: #151c2c;
    --surface-border: #243048;
    --surface-border-focus: #4b5d7e;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --brand-red-900: #34070e;
    --brand-red-800: #540d18;
    --brand-red-700: #701120;
    --brand-red-600: #8b1528;
    --brand-red-500: #a6192e;
    --brand-red-100: rgba(139, 21, 40, 0.25);
    --brand-red-50: rgba(139, 21, 40, 0.15);

    --success-bg: rgba(16, 185, 129, 0.16);
    --success-text: #34d399;
    --success-border: rgba(16, 185, 129, 0.35);

    --warning-bg: rgba(245, 158, 11, 0.16);
    --warning-text: #fbbf24;
    --warning-border: rgba(245, 158, 11, 0.35);

    --info-bg: rgba(59, 130, 246, 0.16);
    --info-text: #60a5fa;
    --info-border: rgba(59, 130, 246, 0.35);

    background-color: #0b0f19 !important;
    color: #f8fafc !important;
}

body.dark-theme #mainAppScreen,
[data-theme="dark"] #mainAppScreen {
    background: linear-gradient(135deg, rgba(8, 12, 20, 0.92) 0%, rgba(32, 6, 12, 0.94) 50%, rgba(5, 7, 12, 0.96) 100%), 
                url('../assets/justice_hero_bg.jpg') center top / cover fixed no-repeat;
}

/* الترويسة في الوضع الليلي */
body.dark-theme .app-header,
[data-theme="dark"] .app-header {
    background: linear-gradient(135deg, #38060e 0%, #580c18 60%, #701120 100%);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

/* بطاقات الإحصائيات في الوضع الليلي */
body.dark-theme .stat-card,
[data-theme="dark"] .stat-card {
    background: #151c2c;
    border: 1px solid #243048;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

body.dark-theme .stat-card:hover,
[data-theme="dark"] .stat-card:hover {
    background: #1a2336;
    border-color: #3b4d6e;
}

body.dark-theme .stat-info .stat-num,
[data-theme="dark"] .stat-info .stat-num {
    color: #f8fafc;
}

body.dark-theme .stat-info .stat-label,
[data-theme="dark"] .stat-info .stat-label {
    color: #94a3b8;
}

body.dark-theme .stat-icon-wrap,
[data-theme="dark"] .stat-icon-wrap {
    background: rgba(139, 21, 40, 0.25);
    color: #fca5a5;
}

/* شريط البحث والتبويبات في الوضع الليلي */
body.dark-theme .control-panel,
[data-theme="dark"] .control-panel {
    background: #151c2c;
    border: 1px solid #243048;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

body.dark-theme .search-box-wrap,
[data-theme="dark"] .search-box-wrap {
    background: #0b0f19;
    border: 1.5px solid #243048;
}

body.dark-theme .search-box-wrap input,
[data-theme="dark"] .search-box-wrap input {
    color: #f8fafc;
}

body.dark-theme .search-box-wrap input::placeholder,
[data-theme="dark"] .search-box-wrap input::placeholder {
    color: #64748b;
}

body.dark-theme .status-tab-btn,
[data-theme="dark"] .status-tab-btn {
    background: #0b0f19;
    border: 1px solid #243048;
    color: #94a3b8;
}

body.dark-theme .status-tab-btn:hover,
[data-theme="dark"] .status-tab-btn:hover {
    background: #1a2336;
    color: #f8fafc;
}

body.dark-theme .status-tab-btn.active,
[data-theme="dark"] .status-tab-btn.active {
    background: #701120;
    border-color: #8b1528;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(112, 17, 32, 0.4);
}

body.dark-theme .status-tab-btn .tab-count,
[data-theme="dark"] .status-tab-btn .tab-count {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.dark-theme .view-toggle-btn,
[data-theme="dark"] .view-toggle-btn {
    background: #0b0f19;
    border: 1px solid #243048;
    color: #94a3b8;
}

body.dark-theme .view-toggle-btn.active,
[data-theme="dark"] .view-toggle-btn.active {
    background: #1e293b;
    border-color: #3b4d6e;
    color: #f8fafc;
}

/* بطاقات القضايا في الوضع الليلي */
body.dark-theme .case-card,
[data-theme="dark"] .case-card {
    background: #151c2c;
    border: 1px solid #243048;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-theme .case-card:hover,
[data-theme="dark"] .case-card:hover {
    border-color: #3b4d6e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-theme .case-card-header,
[data-theme="dark"] .case-card-header {
    background: #1a2236;
    border-bottom: 1px solid #243048;
}

body.dark-theme .case-title-name,
[data-theme="dark"] .case-title-name {
    color: #f8fafc;
}

body.dark-theme .nationality-tag,
[data-theme="dark"] .nationality-tag {
    background: #243048;
    color: #cbd5e1;
}

body.dark-theme .info-row,
[data-theme="dark"] .info-row {
    border-bottom-color: #1e293b;
}

body.dark-theme .info-label,
[data-theme="dark"] .info-label {
    color: #94a3b8;
}

body.dark-theme .info-value,
[data-theme="dark"] .info-value {
    color: #f1f5f9;
}

body.dark-theme .info-value.amount,
[data-theme="dark"] .info-value.amount {
    color: #fca5a5;
}

body.dark-theme .case-claim-box,
[data-theme="dark"] .case-claim-box {
    background: #0b0f19;
    border: 1px solid #243048;
    color: #cbd5e1;
}

body.dark-theme .case-claim-box strong,
[data-theme="dark"] .case-claim-box strong {
    color: #fca5a5;
}

body.dark-theme .case-card-footer,
[data-theme="dark"] .case-card-footer {
    background: #0f172a;
    border-top: 1px solid #243048;
}

/* جدول القضايا في الوضع الليلي */
body.dark-theme .table-responsive,
[data-theme="dark"] .table-responsive {
    background: #151c2c;
    border: 1px solid #243048;
}

body.dark-theme .cases-table th,
[data-theme="dark"] .cases-table th {
    background: #1a2336;
    color: #94a3b8;
    border-bottom: 1px solid #243048;
}

body.dark-theme .cases-table td,
[data-theme="dark"] .cases-table td {
    border-bottom: 1px solid #243048;
    color: #f1f5f9;
}

body.dark-theme .cases-table tbody tr:hover,
[data-theme="dark"] .cases-table tbody tr:hover {
    background: #1a2336;
}

/* النوافذ المنبثقة في الوضع الليلي */
body.dark-theme .modal-container,
[data-theme="dark"] .modal-container {
    background: #111827;
    border: 1px solid #243048;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

body.dark-theme .modal-header,
[data-theme="dark"] .modal-header {
    background: linear-gradient(135deg, #400a12 0%, #701120 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark-theme .modal-body,
[data-theme="dark"] .modal-body {
    background: #111827;
    color: #f8fafc;
}

body.dark-theme .modal-footer,
[data-theme="dark"] .modal-footer {
    background: #0b0f19;
    border-top: 1.5px solid #243048;
}

body.dark-theme .form-label,
[data-theme="dark"] .form-label {
    color: #e2e8f0;
}

body.dark-theme .form-control,
[data-theme="dark"] .form-control {
    background: #1e293b;
    border: 1.5px solid #334155;
    color: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-theme .form-control:focus,
[data-theme="dark"] .form-control:focus {
    border-color: #8b1528;
    background: #1e293b;
    color: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(139, 21, 40, 0.3);
}

body.dark-theme select.form-control,
[data-theme="dark"] select.form-control {
    background-color: #1e293b;
    color: #f8fafc;
}

body.dark-theme select.form-control option,
[data-theme="dark"] select.form-control option {
    background: #1e293b;
    color: #f8fafc;
}

body.dark-theme input[type="date"].form-control,
[data-theme="dark"] input[type="date"].form-control {
    color-scheme: dark;
    background-color: #1e293b;
    color: #f8fafc;
}

body.dark-theme textarea.form-control,
[data-theme="dark"] textarea.form-control {
    background: #1e293b;
    color: #f8fafc;
}

body.dark-theme .form-control::placeholder,
[data-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

body.dark-theme .btn-outline-dark,
[data-theme="dark"] .btn-outline-dark {
    background: #1e293b;
    border: 1.5px solid #334155;
    color: #e2e8f0;
}

body.dark-theme .btn-outline-dark:hover,
[data-theme="dark"] .btn-outline-dark:hover {
    background: #334155;
    border-color: #8b1528;
    color: #ffffff;
}

/* بطاقة عنوان القضية في النافذة في الوضع الليلي */
body.dark-theme .lawyer-case-title-box,
[data-theme="dark"] .lawyer-case-title-box {
    background: linear-gradient(135deg, rgba(84, 13, 24, 0.45) 0%, rgba(112, 17, 32, 0.25) 100%);
    border: 1.5px solid rgba(225, 29, 72, 0.35);
    border-right: 4.5px solid #bd1c36;
}

body.dark-theme .lawyer-case-title-box span,
[data-theme="dark"] .lawyer-case-title-box span {
    color: #fecdd3 !important;
}

/* شارة تحديث المحامي في الوضع الليلي */
body.dark-theme .lawyer-update-badge,
[data-theme="dark"] .lawyer-update-badge {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(4, 120, 87, 0.25) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.4);
}

body.dark-theme .lawyer-update-badge .badge-title,
[data-theme="dark"] .lawyer-update-badge .badge-title {
    color: #6ee7b7;
}

body.dark-theme .lawyer-update-badge .badge-sub,
[data-theme="dark"] .lawyer-update-badge .badge-sub {
    color: #a7f3d0;
}

/* بطاقات قسم التسويق والشكاوى في الوضع الليلي */
body.dark-theme .marketing-hero-banner,
[data-theme="dark"] .marketing-hero-banner {
    background: linear-gradient(135deg, #38060e 0%, #580c18 60%, #701120 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .complaint-item-card,
[data-theme="dark"] .complaint-item-card {
    background: #151c2c;
    border: 1.5px solid #243048;
    color: #f8fafc;
}

body.dark-theme .comp-tenant-name,
[data-theme="dark"] .comp-tenant-name {
    color: #f8fafc;
}

body.dark-theme .comp-details-box,
[data-theme="dark"] .comp-details-box {
    background: #0b0f19;
    border: 1px solid #243048;
    color: #cbd5e1;
}

body.dark-theme .comp-card-footer,
[data-theme="dark"] .comp-card-footer {
    background: #0f172a;
    border-top: 1px solid #243048;
}

/* غرفة شات الفريق في الوضع الليلي */
body.dark-theme .team-chat-modal-dialog,
[data-theme="dark"] .team-chat-modal-dialog {
    background: #111827;
    border: 1px solid #243048;
}

body.dark-theme .team-chat-channels-panel,
[data-theme="dark"] .team-chat-channels-panel {
    background: #0b0f19;
    border-color: #243048;
}

body.dark-theme .team-chat-conversation-panel,
[data-theme="dark"] .team-chat-conversation-panel {
    background: #111827;
}

body.dark-theme .current-conversation-header,
[data-theme="dark"] .current-conversation-header {
    background: #151c2c;
    border-bottom-color: #243048;
}

body.dark-theme .curr-conv-title,
[data-theme="dark"] .curr-conv-title {
    color: #f8fafc;
}

body.dark-theme .team-msg-card.msg-other,
[data-theme="dark"] .team-msg-card.msg-other {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}

body.dark-theme .team-chat-input-toolbar,
[data-theme="dark"] .team-chat-input-toolbar {
    background: #151c2c;
    border-top-color: #243048;
}

body.dark-theme .chat-msg-input,
[data-theme="dark"] .chat-msg-input {
    background: #0b0f19;
    border: 1.5px solid #334155;
    color: #f8fafc;
}

/* صفحة الزوار في الوضع الليلي */
body.dark-theme .landing-page-wrap,
[data-theme="dark"] .landing-page-wrap {
    background: #0b0f19;
    color: #f8fafc;
}

body.dark-theme .landing-nav-bar,
[data-theme="dark"] .landing-nav-bar {
    background: rgba(17, 24, 39, 0.94);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .landing-nav-link,
[data-theme="dark"] .landing-nav-link {
    color: #cbd5e1;
}

body.dark-theme .landing-stats-bar,
[data-theme="dark"] .landing-stats-bar {
    background: #151c2c;
    border: 1px solid #243048;
}

body.dark-theme .service-card,
[data-theme="dark"] .service-card {
    background: #151c2c;
    border: 1px solid #243048;
}

body.dark-theme .service-card-title,
[data-theme="dark"] .service-card-title {
    color: #f8fafc;
}

body.dark-theme .service-card-desc,
[data-theme="dark"] .service-card-desc {
    color: #94a3b8;
}

body.dark-theme .section-alt,
[data-theme="dark"] .section-alt {
    background: #0f172a;
}

body.dark-theme .about-stat-box,
[data-theme="dark"] .about-stat-box {
    background: #151c2c;
    border: 1px solid #243048;
}

body.dark-theme .contact-card-item,
[data-theme="dark"] .contact-card-item {
    background: #151c2c;
    border: 1px solid #243048;
}

body.dark-theme .contact-form-card,
[data-theme="dark"] .contact-form-card {
    background: #151c2c;
    border: 1px solid #243048;
}

body.dark-theme .user-account-card,
[data-theme="dark"] .user-account-card {
    background: #151c2c;
    border: 1px solid #243048;
}

body.dark-theme .app-footer,
[data-theme="dark"] .app-footer {
    background: #0b0f19;
    border-top: 1px solid #243048;
    color: #94a3b8;
}

/* العلامة المائية في الوضع الليلي */
body.dark-theme .site-watermark-img,
[data-theme="dark"] .site-watermark-img {
    opacity: 0.085;
    filter: drop-shadow(0 0 60px rgba(225, 29, 72, 0.6)) invert(0.85) sepia(1) hue-rotate(310deg) saturate(3.5);
    mix-blend-mode: screen;
}

body.dark-theme .site-watermark-bg::before,
[data-theme="dark"] .site-watermark-bg::before {
    background: radial-gradient(circle at center, rgba(112, 17, 32, 0.14) 0%, rgba(11, 15, 25, 0.4) 100%);
}

/* ==========================================================================
   نظام الإشعارات والتنبيهات ونوافذ التأكيد التفاعلية (PRE Luxury Dialog & Toast System)
   ========================================================================== */

/* حاوية الإشعارات العائمة */
.app-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 92%;
    max-width: 440px;
    pointer-events: none;
}

/* عنصر الإشعار الفردي */
.app-toast-item {
    pointer-events: auto;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    direction: rtl;
    font-family: var(--font-cairo);
}

.app-toast-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.22);
}

/* أنواع الإشعارات */
.app-toast-item.toast-success {
    border-right: 4.5px solid #10b981;
}
.app-toast-item.toast-success .toast-icon-wrap {
    background: #ecfdf5;
    color: #059669;
}

.app-toast-item.toast-error {
    border-right: 4.5px solid #ef4444;
}
.app-toast-item.toast-error .toast-icon-wrap {
    background: #fef2f2;
    color: #dc2626;
}

.app-toast-item.toast-warning {
    border-right: 4.5px solid #f59e0b;
}
.app-toast-item.toast-warning .toast-icon-wrap {
    background: #fffbeb;
    color: #d97706;
}

.app-toast-item.toast-info {
    border-right: 4.5px solid #3b82f6;
}
.app-toast-item.toast-info .toast-icon-wrap {
    background: #eff6ff;
    color: #2563eb;
}

.toast-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-body-wrap {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
}

.toast-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.4;
    word-break: break-word;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
    align-self: flex-start;
}

.toast-close-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* شريط التقدم الزمني للإشعار */
.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.04);
}

.toast-progress-fill {
    height: 100%;
    width: 100%;
    background: currentColor;
    opacity: 0.45;
    animation: toastProgress linear forwards;
    transform-origin: right;
}

.toast-success .toast-progress-fill { background: #10b981; }
.toast-error .toast-progress-fill { background: #ef4444; }
.toast-warning .toast-progress-fill { background: #f59e0b; }
.toast-info .toast-progress-fill { background: #3b82f6; }

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

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.app-toast-item.toast-hiding {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-16px) scale(0.92);
    }
}

/* ==========================================================================
   نوافذ الحوار والتأكيد التفاعلية (Confirm & Alert & Prompt Modals)
   ========================================================================== */

.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: dialogBackdropIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    direction: rtl;
    font-family: var(--font-cairo);
}

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

.app-dialog-backdrop.dialog-closing {
    animation: dialogBackdropOut 0.2s ease-in forwards;
}

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

.app-dialog-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 440px;
    padding: 28px 24px 22px;
    text-align: center;
    animation: dialogCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}

@keyframes dialogCardIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dialog-closing .app-dialog-card {
    animation: dialogCardOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes dialogCardOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
}

/* الأيقونة العلوية الدائرية */
.app-dialog-icon-circle {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
}

.app-dialog-card.dialog-primary .app-dialog-icon-circle {
    background: linear-gradient(135deg, #fdf2f4, #fce7eb);
    border: 2px solid #f43f5e;
    box-shadow: 0 0 24px rgba(244, 63, 94, 0.25);
}

.app-dialog-card.dialog-danger .app-dialog-icon-circle {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid #ef4444;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.28);
}

.app-dialog-card.dialog-warning .app-dialog-icon-circle {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #f59e0b;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
}

.app-dialog-card.dialog-success .app-dialog-icon-circle {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid #10b981;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.25);
}

.app-dialog-card.dialog-prompt .app-dialog-icon-circle {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 2px solid #8b5cf6;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
}

.app-dialog-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
    font-family: var(--font-cairo);
}

.app-dialog-message {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px;
    font-weight: 600;
}

/* حقل الإدخال في Prompt */
.app-dialog-input-wrap {
    margin-bottom: 20px;
    text-align: right;
}

.app-dialog-input,
.app-dialog-textarea {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.app-dialog-input:focus,
.app-dialog-textarea:focus {
    background: #ffffff;
    border-color: #8b1528;
    box-shadow: 0 0 0 3px rgba(139, 21, 40, 0.15);
    outline: none;
}

/* أزرار الإجراءات في النافذة */
.app-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.app-dialog-btn {
    padding: 11px 22px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    font-family: var(--font-cairo);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.app-dialog-btn.btn-confirm {
    background: linear-gradient(135deg, #8b1528 0%, #701120 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(139, 21, 40, 0.3);
}

.app-dialog-btn.btn-confirm:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(139, 21, 40, 0.4);
    background: linear-gradient(135deg, #a6192e 0%, #8b1528 100%);
}

.dialog-danger .app-dialog-btn.btn-confirm {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.dialog-danger .app-dialog-btn.btn-confirm:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
}

.dialog-success .app-dialog-btn.btn-confirm {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.dialog-success .app-dialog-btn.btn-confirm:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.4);
}

.app-dialog-btn.btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.app-dialog-btn.btn-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* دعم الوضع الليلي في التنبيهات */
body.dark-theme .app-toast-item,
[data-theme="dark"] .app-toast-item {
    background: rgba(21, 28, 44, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

body.dark-theme .toast-title,
[data-theme="dark"] .toast-title {
    color: #f8fafc;
}

body.dark-theme .toast-text,
[data-theme="dark"] .toast-text {
    color: #cbd5e1;
}

body.dark-theme .toast-close-btn:hover,
[data-theme="dark"] .toast-close-btn:hover {
    background: #243048;
    color: #f8fafc;
}

body.dark-theme .app-dialog-card,
[data-theme="dark"] .app-dialog-card {
    background: #151c2c;
    border: 1px solid #243048;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

body.dark-theme .app-dialog-title,
[data-theme="dark"] .app-dialog-title {
    color: #f8fafc;
}

body.dark-theme .app-dialog-message,
[data-theme="dark"] .app-dialog-message {
    color: #cbd5e1;
}

body.dark-theme .app-dialog-input,
body.dark-theme .app-dialog-textarea,
[data-theme="dark"] .app-dialog-input,
[data-theme="dark"] .app-dialog-textarea {
    background: #0b0f19;
    border-color: #334155;
    color: #f8fafc;
}

body.dark-theme .app-dialog-btn.btn-cancel,
[data-theme="dark"] .app-dialog-btn.btn-cancel {
    background: #243048;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-theme .app-dialog-btn.btn-cancel:hover,
[data-theme="dark"] .app-dialog-btn.btn-cancel:hover {
    background: #334155;
    color: #f8fafc;
}

/* =======================================================
   تنسيقات أزرار التنقل الموحد للمنظومة PRE
   ======================================================= */
.group-hub-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 10px;
    margin-left: 5px;
}

.btn-hub-head-btn {
    font-size: 0.85rem !important;
    padding: 7px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
}

.btn-hub-head-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 992px) {
    .group-hub-nav {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }
}


