/* ===================================================
   نظام الموارد البشرية السحابي متعدد المنشآت - الأنماط الرئيسية
   HRMS Cloud Multi-Tenant Modern Stylesheet (RTL)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* الوضع الليلي Dark Mode */
body.dark-mode {
    --bg-main: #0b1120;
    --bg-surface: #1e293b;
    --bg-card: #1e293b;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    direction: rtl;
    text-align: right;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* تخطيط المنصة الرئيسي */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* القائمة الجانبية Sidebar */
.app-sidebar {
    width: 280px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 50;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.sidebar-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 12px 14px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item:hover {
    background-color: rgba(30, 58, 138, 0.05);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
    font-weight: 700;
}

.nav-badge {
    margin-right: auto;
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* المحتوى الرئيسي */
.app-main {
    margin-right: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* الشريط العلوي Topbar */
.app-topbar {
    height: 72px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-sm);
}

/* مبدل المنشآت Company Switcher */
.company-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.company-switcher:hover {
    border-color: var(--primary);
}

.company-badge-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2);
}

.company-select {
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.company-select::-ms-expand {
    display: none !important;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(30, 58, 138, 0.05);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-main);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* مساحة العمل الداخلية */
.content-body {
    padding: 28px;
    flex: 1;
}

/* البطاقات والإحصائيات */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.kpi-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.kpi-info .kpi-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.kpi-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* بطاقات المحتوى والجداول */
.card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}

/* الجداول الحديثة */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.custom-table th {
    background: var(--bg-main);
    color: var(--text-secondary);
    padding: 12px 16px;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.custom-table tr:hover td {
    background: rgba(30, 58, 138, 0.02);
}

/* تمييز الخروج المبكر باللون الأحمر */
.early-leave-badge {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
    font-weight: 800 !important;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* الأزرار الفخمة */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(30, 58, 138, 0.05);
}

/* النوافذ المنبثقة Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    animation: modalSlide 0.3s ease-out;
}

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

/* لوحة رسم التوقيع باليد Canvas Signature */
.signature-pad-container {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 10px;
    text-align: center;
    margin: 12px 0;
}

.signature-canvas {
    width: 100%;
    height: 180px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    cursor: crosshair;
    background: #fff;
    touch-action: none;
}

/* حقول الإدخال */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* ورقة الخطابات الرسمية A4 مع العلامة المائية والترويسة والختم */
.official-letter-sheet {
    background: #ffffff;
    width: 210mm;
    min-height: 297mm;
    margin: 20px auto;
    padding: 20mm;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.8;
}

.letter-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 72px;
    font-weight: 900;
    color: rgba(30, 58, 138, 0.04);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    text-align: center;
    z-index: 1;
}

.letter-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.letter-header .company-info-ar {
    text-align: right;
    width: 35%;
}

.letter-header .logo-center {
    width: 30%;
    text-align: center;
}

.letter-header .company-info-en {
    text-align: left;
    direction: ltr;
    width: 35%;
}

.letter-body {
    position: relative;
    z-index: 2;
    min-height: 160mm;
    padding: 10px 0;
}

.letter-footer {
    border-top: 1px solid #cbd5e1;
    padding-top: 14px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    position: relative;
    z-index: 2;
}

.official-stamp {
    width: 120px;
    height: 120px;
    border: 3px double var(--primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    transform: rotate(-15deg);
    margin: 20px auto 0;
    opacity: 0.85;
    background: rgba(30, 58, 138, 0.02);
}

/* قواعد الطباعة الرسمية مُدارة بالكامل وبدقة في assets/css/print.css */

/* ===================================================
   شبكة أيقونات الخدمات والوحدات المرتبة (Services Launchpad Grid)
   =================================================== */

.services-launchpad {
    margin-top: 28px;
    margin-bottom: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.launchpad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
}

.launchpad-title-group h2 {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.launchpad-title-group p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.launchpad-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
}

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

.launch-tile {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.launch-tile::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 4px;
    background: var(--tile-color, var(--primary));
    opacity: 0.8;
    transition: width 0.2s ease;
}

.launch-tile:hover {
    transform: translateY(-4px);
    background: var(--bg-surface);
    border-color: var(--tile-color, var(--primary));
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.launch-tile:hover::before {
    width: 6px;
}

.tile-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--tile-bg, rgba(30, 58, 138, 0.1));
    color: var(--tile-color, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.launch-tile:hover .tile-icon-box {
    transform: scale(1.1) rotate(5deg);
}

.tile-info {
    flex: 1;
    overflow: hidden;
}

.tile-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-top: 4px;
    transition: all 0.2s ease;
}

.launch-tile:hover .tile-badge {
    border-color: var(--tile-color, var(--primary));
    color: var(--tile-color, var(--primary));
    background: rgba(255, 255, 255, 0.9);
}

.tile-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.launch-tile:hover .tile-arrow {
    background: var(--tile-color, var(--primary));
    color: #ffffff;
    transform: translateX(-3px);
}

/* نافذة مُطلق التطبيقات العلوي (Apps Mega-Menu Dropdown) */
.apps-launcher-dropdown {
    position: fixed;
    top: 65px;
    left: 20px;
    width: 380px;
    max-height: 80vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    padding: 18px;
    overflow-y: auto;
    display: none;
    animation: fadeInDown 0.2s ease-out;
}

.apps-launcher-dropdown.show {
    display: block;
}

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

.apps-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.apps-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.app-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 6px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.app-grid-item:hover {
    background: var(--bg-main);
    transform: translateY(-2px);
}

.app-grid-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 6px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.app-grid-label {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

/* ===================================================
   نظام الإشعارات الفورية والتطورات اللحظية Live Notifications
   =================================================== */
.notifications-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 9999px;
    text-align: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px var(--bg-surface);
    pointer-events: none;
    animation: notifPulse 2s infinite ease-in-out;
}

@keyframes notifPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
    100% { transform: scale(1); }
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 380px;
    max-width: 90vw;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: notifSlideDown 0.25s ease-out;
}

.notifications-dropdown.active {
    display: flex;
}

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

.notif-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-main);
}

