@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-bg: #1e1e2d;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f4f7f6;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background-color: var(--dark-bg);
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1050;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar .brand {
    color: #fff;
    font-size: 1.5rem;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link {
    color: #a2a3b7;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    border-right: 4px solid var(--primary-color);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
    transition: var(--transition);
}

/* ===== TOPBAR ===== */
.top-bar {
    background: #fff;
    height: var(--topbar-height);
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

/* ===== CARDS & STATS ===== */
.card-stat,
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: none;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

/* ===== TABLES ===== */
.table-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #eee;
    color: #555;
    font-weight: 700;
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

/* ===== FORMS ===== */
.form-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.form-control,
.form-select {
    border-radius: 8px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ===== AUTH ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1e2d 0%, #2c2c3d 100%);
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }

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

    .main-content {
        margin-right: 0;
    }

    .sidebar-toggle {
        display: block !important;
    }
}
@media (max-width: 768px) {

    /* إخفاء رأس الجدول */
    .table thead {
        display: none;
    }

    /* تحويل الجدول إلى كروت */
    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        background: #fff;
        margin-bottom: 15px;
        border-radius: 12px;
        padding: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }

    .table td {
        text-align: right;
        padding: 8px 10px;
        position: relative;
        border: none;
        display: flex;
        justify-content: space-between;
        font-size: 14px;
    }

    /* عنوان كل حقل */
    .table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #666;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px;
    }

    .top-bar {
        flex-direction: row-reverse;
    }

    .breadcrumb-area {
        display: none;
    }
}

/* الفورم */
.form-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    max-width: 600px;
    margin: 40px auto;
}

/* العناوين */
.form-container label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

/* الحقول */
.form-container input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    margin-top: 5px;
}

/* عند التركيز */
.form-container input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* المسافات */
.mt-4 {
    margin-top: 20px;
}

/* الأخطاء */
.form-container .text-red-600 {
    font-size: 12px;
    color: #dc3545;
    margin-top: 5px;
}

/* الأزرار */
.form-container button {
    background-color: #0d6efd;
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.form-container button:hover {
    background-color: #0b5ed7;
}

/* الرابط */
.form-container a {
    font-size: 13px;
    color: #6c757d;
    text-decoration: none;
}

.form-container a:hover {
    color: #0d6efd;
}

/* ترتيب الأزرار */
.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* Login & Register Styles */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1e2d 0%, #2c2c3d 100%);
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
}

.auth-card .brand {
    font-size: 32px;
    font-weight: 700;
    color: #1e1e2d;
    margin-bottom: 10px;
}

.auth-card .subtitle {
    color: #888;
    margin-bottom: 30px;
}

.auth-card .form-group {
    text-align: right;
}

.auth-card .btn-auth {
    width: 100%;
    padding: 12px;
    font-weight: 700;
    margin-top: 10px;
    background-color: #0d6efd;
    border: none;
    color: #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.auth-card .btn-auth:hover {
    background-color: #0b5ed7;
}

.auth-card .footer-links {
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.auth-card .footer-links a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.auth-card .social-login {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.auth-card .social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    color: #555;
    transition: all 0.3s ease;
}

.auth-card .social-btn:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
}
/* إخفاء نص معلومات النتائج في ترقيم الصفحات */
    .pagination .flex-1.sm\:hidden, 
    .pagination p.text-sm.text-gray-700 {
        display: none !important;
    }
    
    /* إذا كنت تستخدم بوتستراب الخام، هذا الكود يستهدف النصوص الجانبية */
    nav .small.text-muted {
        display: none !important;
    }