/* ============================================
   Client Dashboard Color Improvements
   تحسينات ألوان داشبورد العميل
   ============================================ */

/* ============================================
   1. SIDEBAR MENU - القائمة الجانبية
   ============================================ */

/* Sidebar Widget Container */
.dashboard-widget.client-dashboard-sidebar {
    background: #fff !important;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Sidebar Menu Items */
.dashboard-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-widget ul li {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.dashboard-widget ul li:last-child {
    border-bottom: none;
}

/* Sidebar Menu Links - Default State */
.dashboard-widget ul li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333 !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 50px;
    background: #fff;
    border-radius: 8px;
    margin: 4px 8px;
}

/* Sidebar Menu Icons - Default State */
.dashboard-widget ul li a i {
    margin-left: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #666 !important;
    transition: all 0.3s ease;
}

/* Sidebar Menu Links - Hover State */
.dashboard-widget ul li a:hover {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
    color: #fff !important;
    padding-right: 25px;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(107, 93, 71, 0.3);
}

.dashboard-widget ul li a:hover i {
    color: #fff !important;
    transform: scale(1.1);
}

/* Sidebar Menu Links - Active State */
.dashboard-widget ul li.active a {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
    color: #fff !important;
    padding-right: 25px;
    box-shadow: 0 4px 12px rgba(107, 93, 71, 0.3);
    font-weight: 600;
}

.dashboard-widget ul li.active a i {
    color: #fff !important;
}

/* Sidebar Account Info */
.dashboard-account-info {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
    padding: 25px 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 12px 12px 0 0;
}

.dashboard-account-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    margin-bottom: 15px;
    object-fit: cover;
}

.dashboard-account-info h3 {
    color: #fff !important;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-account-info p {
    color: rgba(255,255,255,0.95) !important;
    font-size: 13px;
    margin: 0;
}

/* Sidebar Close Button */
.sidebar-close-btn {
    background: rgba(0, 0, 0, 0.15) !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    color: #333 !important;
    transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
    background: rgba(0, 0, 0, 0.25) !important;
    color: #000 !important;
    transform: scale(1.1);
}

/* ============================================
   2. DASHBOARD CARDS - بطاقات الإحصائيات
   ============================================ */

.dash-item {
    border-radius: 12px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dash-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Dashboard Card Icons */
.dash-item-icon,
.dash-item i {
    font-size: 2.5rem !important;
    margin-bottom: 15px;
    color: #fff !important;
    opacity: 1 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.dash-item:hover .dash-item-icon,
.dash-item:hover i {
    transform: scale(1.1);
    opacity: 1 !important;
}

/* Dashboard Card Content */
.dash-item-content h2,
.dash-item h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff !important;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dash-item-content h4,
.dash-item h4 {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.95) !important;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Dashboard Card Color Variants */
.db-yellow {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.db-yellow:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
}

.db-red {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
}

.db-red:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
}

.db-blue {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
}

.db-blue:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%) !important;
}

.db-green {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
}

.db-green:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%) !important;
}

/* ============================================
   3. TABLES - الجداول
   ============================================ */

/* Table Container */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e3e6f0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: #fff;
}

.table_border {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

/* Table Styling */
.dashboard-table,
.coustom-dashboard {
    font-size: 14px;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: #fff;
}

/* Table Headers */
.dashboard-table th,
.coustom-dashboard th {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
    color: #fff !important;
    font-weight: 600;
    padding: 14px 12px;
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.dashboard-table th:first-child,
.coustom-dashboard th:first-child {
    border-top-right-radius: 12px;
}

.dashboard-table th:last-child,
.coustom-dashboard th:last-child {
    border-top-left-radius: 12px;
}

/* Table Cells */
.dashboard-table td,
.coustom-dashboard td {
    padding: 14px 12px;
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    transition: background 0.2s ease;
    color: #333 !important;
}

/* Table Row Hover */
.dashboard-table tbody tr:hover td,
.coustom-dashboard tbody tr:hover td {
    background: rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.08) !important;
    color: #000 !important;
}

.dashboard-table tbody tr:last-child td,
.coustom-dashboard tbody tr:last-child td {
    border-bottom: none;
}

/* Striped Table Rows */
.dashboard-table tbody tr:nth-of-type(odd),
.coustom-dashboard tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.dashboard-table tbody tr:nth-of-type(odd):hover td,
.coustom-dashboard tbody tr:nth-of-type(odd):hover td {
    background: rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.08) !important;
}

/* ============================================
   4. BUTTONS - الأزرار
   ============================================ */