.notif-items-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
    cursor: pointer;
}

.notif-item:hover {
    background: var(--bg-main);
}

.notif-item.unread {
    background: rgba(30, 58, 138, 0.05);
    border-right: 3px solid var(--primary);
}

.notif-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.notif-item-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notif-item-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-item-time {
    font-size: 10px;
    color: var(--text-muted);
}

.notif-dropdown-footer {
    padding: 10px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-main);
}

/* نافذة التوست العائمة للتنبيه اللحظي الفوري */
.live-notif-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--bg-surface);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 420px;
    animation: liveToastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* ===================================================
   دعم الاتجاه من اليسار لليمين واللغة الإنجليزية (LTR / English)
   =================================================== */
html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[dir="ltr"] body,
html[dir="ltr"] button,
html[dir="ltr"] input,
html[dir="ltr"] select,
html[dir="ltr"] textarea {
    font-family: inherit;
}

/* الحفاظ التام والأصيل على خط ورموز أيقونات FontAwesome وعدم استبدالها إطلاقاً */
html[dir="ltr"] .fa,
html[dir="ltr"] .fas,
html[dir="ltr"] .fa-solid,
html[dir="ltr"] i[class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

html[dir="ltr"] .far,
html[dir="ltr"] .fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

html[dir="ltr"] .fab,
html[dir="ltr"] .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

html[dir="ltr"] .app-sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-color);
}

html[dir="ltr"] .app-main {
    margin-right: 0;
    margin-left: 280px;
}

html[dir="ltr"] .nav-badge {
    margin-right: 0;
    margin-left: auto;
}

html[dir="ltr"] .company-info-ar {
    text-align: left !important;
}

html[dir="ltr"] .notifications-dropdown {
    left: auto;
    right: 0;
}

html[dir="ltr"] .apps-launcher-dropdown {
    left: auto;
    right: 20px;
}

html[dir="ltr"] .user-profile-badge,
html[dir="ltr"] .user-profile-badge div {
    text-align: left !important;
}

html[dir="ltr"] .custom-table th,
html[dir="ltr"] .custom-table td,
html[dir="ltr"] .table th,
html[dir="ltr"] .table td {
    text-align: left;
}

html[dir="ltr"] .form-label,
html[dir="ltr"] .form-control,
html[dir="ltr"] .form-select,
html[dir="ltr"] .kpi-info,
html[dir="ltr"] .tile-info,
html[dir="ltr"] .notif-item-title,
html[dir="ltr"] .notif-item-desc {
    text-align: left;
}

html[dir="ltr"] .launch-tile::before {
    right: auto;
    left: 0;
}

html[dir="ltr"] .launch-tile:hover .tile-arrow {
    transform: translateX(3px);
}

html[dir="ltr"] .tile-arrow i.fa-chevron-left,
html[dir="ltr"] .tile-arrow i.fa-arrow-left {
    transform: scaleX(-1);
}

html[dir="ltr"] .notif-item.unread {
    border-right: none;
    border-left: 3px solid var(--primary);
}

html[dir="ltr"] .demo-badge-btn {
    text-align: left;
}

@media (max-width: 1024px) {
    html[dir="ltr"] .app-sidebar {
        transform: translateX(-100%);
    }
    html[dir="ltr"] .app-sidebar.show {
        transform: translateX(0);
    }
    html[dir="ltr"] .app-main {
        margin-left: 0;
    }
}
