/* ============================================
   Client & Lawyer Dashboard Mobile Improvements
   تحسينات داشبورد العميل والمحامي على الموبايل
   ============================================ */

/* Hide main site header in dashboard pages */
.dashboard-area ~ * .top-header-bar,
.dashboard-area ~ * .main-navbar,
body:has(.dashboard-area) .top-header-bar,
body:has(.dashboard-area) .main-navbar,
body:has(.dashboard-area) #mainNavbar,
body:has(.dashboard-area) .mobile-side-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove padding-top when dashboard header is shown */
body:has(.dashboard-area) {
    padding-top: 0 !important;
}

body:has(.dashboard-area) .client-topbar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide banner area in dashboard pages on all devices */
.dashboard-banner-hidden,
.dashboard-area ~ .banner-area,
.dashboard-area .banner-area,
body:has(.dashboard-area) .banner-area {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Also hide banner in all client dashboard pages */
.dashboard-area + .banner-area,
.banner-area:has(+ .dashboard-area) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Dashboard Header Spacing */
.dashboard-area {
    padding-top: 90px !important;
}

/* Client Dashboard Mobile Styles */
@media (max-width: 991px) {
    /* Add top padding for header */
    .dashboard-area {
        padding: 90px 0 20px 0 !important;
    }
    
    .dashboard-area .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Row adjustments */
    .dashboard-area .row {
        margin: 0;
    }
    
    .dashboard-area .col-lg-3,
    .dashboard-area .col-lg-9 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Dashboard Sidebar - Mobile - Right Side */
    .dashboard-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        left: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 9999 !important;
        background: #fff !important;
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.3) !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        margin-bottom: 0 !important;
        border-radius: 0 !important;
    }
    
    /* Show sidebar when active */
    body.dashboard-sidebar-open .dashboard-sidebar {
        right: 0 !important;
    }
    
    /* Sidebar backdrop */
    body.dashboard-sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        cursor: pointer;
    }
    
    /* Prevent clicks on content behind sidebar when open */
    body.dashboard-sidebar-open .dashboard-area .detail-dashboard,
    body.dashboard-sidebar-open .dashboard-area .col-lg-9 {
        pointer-events: none;
        user-select: none;
    }
    
    /* Close button - Left side for RTL - Enhanced X button - Hidden by default */
    .dashboard-sidebar .dashboard-sidebar-close {
        display: none !important;
        position: fixed !important;
        top: 20px !important;
        left: 20px !important;
        right: auto !important;
        width: 45px !important;
        height: 45px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid rgba(220, 38, 38, 0.3) !important;
        border-radius: 50% !important;
        color: #dc2626 !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        pointer-events: auto !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Show close button only when sidebar is open */
    body.dashboard-sidebar-open .dashboard-sidebar .dashboard-sidebar-close {
        display: flex !important;
    }
    
    .dashboard-sidebar .dashboard-sidebar-close:hover {
        background: #dc2626 !important;
        color: #fff !important;
        border-color: #dc2626 !important;
        transform: scale(1.15) rotate(90deg) !important;
        box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4) !important;
    }
    
    .dashboard-sidebar .dashboard-sidebar-close:active {
        transform: scale(1.05) rotate(90deg) !important;
    }
    
    .dashboard-sidebar .dashboard-sidebar-close i {
        transition: transform 0.3s ease !important;
    }
    
    .dashboard-sidebar .dashboard-sidebar-close:hover i {
        transform: scale(1.2) !important;
    }
    
    /* Hide close button on desktop */
    @media (min-width: 992px) {
        .dashboard-sidebar .dashboard-sidebar-close {
            display: none !important;
        }
        
        .dashboard-sidebar {
            position: relative !important;
            right: 0 !important;
            left: auto !important;
            width: 100% !important;
            height: auto !important;
            border-radius: 12px !important;
            margin-bottom: 20px !important;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        }
        
        body.dashboard-sidebar-open::before {
            display: none !important;
        }
    }
    
    .dashboard-account-info {
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
        padding: 25px 20px;
        text-align: center;
        color: #fff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .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;
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .dashboard-account-info p {
        color: rgba(255,255,255,0.9);
        font-size: 13px;
        margin: 0;
    }
    
    /* Sidebar Menu */
    .dashboard-widget ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .dashboard-widget ul li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .dashboard-widget ul li:last-child {
        border-bottom: none;
    }
    
    .dashboard-widget ul li a {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        color: #333 !important;
        text-decoration: none;
        font-size: 15px;
        transition: all 0.3s ease;
        min-height: 50px;
        background: #fff;
        border-radius: 8px;
        margin: 4px 8px;
    }
    
    .dashboard-widget ul li a:hover,
    .dashboard-widget ul li.active a {
        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 i {
        margin-left: 10px;
        font-size: 16px;
        width: 20px;
        text-align: center;
        color: #666 !important;
        transition: all 0.3s ease;
    }
    
    .dashboard-widget ul li a:hover i,
    .dashboard-widget ul li.active a i {
        color: #fff !important;
        transform: scale(1.1);
    }
    
    .dashboard-widget ul li a .beep {
        position: relative;
    }
    
    .dashboard-widget ul li a .beep.parent::before {
        content: '';
        position: absolute;
        top: -5px;
        right: -5px;
        width: 8px;
        height: 8px;
        background: #ff4444;
        border-radius: 50%;
        border: 2px solid #fff;
    }
    
    /* Dashboard Content - Enhanced */
    .detail-dashboard {
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        padding: 25px !important;
        margin-bottom: 20px;
        border: 1px solid #f0f0f0;
    }
    
    .detail-dashboard .d-headline {
        color: var(--colorPrimary, #6b5d47);
        font-weight: 700;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 3px solid rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.2);
    }
    
    /* Dashboard Stats Cards */
    .dash-item {
        border-radius: 12px !important;
        padding: 25px 20px !important;
        margin-bottom: 15px !important;
        text-align: center;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    .dash-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }
    
    .dash-item i {
        font-size: 36px !important;
        margin-bottom: 15px;
        color: #fff !important;
        opacity: 1 !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    
    .dash-item h2 {
        font-size: 32px !important;
        font-weight: 700;
        margin: 10px 0;
        color: #fff !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    
    .dash-item h4 {
        font-size: 14px !important;
        font-weight: 500;
        color: rgba(255,255,255,0.95) !important;
        margin: 0;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .db-yellow {
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    }
    
    .db-red {
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    }
    
    .db-blue {
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    }
    
    /* Profile Info */
    .profile_info_area {
        margin-top: 20px;
    }
    
    .wsus__profile_info {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .wsus__profile_info_top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid #f0f0f0;
    }
    
    .d-headline {
        font-size: 20px;
        font-weight: 600;
        color: #333;
        margin: 0;
    }
    
    .edit_btn {
        padding: 8px 16px;
        background: var(--colorPrimary, #6b5d47);
        color: #fff;
        border-radius: 6px;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .edit_btn:hover {
        background: #5a4d3a;
        color: #fff;
    }
    
    .wsus__profile_info ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .wsus__profile_info ul li {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        flex-wrap: wrap;
    }
    
    .wsus__profile_info ul li:last-child {
        border-bottom: none;
    }
    
    .wsus__profile_info ul li span {
        font-weight: 600;
        color: #666;
        min-width: 120px;
        margin-left: 10px;
    }
    
    /* Forms */
    .add-form {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 20px;
    }
    
    .form-row {
        margin: 0;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .form-control {
        border-radius: 8px;
        border: 1px solid #ddd;
        padding: 12px 15px;
        font-size: 15px;
        transition: all 0.3s ease;
    }
    
    .form-control:focus {
        border-color: var(--colorPrimary, #6b5d47);
        box-shadow: 0 0 0 3px rgba(107, 93, 71, 0.1);
    }
    
    /* Tables - Enhanced Design */
    .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;
    }
    
    .dashboard-table {
        font-size: 13px;
        min-width: 600px;
        border-collapse: separate;
        border-spacing: 0;
    }
    
    .dashboard-table th {
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
        color: #fff !important;
        font-weight: 600;
        padding: 14px 10px;
        font-size: 12px;
        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 {
        border-top-right-radius: 12px;
    }
    
    .dashboard-table th:last-child {
        border-top-left-radius: 12px;
    }
    
    .dashboard-table td {
        padding: 14px 10px;
        vertical-align: middle;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        background: #fff;
        transition: background 0.2s ease;
        color: #333 !important;
    }
    
    .dashboard-table 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 {
        border-bottom: none;
    }
    
    /* Table Actions - Enhanced Buttons */
    .db-bt-ed {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 6px;
        min-width: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Order Page Specific Enhancements */
    .dashboard-table .btn {
        margin: 2px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    .dashboard-table .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }
    
    .dashboard-table .btn-success {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
        border: none;
        color: #fff !important;
    }
    
    .dashboard-table .btn-success:hover {
        background: linear-gradient(135deg, #218838 0%, #1aa179 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-table .btn-info {
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
        border: none;
        color: #fff !important;
    }
    
    .dashboard-table .btn-info:hover {
        background: linear-gradient(135deg, #138496 0%, #117a8b 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-table .btn-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
        border: none;
        color: #fff !important;
    }
    
    .dashboard-table .btn-danger:hover {
        background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-table .btn i {
        color: #fff !important;
    }
    
    .dashboard-table .btn:hover i {
        color: #fff !important;
    }
    
    /* Message Page */
    .user-wrapper {
        height: 500px !important;
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .message-wrapper {
        height: 450px !important;
        border-radius: 8px;
    }
    
    .user {
        padding: 12px !important;
    }
    
    .media-left img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .received,
    .sent {
        max-width: 85% !important;
    }
    
    /* Prescription/Appointment Details */
    .prescription {
        background: #fff;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .table-no-border td {
        padding: 10px 0;
        font-size: 14px;
    }
    
    /* Input Groups */
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group .form-control {
        margin-bottom: 10px;
    }
    
    .input-group .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Buttons - Enhanced Design */
    .btn {
        padding: 12px 24px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        min-height: 44px;
        transition: all 0.3s ease;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        border: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    }
    
    .btn-primary {
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
        color: #fff;
    }
    
    .btn-primary:hover {
        background: linear-gradient(135deg, #5a4d3a 0%, #4a3d2a 100%);
        color: #fff;
    }
    
    .btn-success {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: #fff;
    }
    
    .btn-success:hover {
        background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
        color: #fff;
    }
    
    .btn-info {
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
        color: #fff;
    }
    
    .btn-info:hover {
        background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
        color: #fff;
    }
    
    .btn-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        color: #fff;
    }
    
    .btn-danger:hover {
        background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
        color: #fff;
    }
    
    .btn-sm {
        padding: 8px 16px;
        font-size: 13px;
        min-height: 36px;
        border-radius: 8px;
    }
    
    /* Badges - Enhanced Design */
    .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.1);
        transition: all 0.3s ease;
    }
    
    .badge.bg-success {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
        color: #fff !important;
    }
    
    .badge.bg-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
        color: #fff !important;
    }
    
    .badge.bg-warning {
        background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
        color: #212529 !important;
    }
    
    .badge.bg-info {
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
        color: #fff !important;
    }
    
    .badge.bg-primary {
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%) !important;
        color: #fff !important;
    }
    
    .badge i {
        color: inherit !important;
    }
    
    /* Order Page Modal Enhancements */
    .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;
        font-weight: 600;
        margin: 0;
    }
    
    .order_modal .modal-body {
        padding: 25px;
    }
    
    .order_modal .modal-body h4 {
        color: var(--colorPrimary, #6b5d47);
        font-weight: 600;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #f0f0f0;
    }
    
    .order_modal .table {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .order_modal .table thead th {
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
        color: #fff;
        font-weight: 600;
        padding: 12px;
        border: none;
    }
    
    .order_modal .table tbody td {
        padding: 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .order_modal .table tbody tr:last-child td {
        border-bottom: none;
    }
    
    .order_modal .btn-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        border: none;
        color: #fff;
        padding: 10px 24px;
        border-radius: 8px;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
        transition: all 0.3s ease;
    }
    
    .order_modal .btn-danger:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
    }
    
    /* Banner Area Enhancements */
    .banner-area {
        background-size: cover;
        background-position: center;
        position: relative;
    }
    
    .banner-area::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.85) 0%, rgba(90, 77, 58, 0.85) 100%);
    }
    
    .banner-text {
        position: relative;
        z-index: 1;
        color: #fff;
    }
    
    .banner-text h1 {
        color: #fff;
        font-weight: 700;
        text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    
    .banner-text ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .banner-text ul li {
        display: inline-block;
        color: rgba(255,255,255,0.9);
    }
    
    .banner-text ul li a {
        color: rgba(255,255,255,0.9);
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .banner-text ul li a:hover {
        color: #fff;
    }
}

/* Very Small Mobile (480px and below) */
@media (max-width: 480px) {
    .dashboard-area {
        padding: 15px 0 !important;
    }
    
    .dash-item {
        padding: 20px 15px !important;
        min-height: 120px;
    }
    
    .dash-item i {
        font-size: 28px !important;
    }
    
    .dash-item h2 {
        font-size: 28px !important;
    }
    
    .dash-item h4 {
        font-size: 12px !important;
    }
    
    .detail-dashboard {
        padding: 18px !important;
        border-radius: 12px;
    }
    
    .d-headline {
        font-size: 18px;
    }
    
    .dashboard-table {
        font-size: 11px;
    }
    
    .dashboard-table th {
        padding: 12px 6px;
        font-size: 11px;
    }
    
    .dashboard-table td {
        padding: 12px 6px;
        font-size: 11px;
    }
    
    .dashboard-table .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .badge {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .banner-text h1 {
        font-size: 22px;
    }
    
    .order_modal .modal-body {
        padding: 18px;
    }
    
    .order_modal .modal-body h4 {
        font-size: 16px;
    }
    
    .order_modal .table {
        font-size: 11px;
    }
    
    .order_modal .table thead th,
    .order_modal .table tbody td {
        padding: 10px 8px;
    }
}

/* Lawyer Dashboard Mobile Styles */
@media (max-width: 991px) {
    /* Lawyer Dashboard Cards */
    .card-statistic-1 {
        margin-bottom: 20px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow: hidden;
    }
    
    .card-statistic-1 .card-icon {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin: 15px auto;
    }
    
    .card-statistic-1 .card-wrap {
        padding: 15px;
    }
    
    .card-statistic-1 .card-header h4 {
        font-size: 14px;
        font-weight: 600;
        color: #666;
        margin-bottom: 10px;
    }
    
    .card-statistic-1 .card-body {
        font-size: 24px;
        font-weight: 700;
        color: #333;
    }
    
    /* Chart Card */
    .card {
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        margin-bottom: 20px;
        overflow: hidden;
    }
    
    .card-header {
        padding: 15px 20px;
        background: #f8f9fa;
        border-bottom: 1px solid #e3e6f0;
    }
    
    .card-header h6 {
        font-size: 16px;
        font-weight: 600;
        margin: 0;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .chart-area {
        height: 250px;
    }
    
    /* Form Controls in Cards */
    .card-header .form-control {
        font-size: 14px;
        padding: 8px 12px;
        min-height: 38px;
    }
    
    /* Tables */
    .table {
        font-size: 13px;
    }
    
    .table th {
        font-size: 12px;
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* Lawyer Sidebar Mobile */
@media (max-width: 1024px) {
    .lawyer_dashboard_layout .main-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 9999 !important;
        background: #fff !important;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3) !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
    }
    
    /* Show sidebar when sidebar-show class is on body */
    body.sidebar-show .lawyer_dashboard_layout .main-sidebar,
    .lawyer_dashboard_layout body.sidebar-show .main-sidebar,
    body.sidebar-show .main-sidebar {
        left: 0 !important;
    }
    
    /* Backdrop overlay */
    body.sidebar-show .lawyer_dashboard_layout::before,
    body.sidebar-show.lawyer_dashboard_layout::before,
    .lawyer_dashboard_layout body.sidebar-show::before {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9998 !important;
    }
    
    .lawyer_dashboard_layout .main-sidebar .sidebar-menu > li > a {
        padding: 14px 20px !important;
        font-size: 15px !important;
        min-height: 50px !important;
    }
    
    .lawyer_dashboard_layout .main-sidebar .sidebar-menu > li.active > a {
        background: var(--colorPrimary, #6b5d47) !important;
        color: #fff !important;
    }
    
    /* Lawyer Navbar Mobile */
    .lawyer_dashboard_layout .navbar {
        padding: 10px 15px !important;
        left: 0 !important;
        width: 100% !important;
    }
    
    .lawyer_dashboard_layout .navbar .nav-link-lg {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
    }
    
    .lawyer_dashboard_layout .navbar .nav-link-lg:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }
    
    /* Lawyer Main Content */
    .lawyer_dashboard_layout .main-content {
        padding: 15px 10px !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    body.sidebar-show .lawyer_dashboard_layout .main-content {
        margin-left: 0 !important;
    }
    
    /* Ensure sidebar is visible when open */
    body.sidebar-show .lawyer_dashboard_layout .main-sidebar,
    body.sidebar-show .main-sidebar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Sidebar brand logo */
    .lawyer_dashboard_layout .main-sidebar .sidebar-brand {
        padding: 15px 20px !important;
        border-bottom: 1px solid #e3e6f0 !important;
    }
    
    /* Sidebar menu items */
    .lawyer_dashboard_layout .main-sidebar .sidebar-menu {
        padding: 10px 0 !important;
    }
    
    /* Close button for mobile sidebar */
    .lawyer_dashboard_layout .main-sidebar .sidebar-close-btn {
        display: flex !important;
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        width: 35px !important;
        height: 35px !important;
        background: rgba(0, 0, 0, 0.1) !important;
        border: none !important;
        border-radius: 50% !important;
        color: #333 !important;
        font-size: 18px !important;
        cursor: pointer !important;
        z-index: 10000 !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
    }
    
    .lawyer_dashboard_layout .main-sidebar .sidebar-close-btn:hover {
        background: rgba(0, 0, 0, 0.2) !important;
        transform: scale(1.1) !important;
    }
    
    /* Hide close button on desktop */
    @media (min-width: 1025px) {
        .lawyer_dashboard_layout .main-sidebar .sidebar-close-btn {
            display: none !important;
        }
    }
}

/* Common Mobile Improvements */
@media (max-width: 768px) {
    /* Ensure all containers are responsive */
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Section Headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        margin-bottom: 20px;
    }
    
    .section-header h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    /* Breadcrumb */
    .banner-text {
        padding: 20px 0;
    }
    
    .banner-text h1 {
        font-size: 24px;
    }
    
    /* Ensure all images are responsive */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Ensure all tables are scrollable */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        width: 100%;
    }
    
    /* Form improvements */
    .form-row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .form-row > [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Empty States */
    .empty-table {
        padding: 40px 20px;
        text-align: center;
    }
    
    /* Pagination - Enhanced Design */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 25px;
        gap: 5px;
    }
    
    .pagination .page-link {
        padding: 10px 16px;
        font-size: 14px;
        margin: 0;
        border-radius: 8px;
        border: 1px solid #e3e6f0;
        color: var(--colorPrimary, #6b5d47);
        font-weight: 600;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        background: #fff;
    }
    
    .pagination .page-link:hover {
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
        color: #fff;
        border-color: var(--colorPrimary, #6b5d47);
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .pagination .page-item.active .page-link {
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
        color: #fff;
        border-color: var(--colorPrimary, #6b5d47);
        box-shadow: 0 4px 12px rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.3);
    }
    
    .pagination .page-item.disabled .page-link {
        background: #f8f9fa;
        color: #6c757d;
        border-color: #e3e6f0;
        cursor: not-allowed;
        opacity: 0.6;
    }
    
    /* Modal Improvements - Enhanced */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 16px;
        border: none;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
        overflow: hidden;
    }
    
    .modal-header {
        padding: 20px 25px;
        border-bottom: 2px solid #f0f0f0;
        background: linear-gradient(135deg, var(--colorPrimary, #6b5d47) 0%, #5a4d3a 100%);
        color: #fff;
    }
    
    .modal-header .modal-title {
        color: #fff;
        font-weight: 600;
    }
    
    .modal-header .btn-close {
        filter: brightness(0) invert(1);
        opacity: 0.9;
    }
    
    .modal-header .btn-close:hover {
        opacity: 1;
    }
    
    .modal-body {
        padding: 25px;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        background: #fff;
    }
    
    .modal-footer {
        padding: 20px 25px;
        border-top: 2px solid #f0f0f0;
        background: #f8f9fa;
    }
    
    /* Alert Improvements - Enhanced */
    .alert {
        padding: 15px 20px;
        font-size: 14px;
        border-radius: 12px;
        margin-bottom: 20px;
        border: none;
        box-shadow: 0 3px 10px rgba(0,0,0,0.08);
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .alert-success {
        background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
        color: #155724;
        border-left: 4px solid #28a745;
    }
    
    .alert-danger {
        background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(200, 35, 51, 0.1) 100%);
        color: #721c24;
        border-left: 4px solid #dc3545;
    }
    
    .alert-warning {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
        color: #856404;
        border-left: 4px solid #ffc107;
    }
    
    .alert-info {
        background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(19, 132, 150, 0.1) 100%);
        color: #0c5460;
        border-left: 4px solid #17a2b8;
    }
    
    .alert-primary {
        background: linear-gradient(135deg, rgba(var(--colorPrimary-rgb, 107, 93, 71), 0.1) 0%, rgba(90, 77, 58, 0.1) 100%);
        color: var(--colorPrimary, #6b5d47);
        border-left: 4px solid var(--colorPrimary, #6b5d47);
    }
    
    /* Card Improvements - Enhanced */
    .card {
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        margin-bottom: 20px;
        border: 1px solid #f0f0f0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .card:hover {
        box-shadow: 0 6px 25px rgba(0,0,0,0.12);
        transform: translateY(-2px);
    }
    
    .card-header {
        padding: 18px 25px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-bottom: 2px solid #e3e6f0;
        border-radius: 16px 16px 0 0;
        font-weight: 600;
        color: var(--colorPrimary, #6b5d47);
    }
    
    .card-body {
        padding: 25px;
        background: #fff;
    }
    
    .card-footer {
        padding: 18px 25px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-top: 2px solid #e3e6f0;
        border-radius: 0 0 16px 16px;
    }
    
    /* Empty State for Tables */
    .table-responsive:empty::before,
    .dashboard-table tbody:empty::after {
        content: 'لا توجد بيانات متاحة';
        display: block;
        text-align: center;
        padding: 40px 20px;
        color: #6c757d;
        font-size: 16px;
        font-weight: 500;
    }
    
    /* Loading State */
    .table-loading {
        text-align: center;
        padding: 40px 20px;
        color: var(--colorPrimary, #6b5d47);
    }
    
    .table-loading i {
        font-size: 32px;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
}