/* Table Action Buttons */
.db-bt-ed {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: none;
}

.db-bt-ed i {
    color: #fff !important;
    font-size: 16px;
}

.db-bt-ed:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    color: #fff !important;
}

.db-bt-ed:hover i {
    color: #fff !important;
}

/* General Buttons in Tables */
.dashboard-table .btn,
.coustom-dashboard .btn {
    margin: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: none;
    font-weight: 600;
    min-height: 38px;
    padding: 8px 16px;
}

.dashboard-table .btn:hover,
.coustom-dashboard .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    color: #fff !important;
}

.dashboard-table .btn i,
.coustom-dashboard .btn i {
    color: #fff !important;
    margin: 0 4px;
}

.dashboard-table .btn:hover i,
.coustom-dashboard .btn:hover i {
    color: #fff !important;
}

/* Button Color Variants */
.dashboard-table .btn-success,
.coustom-dashboard .btn-success,
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: none;
    color: #fff !important;
}

.dashboard-table .btn-success:hover,
.coustom-dashboard .btn-success:hover,
.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%) !important;
    color: #fff !important;
}

.dashboard-table .btn-info,
.coustom-dashboard .btn-info,
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    border: none;
    color: #fff !important;
}

.dashboard-table .btn-info:hover,
.coustom-dashboard .btn-info:hover,
.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%) !important;
    color: #fff !important;
}

.dashboard-table .btn-danger,
.coustom-dashboard .btn-danger,
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border: none;
    color: #fff !important;
}

.dashboard-table .btn-danger:hover,
.coustom-dashboard .btn-danger:hover,
.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    color: #fff !important;
}

.dashboard-table .btn-primary,
.coustom-dashboard .btn-primary,
.btn-primary {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
    border: none;
    color: #fff !important;
}

.dashboard-table .btn-primary:hover,
.coustom-dashboard .btn-primary:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #5a4d3a 0%, #4a3d2a 100%) !important;
    color: #fff !important;
}

.dashboard-table .btn-warning,
.coustom-dashboard .btn-warning,
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
    border: none;
    color: #212529 !important;
}

.dashboard-table .btn-warning:hover,
.coustom-dashboard .btn-warning:hover,
.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
    color: #000 !important;
}

/* ============================================
   5. BADGES - الشارات
   ============================================ */

.badge {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: none;
}

.badge i {
    font-size: 12px;
}

.badge.bg-success,
.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: #fff !important;
}

.badge.bg-danger,
.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: #fff !important;
}

.badge.bg-warning,
.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
    color: #212529 !important;
}

.badge.bg-info,
.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: #fff !important;
}

.badge.bg-primary,
.badge.bg-primary {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
    color: #fff !important;
}

.badge.bg-secondary,
.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: #fff !important;
}

/* ============================================
   6. DASHBOARD CONTENT AREA - منطقة المحتوى
   ============================================ */

.detail-dashboard {
    border-radius: 12px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.detail-dashboard .d-headline {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--colorPrimary, #6b5d47) !important;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.2);
}

/* Profile Info Items */
.profile-info-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.profile-info-item:last-child {
    border-bottom: none;
}

.profile-info-label {
    font-weight: 600;
    color: #555 !important;
    display: inline-block;
    min-width: 120px;
    margin-bottom: 5px;
}

.profile-info-value {
    color: #333 !important;
    font-weight: 400;
}

/* ============================================
   7. HEADER/NAVIGATION - الهيدر والتنقل
   ============================================ */

.client-topbar-bg {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
}

.client-nav-link {
    color: #fff !important;
}

.client-nav-link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.client-menu-toggle {
    color: #fff !important;
}

.client-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.client-user-name {
    color: #fff !important;
}

.client-user-menu .dropdown-item {
    color: #333 !important;
}

.client-user-menu .dropdown-item:hover {
    background: linear-gradient(90deg, #f8f9ff 0%, #f0f4ff 100%);
    color: var(--colorPrimary, #6b5d47) !important;
}

.client-user-menu .dropdown-item i {
    color: var(--colorPrimary, #6b5d47) !important;
}

.client-user-menu .dropdown-item:hover i {
    color: var(--colorPrimary, #6b5d47) !important;
}

/* ============================================
   8. FORMS - النماذج
   ============================================ */

.form-control {
    border: 1px solid #ddd;
    color: #333 !important;
    background: #fff;
}

.form-control:focus {
    border-color: var(--colorPrimary, #6b5d47);
    box-shadow: 0 0 0 3px rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.1);
    color: #333 !important;
}

.form-control::placeholder {
    color: #999 !important;
}

label {
    color: #333 !important;
    font-weight: 600;
}

/* ============================================
   9. MODALS - النوافذ المنبثقة
   ============================================ */

.order_modal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.order_modal .modal-header {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px;
}

.order_modal .modal-header h4 {
    color: #fff !important;
    font-weight: 600;
    margin: 0;
}

.order_modal .modal-body {
    padding: 25px;
    background: #fff;
}

.order_modal .modal-body h4 {
    color: var(--colorPrimary, #6b5d47) !important;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.order_modal .table thead th {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
    color: #fff !important;
    font-weight: 600;
    padding: 12px;
    border: none;
}

.order_modal .table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333 !important;
}

/* ============================================
   10. BANNER AREA - منطقة البانر
   ============================================ */

.banner-text h1 {
    color: #fff !important;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.banner-text ul li {
    color: rgba(255,255,255,0.9) !important;
}

.banner-text ul li a {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
}

.banner-text ul li a:hover {
    color: #fff !important;
}

/* ============================================
   11. PAGINATION - التصفح
   ============================================ */

.pagination .page-link {
    color: var(--colorPrimary, #6b5d47) !important;
    border: 1px solid #e3e6f0;
    background: #fff;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
    color: #fff !important;
    border-color: var(--colorPrimary, #6b5d47);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
    color: #fff !important;
    border-color: var(--colorPrimary, #6b5d47);
}

/* ============================================
   12. GENERAL TEXT & ICONS - النصوص والأيقونات العامة
   ============================================ */

/* Ensure all text is visible */
.dashboard-area,
.detail-dashboard,
.profile_info_area {
    color: #333 !important;
}

.dashboard-area h1,
.dashboard-area h2,
.dashboard-area h3,
.dashboard-area h4,
.dashboard-area h5,
.dashboard-area h6 {
    color: #333 !important;
}

.dashboard-area p,
.dashboard-area span,
.dashboard-area div {
    color: #333 !important;
}

/* Ensure all icons are visible */
.dashboard-area i,
.dashboard-area .fas,
.dashboard-area .far,
.dashboard-area .fa {
    color: inherit !important;
}

/* Links */
.dashboard-area a {
    color: var(--colorPrimary, #6b5d47) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dashboard-area a:hover {
    color: var(--colorSecondary, #f1634c) !important;
    text-decoration: underline;
}

/* ============================================
   13. CARDS & LIST ITEMS - الكروت والعناصر
   ============================================ */

.card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    background: #fff;
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #e3e6f0;
    padding: 18px 25px;
    border-radius: 12px 12px 0 0;
}

.card-header h4,
.card-header h5 {
    color: var(--colorPrimary, #6b5d47) !important;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 25px;
    background: #fff;
    color: #333 !important;
}

.card-body p,
.card-body span,
.card-body div {
    color: #333 !important;
}

.list-group-item {
    border: 1px solid #f0f0f0;
    padding: 15px 20px;
    transition: all 0.3s ease;
    background: #fff;
}

.list-group-item:hover {
    background: rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.05) !important;
    border-color: rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.2);
    transform: translateX(-3px);
}

.list-group-item a {
    color: #333 !important;
    text-decoration: none;
}

.list-group-item a:hover {
    color: var(--colorPrimary, #6b5d47) !important;
}

.list-group-item strong {
    color: #333 !important;
}

.list-group-item .text-muted {
    color: #666 !important;
}

.badge-pill {
    background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   14. RESPONSIVE - التصميم المتجاوب
   ============================================ */

@media (max-width: 768px) {
    .dash-item {
        padding: 20px;
    }
    
    .dash-item-icon,
    .dash-item i {
        font-size: 2rem !important;
    }
    
    .dash-item-content h2,
    .dash-item h2 {
        font-size: 2rem;
    }
    
    .detail-dashboard {
        padding: 20px;
    }
    
    .dashboard-table th,
    .coustom-dashboard th {
        font-size: 12px;
        padding: 12px 8px;
    }
    
    .dashboard-table td,
    .coustom-dashboard td {
        font-size: 12px;
        padding: 12px 8px;
    }
    
    .dashboard-table .btn,
    .coustom-dashboard .btn {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .dash-item {
        padding: 18px 15px;
    }
    
    .dash-item-icon,
    .dash-item i {
        font-size: 1.75rem !important;
    }
    
    .dash-item-content h2,
    .dash-item h2 {
        font-size: 1.75rem;
    }
    
    .detail-dashboard {
        padding: 15px;
    }
}
