﻿/* Site.css - Main Stylesheet for المرشح اكتفاء الحسناوي System */

* {
    font-family: 'Cairo', sans-serif;
}

body {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: linear-gradient(0deg, #ffffff 0%, #904ad763 100%);
    min-height: 92vh;
    position: relative;
}

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('../Images/back.jpg');
        background-size: cover;
        background-position: center;
        opacity: 0.1;
        z-index: -1;
    }

/* Navigation Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #764ba2 !important;
    text-decoration: none;
}

.nav-link {
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .nav-link:hover {
        color: #764ba2 !important;
        transform: translateY(-2px);
    }

.dropdown-item {
    color: #333;
    transition: all 0.3s ease;
}

    .dropdown-item:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
    }

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0 !important;
    border: none;
    font-weight: 600;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 10px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
    }

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .btn-warning:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
    }

.btn-danger {
    background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .btn-danger:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(252, 70, 107, 0.4);
    }

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
    transition: all 0.3s ease;
}

    .stats-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(118, 75, 162, 0.3);
    }

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.feature-icon {
    font-size: 3rem;
    color: #764ba2;
    margin-bottom: 20px;
}

/* Sidebar */
.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /*min-height: calc(100vh - 76px);*/
    border-radius: 0 20px 20px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.sidebar-link {
    display: block;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    margin: 5px 15px;
    transition: all 0.3s ease;
}

    .sidebar-link:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transform: translateX(5px);
    }

    .sidebar-link.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

/* Main Content */
.main-content {
    padding: 30px;
}

.page-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

    .page-header h2 {
        color: #764ba2;
        font-weight: 700;
        margin-bottom: 10px;
    }

/* Table Styles */
.table {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

    .table th {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        font-weight: 600;
        padding: 15px;
        text-align: center;
    }

    .table td {
        border-color: rgba(0, 0, 0, 0.1);
        vertical-align: middle;
        padding: 12px 15px;
        text-align: center;
    }

    .table tbody tr:hover {
        background-color: rgba(118, 75, 162, 0.1);
        transform: scale(1.01);
        transition: all 0.3s ease;
    }

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid rgba(118, 75, 162, 0.2);
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 14px;
}

    .form-control:focus {
        border-color: #764ba2;
        box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
        background-color: rgba(255, 255, 255, 0.9);
    }

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-select {
    border-radius: 10px;
    border: 2px solid rgba(118, 75, 162, 0.2);
    padding: 12px 15px;
    transition: all 0.3s ease;
}

    .form-select:focus {
        border-color: #764ba2;
        box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
    }

/* Modal Styles */
.modal-content {
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    border: none;
    padding: 20px 25px;
}

.modal-title {
    font-weight: 700;
}

/*.modal-body {
    padding: 25px;
}*/

.modal-footer {
    border: none;
    padding: 5px 5px;
}

/* Alert Styles */
.MyAlert, .alert {
    border-radius: 15px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #000;
}

/* Chart Container Fixes */
.chart-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative; /* Add this */
    min-height: 350px; /* Add this */
}

    .chart-container h4 {
        color: #764ba2;
        font-weight: 700;
        margin-bottom: 20px;
    }

    /* Chart Canvas Specific Fixes */
    .chart-container canvas {
        position: relative !important;
        height: 300px !important;
        width: 100% !important;
        max-height: 300px;
    }

/* Force proper sizing for chart containers */
#centersChart, #privatePersonsChart {
    position: relative !important;
    height: 300px !important;
    width: 100% !important;
    max-height: 300px !important;
}

/* Ensure chart containers don't move */
.chart-container .chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Chart Container */
/*.chart-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

    .chart-container h4 {
        color: #764ba2;
        font-weight: 700;
        margin-bottom: 20px;
    }*/

/* Login Styles */
.login-container {
    max-width: 450px;
    margin: 100px auto;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    display: block;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-title {
    text-align: center;
    color: #764ba2;
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* GridView Styles */
.gridview-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.table-responsive {
    border-radius: 15px;
    overflow: hidden;
}

/* Pagination Styles */
.pagination {
    justify-content: center;
    margin-top: 20px;
}

.page-link {
    color: #764ba2;
    border: 1px solid rgba(118, 75, 162, 0.3);
    border-radius: 8px;
    margin: 0 2px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

    .page-link:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-color: #764ba2;
    }

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #764ba2;
    color: white;
}

/* Search Box */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-input {
    border-radius: 25px;
    border: 2px solid rgba(118, 75, 162, 0.3);
    padding: 12px 20px;
    transition: all 0.3s ease;
}

    .search-input:focus {
        border-color: #764ba2;
        box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
    }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 8px;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner-border {
    color: #764ba2;
}

/* Toast Notifications */
.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.toast-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .search-container .row .col-md-6 {
        padding: 10px !important;
    }

    .sidebar {
        display: none !important;
    }

    .main-content {
        padding: 15px;
    }

    .login-container {
        margin: 50px auto;
        padding: 10px;
    }

    .login-card {
        padding: 25px;
    }

    .stats-card {
        margin: 10px 0;
    }

    .table-responsive {
        font-size: 14px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }

    .btn-sm {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 576px) {
    .search-container .row .col-md-6 {
        padding: 10px !important;
    }

    .sidebar {
        display: none !important;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .stats-number {
        font-size: 2rem;
    }

    .page-header {
        padding: 20px;
    }

    .chart-container {
        padding: 15px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Success and Error States */
.form-control.is-valid {
    border-color: #38ef7d;
    box-shadow: 0 0 0 0.2rem rgba(56, 239, 125, 0.25);
}

.form-control.is-invalid {
    border-color: #fc466b;
    box-shadow: 0 0 0 0.2rem rgba(252, 70, 107, 0.25);
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.shadow-custom {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}

*:has(> i) {
    direction: ltr !important;
    text-align: right !important;
}

.me-auto {
    direction: rtl !important;
    text-align: right !important;
    float: right !important;
    margin-right: unset !important;
    margin-left: auto !important;
}

.form-select {
    text-align: center !important;
}

/*// -------------------------------------*/

/* Professional Checkbox Styling for ASP.NET form-check */

/* Hide the default checkbox appearance */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #764ba2;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    outline: none;
    margin: 0;
    flex-shrink: 0;
}

    /* Checkbox hover effect */
    input[type="checkbox"]:hover {
        border-color: #667eea;
        box-shadow: 0 0 8px rgba(118, 75, 162, 0.3);
        transform: scale(1.05);
    }

    /* Checkbox focus effect */
    input[type="checkbox"]:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
    }

    /* Checkbox checked state */
    input[type="checkbox"]:checked {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-color: #764ba2;
    }

        /* Checkmark icon */
        input[type="checkbox"]:checked::before {
            content: "✓";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            font-weight: bold;
            line-height: 1;
        }

/* Form check container styling */
.form-check {
    display: inline-block;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    margin-bottom: 16px;
    direction: rtl; /* For Arabic layout */
}

/* Form check label styling */
.form-check-label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

    /* Label hover effect */
    .form-check-label:hover {
        color: #764ba2;
    }

/* Valid state */
input.is-valid[type="checkbox"] {
    border-color: #28a745;
}

    input.is-valid[type="checkbox"]:checked {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        border-color: #28a745;
    }

/* Invalid state */
input.is-invalid[type="checkbox"] {
    border-color: #dc3545;
}

    input.is-invalid[type="checkbox"]:checked {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        border-color: #dc3545;
    }

/* Disabled state */
input[type="checkbox"]:disabled {
    background-color: #f5f5f5;
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.6;
}

    input[type="checkbox"]:disabled:checked {
        background-color: #ccc;
    }

    input[type="checkbox"]:disabled + .form-check-label {
        color: #999;
        cursor: not-allowed;
        opacity: 0.6;
    }

/* Animation for state changes */
@keyframes checkboxCheck {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

input[type="checkbox"]:checked::before {
    animation: checkboxCheck 0.3s ease;
}

/* Pulse effect on check */
@keyframes checkboxPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

input[type="checkbox"]:checked {
    animation: checkboxPulse 0.3s ease;
}

/* Large variant */
.form-check.form-check-lg input[type="checkbox"] {
    width: 32px;
    height: 32px;
}

    .form-check.form-check-lg input[type="checkbox"]:checked::before {
        font-size: 16px;
    }

.form-check.form-check-lg .form-check-label {
    font-size: 16px;
}

/* Small variant */
.form-check.form-check-sm input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

    .form-check.form-check-sm input[type="checkbox"]:checked::before {
        font-size: 10px;
    }

.form-check.form-check-sm .form-check-label {
    font-size: 12px;
}

/* Switch style variant */
.form-check.form-check-switch input[type="checkbox"] {
    width: 40px;
    height: 20px;
    border-radius: 20px;
    background-color: #ccc;
}

    .form-check.form-check-switch input[type="checkbox"]::before {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background-color: white;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .form-check.form-check-switch input[type="checkbox"]:checked {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

        .form-check.form-check-switch input[type="checkbox"]:checked::before {
            transform: translateX(20px);
        }

/* Better spacing for RTL */
.form-check {
    flex-direction: row-reverse;
}

    /* Ensure proper alignment */
    .form-check input {
        margin-left: 0;
        margin-right: 0;
    }

/* Professional card-like container for form checks */
.form-check-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(118, 75, 162, 0.2);
    transition: all 0.3s ease;
}

    .form-check-card:hover {
        border-color: rgba(118, 75, 162, 0.4);
        box-shadow: 0 4px 12px rgba(118, 75, 162, 0.1);
    }

    .form-check-card .form-check {
        margin-bottom: 0;
    }

.btn-close {
    margin: unset !important;
}

@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: none;
    }
}

.mt-2 {
    margin-top: 0.1rem !important;
}

.navbar-nav .nav-link.active {
    color: red !important;
    font-weight: bold !important;
}







/* أضف هذا CSS إلى ملف Site.css أو في Site.Master */

/* تنسيق الخريطة الجغرافية */
#geographicMap {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* تنسيق أزرار التحكم في الخريطة */
.map-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .map-controls .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        transition: all 0.3s ease;
    }

        .map-controls .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }

/* تنسيق النوافذ المنبثقة للخريطة */
.map-popup {
    min-width: 200px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .map-popup h6 {
        margin-bottom: 8px;
        color: #333;
        border-bottom: 1px solid #eee;
        padding-bottom: 4px;
    }

    .map-popup p {
        font-size: 0.875rem;
        color: #666;
        margin: 2px 0;
    }

/* تنسيق العلامات المخصصة */
.custom-div-icon {
    background: transparent !important;
    border: none !important;
}

/* تنسيق مفتاح الخريطة */
.map-legend {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.875rem;
}

/* تحسين استجابة الخريطة للشاشات الصغيرة */
@media (max-width: 768px) {
    #geographicMap {
        height: 350px !important;
    }

    .map-controls {
        justify-content: center;
        margin-bottom: 10px;
    }

        .map-controls .btn {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
        }
}

/* تنسيق عداد الإحصائيات المحدث */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .stats-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* تحسين عرض الجداول */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* تحسين عرض الرسوم البيانية */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
}

    .chart-container h4 {
        color: #333;
        margin-bottom: 1rem;
        font-weight: 600;
    }

/* تحسين الألوان والخطوط */
.page-header h2 {
    color: #2c3e50;
    font-weight: 700;
}

.page-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* إضافة تأثيرات التحميل */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}
















/* أضف هذا CSS إلى ملف Site.css أو في Site.Master */

/* تنسيق ملء الشاشة للخريطة */
#fullscreenMapContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.fullscreen-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

    .fullscreen-header h4 {
        margin: 0;
        color: white;
    }

.fullscreen-controls {
    display: flex;
    gap: 10px;
}

    .fullscreen-controls .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        border-color: rgba(255,255,255,0.3);
        color: white;
        transition: all 0.3s ease;
    }

        .fullscreen-controls .btn:hover {
            background-color: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.5);
            transform: translateY(-1px);
        }

    .fullscreen-controls .btn-danger {
        background-color: #dc3545;
        border-color: #dc3545;
    }

        .fullscreen-controls .btn-danger:hover {
            background-color: #c82333;
            border-color: #bd2130;
        }

#fullscreenMap {
    flex: 1;
    width: 100%;
    height: calc(100vh - 70px);
}

    #fullscreenMap .leaflet-container {
        height: 100% !important;
        width: 100% !important;
    }

/* تحسينات إضافية لملء الشاشة */
@media (max-width: 768px) {
    .fullscreen-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .fullscreen-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

        .fullscreen-controls .btn {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
        }

    #fullscreenMap {
        height: calc(100vh - 100px);
    }
}

/* تأثير الانتقال السلس */
#fullscreenMapContainer {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* تحسين زر ملء الشاشة */
.map-controls .btn[onclick*="toggleFullscreen"] {
    position: relative;
    overflow: hidden;
}

    .map-controls .btn[onclick*="toggleFullscreen"]::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.5s;
    }

    .map-controls .btn[onclick*="toggleFullscreen"]:hover::before {
        left: 100%;
    }

/* تنسيق أزرار التحكم في الخريطة */
.map-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .map-controls .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        transition: all 0.3s ease;
    }

        .map-controls .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }

/* تنسيق النوافذ المنبثقة للخريطة */
.map-popup {
    min-width: 200px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .map-popup h6 {
        margin-bottom: 8px;
        color: #333;
        border-bottom: 1px solid #eee;
        padding-bottom: 4px;
    }

    .map-popup p {
        font-size: 0.875rem;
        color: #666;
        margin: 2px 0;
    }

/* تنسيق العلامات المخصصة */
.custom-div-icon {
    background: transparent !important;
    border: none !important;
}

/* تنسيق مفتاح الخريطة */
.map-legend {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.875rem;
}

/* تحسين استجابة الخريطة للشاشات الصغيرة */
@media (max-width: 768px) {
    #geographicMap {
        height: 350px !important;
    }

    .map-controls {
        justify-content: center;
        margin-bottom: 10px;
    }

        .map-controls .btn {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
        }
}

/* تحسين تحميل الخريطة */
.chart-container {
    position: relative;
}

    .chart-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: translateX(100%);
        z-index: 1;
        pointer-events: none;
    }

    .chart-container.loaded::before {
        display: none;
    }


/* تنسيق عداد الإحصائيات المحدث */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .stats-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* تحسين عرض الجداول */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* تحسين عرض الرسوم البيانية */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
}

    .chart-container h4 {
        color: #333;
        margin-bottom: 1rem;
        font-weight: 600;
    }

/* تحسين الألوان والخطوط */
.page-header h2 {
    color: #2c3e50;
    font-weight: 700;
}

.page-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* إضافة تأثيرات التحميل */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}









/* إخفاء Legend من الرسوم البيانية الدائرية (Pie & Doughnut) والتموجية (Area) */

/* طريقة 1: إخفاء جميع الـ legends في الرسوم المحددة */
.chart-container canvas + .chart-legend,
.chart-container .chartjs-legend {
    display: none !important;
}

/* طريقة 2: إخفاء Legend بناءً على نوع الرسم البياني */
/* للرسوم الدائرية */
canvas[data-chart-type="pie"] + .chart-legend,
canvas[data-chart-type="doughnut"] + .chart-legend,
canvas[data-chart-type="pie"] ~ .chartjs-legend,
canvas[data-chart-type="doughnut"] ~ .chartjs-legend {
    display: none !important;
}

/* للرسوم التموجية (Area) */
canvas[data-chart-type="area"] + .chart-legend,
canvas[data-chart-type="area"] ~ .chartjs-legend {
    display: none !important;
}

/* طريقة 3: إخفاء Legend بناءً على ID محدد للرسوم */
/* للرسم الدائري الأول (توزيع الجمهور) */
#centersOverviewChart + .chart-legend,
#centersOverviewChart ~ .chartjs-legend {
    display: none !important;
}

/* للرسم الدائري الثاني (حالة ملحق-لمرتكز) */
#extendStatusChart + .chart-legend,
#extendStatusChart ~ .chartjs-legend {
    display: none !important;
}

/* للرسم الدائري الثالث (حالة المراقبين) */
#monitorsStatusChart + .chart-legend,
#monitorsStatusChart ~ .chartjs-legend {
    display: none !important;
}

/* طريقة 4: إخفاء Legend بناءً على الكلاس */
.pie-chart .chart-legend,
.doughnut-chart .chart-legend,
.area-chart .chart-legend {
    display: none !important;
}

/* طريقة 5: إخفاء Legend باستخدام Chart.js built-in classes */
.chartjs-render-monitor + .chartjs-legend {
    display: none !important;
}

/* إخفاء Legend المولد تلقائياً من Chart.js */
.chart-container .chartjs-legend,
.chart-container [class*="legend"] {
    display: none !important;
}

/* طريقة 6: إخفاء أي legend يحتوي على نص عربي محدد */
.chart-legend:has([class*="arabic"]),
.chartjs-legend:has([class*="arabic"]) {
    display: none !important;
}

/* للتأكد من إخفاء جميع أنواع الـ legends */
.chart-container > *:last-child[class*="legend"],
.chart-container > *:last-child[class*="Legend"] {
    display: none !important;
}

/* إخفاء الـ legend المخصص إذا كان موجود */
.custom-legend,
.chart-custom-legend {
    display: none !important;
}

/* إخفاء الـ legend من مكتبات الرسوم البيانية الأخرى */
.apexcharts-legend,
.highcharts-legend,
.d3-legend {
    display: none !important;
}

/* للرسوم التموجية المخصصة */
.area-chart-container .legend,
.area-chart-container .chart-legend {
    display: none !important;
}

/* تأكيد إخفاء أي عنصر يحتوي على كلمة legend */
[class*="legend"]:not(.keep-legend),
[id*="legend"]:not(.keep-legend) {
    display: none !important;
}

/* إخفاء الـ legend من الرسوم المحددة في التقارير */
#reportTabsContent .chart-container .chartjs-legend,
#reportTabsContent .chart-container [class*="legend"] {
    display: none !important;
}

/* استثناء: إبقاء الـ legend في الرسوم الأعمدة والخطوط */
canvas[data-chart-type="bar"] + .chart-legend,
canvas[data-chart-type="line"] + .chart-legend,
canvas[data-chart-type="bar"] ~ .chartjs-legend,
canvas[data-chart-type="line"] ~ .chartjs-legend {
    display: block !important;
}

/* إخفاء الـ legend في رسوم محددة فقط */
.hide-legend .chartjs-legend,
.hide-legend .chart-legend {
    display: none !important;
}



/*for Mobile Only*/
/* =================================================================
   COMPLETE MOBILE RESPONSIVE STYLES FOR ASP.NET APPLICATION
   ================================================================= */

/* Mobile-First Responsive Breakpoints */
@media (max-width: 1200px) {
    /* Large tablets and small desktops */
    .container-fluid {
        padding: 15px;
    }

    .col-md-2 {
        margin-bottom: 20px;
    }
}

@media (max-width: 992px) {
    /* Tablets */
    .row {
        margin: 0 -10px;
    }

    .col-md-2, .col-md-10 {
        padding: 0 10px;
    }

    /* Sidebar adjustments */
    .sidebar {
        margin-bottom: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .sidebar-link {
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    /* Mobile devices */

    .toast-container {
        justify-self: anchor-center !important;
    }

    #alertToast {
        box-shadow: 0px 0px 50px #000;
        bottom: 0;
        position: fixed;
        left: 0;
        width: 85%;
        padding: 10px;
        margin: 10px;
        justify-self: anchor-center;
        border: 1px solid blue;
        border-radius: 20px;
    }
    /* Container and layout adjustments */
    .container-fluid {
        padding: 10px;
    }

    .row {
        margin: 0 -5px;
    }

    .col-md-2, .col-md-10, .col-md-6, .col-md-4, .col-md-3 {
        width: 100%;
        padding: 0 5px;
    }

    /* Page header */
    .page-header {
        text-align: center;
        margin-bottom: 20px;
    }

        .page-header h2 {
            font-size: 24px;
            margin-bottom: 10px;
        }

        .page-header p {
            font-size: 14px;
        }

    /* Sidebar mobile styling */
    .sidebar {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 20px;
    }

        .sidebar .p-3 {
            padding: 15px !important;
        }

        .sidebar h5 {
            font-size: 18px;
            margin-bottom: 15px;
        }

    .sidebar-link {
        display: block;
        padding: 10px 12px;
        margin-bottom: 5px;
        border-radius: 5px;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .sidebar-link:hover, .sidebar-link.active {
            background-color: #007bff;
            color: white !important;
            transform: translateX(5px);
        }

    /* Action buttons */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 15px;
        align-items: stretch !important;
    }

    .d-flex.gap-2 {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px !important;
    }

    .btn {
        padding: 10px 15px;
        font-size: 14px;
        min-width: auto;
        border-radius: 6px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Search container */
    .search-container {
        margin-bottom: 20px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #dee2e6;
    }

        .search-container .row .col-md-6,
        .search-container .row .col-md-4,
        .search-container .row .col-md-3,
        .search-container .row .col-md-2 {
            padding: 10px;
            margin-bottom: 10px;
        }

    .search-input, .form-control, .form-select {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
        border: 1px solid #ced4da;
    }

        /* Mobile-optimized form controls */
        .form-control:focus, .form-select:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
            font-size: 16px;
        }
}

@media (max-width: 576px) {
    /* Small mobile devices */

    /* Extra small adjustments */
    .container-fluid {
        padding: 8px;
    }

    .page-header h2 {
        font-size: 20px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 13px;
        width: 100%;
        margin-bottom: 8px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }

    .d-flex.gap-2 .btn {
        width: calc(50% - 5px);
        margin-bottom: 10px;
    }

    /* Form controls */
    .search-input, .form-control, .form-select {
        padding: 10px;
        font-size: 16px;
    }

    /* Modal adjustments */
    .modal-lg {
        max-width: 95% !important;
        margin: 10px auto;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 15px;
    }

    .modal-title {
        font-size: 18px;
    }
}

/* =================================================================
   RESPONSIVE TABLE STYLES (PROFESSIONAL MOBILE TABLES)
   ================================================================= */

/* Mobile table container */
.table-responsive {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    /* Hide original table on mobile */
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

        /* Hide table headers */
        .table-responsive thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }

    /* Style table rows as cards */
    .table-responsive tr {
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        position: relative;
    }

        .table-responsive tr:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }

    /* Style table cells */
    .table-responsive td {
        border: 1px solid lightgray !important;
        padding: 8px 0 !important;
        text-align: center !important;
        position: relative;
        min-height: 30px;
        border-bottom: 1px solid #f8f9fa !important;
    }

        .table-responsive td:last-child {
            border-bottom: none !important;
        }

        /* Add labels before each cell */
        .table-responsive td:before {
            content: attr(data-label);
            position: absolute;
            left: 0;
            width: 45%;
            padding-right: 10px;
            white-space: nowrap;
            font-weight: 600;
            color: #495057;
            text-align: left;
            font-size: 14px;
        }

    /* Action buttons in mobile view */
    .table-responsive .action-buttons {
        display: flex;
        gap: 8px;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-top: 10px;
    }

        .table-responsive .action-buttons .btn {
            padding: 6px 12px;
            font-size: 12px;
            min-width: 60px;
            width: auto;
            margin-bottom: 5px;
        }

    /* Badge adjustments */
    .badge {
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 4px;
    }

    /* Pagination adjustments */
    .pagination-ys {
        justify-content: center;
        margin-top: 20px;
    }

        .pagination-ys .page-link {
            padding: 8px 12px;
            font-size: 14px;
            margin: 0 2px;
            border-radius: 4px;
        }
}

/* =================================================================
   SEARCHABLE DROPDOWN MOBILE OPTIMIZATION
   ================================================================= */

@media (max-width: 768px) {
    /* Dropdown container */
    .dropdown-container {
        margin-bottom: 15px;
    }

    .dropdown-trigger {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px; /* Better touch target */
    }

    .dropdown-text {
        font-size: 14px;
    }

    .dropdown-menu {
        max-height: 60vh; /* Limit height on mobile */
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

    .search-input-Special {
        padding: 12px 16px 12px 40px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
    }

    .option-item {
        padding: 15px 16px;
        font-size: 14px;
        min-height: 48px; /* Better touch target */
        display: flex;
        align-items: center;
    }

    .option-name {
        font-size: 14px;
        line-height: 1.4;
    }

    /* Clear and chevron buttons */
    .clear-btn, .chevron {
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* =================================================================
   MODAL MOBILE OPTIMIZATION
   ================================================================= */

@media (max-width: 768px) {
    .modal {
        padding: 10px !important;
    }

    .modal-dialog {
        max-width: 95% !important;
        margin: 20px auto !important;
        max-height: calc(100vh - 40px);
        display: flex;
        flex-direction: column;
    }

    .modal-content {
        border-radius: 12px;
        border: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        max-height: 100%;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        padding: 15px 20px;
        border-bottom: 1px solid #dee2e6;
        border-radius: 12px 12px 0 0;
    }

    .modal-body {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
    }

    .modal-footer {
        padding: 15px 20px;
        border-top: 1px solid #dee2e6;
        border-radius: 0 0 12px 12px;
    }

        .modal-footer .btn {
            width: 100%;
            margin-bottom: 10px;
            padding: 12px;
            font-size: 16px;
        }

            .modal-footer .btn:last-child {
                margin-bottom: 0;
            }
}

/* =================================================================
   FORM MOBILE OPTIMIZATION
   ================================================================= */

@media (max-width: 768px) {
    .form-label {
        font-weight: 600;
        color: #495057;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .form-control, .form-select {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
        border: 2px solid #e9ecef;
        transition: all 0.3s ease;
        background-color: #fff;
    }

        .form-control:focus, .form-select:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
            background-color: #fff;
        }

    .form-check {
        padding: 15px 0;
    }

    .form-check-input {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .form-check-label {
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
    }

    /* Validation messages */
    .text-danger {
        font-size: 13px;
        margin-top: 5px;
        display: block;
    }

    /* Input groups */
    .input-group {
        margin-bottom: 15px;
    }

        .input-group .btn {
            padding: 12px 15px;
            border: 2px solid #e9ecef;
        }
}

/* =================================================================
   ALERT AND NOTIFICATION MOBILE STYLES
   ================================================================= */

@media (max-width: 768px) {
    .MyAlert, .alert {
        margin: 15px 0;
        padding: 15px;
        border-radius: 8px;
        font-size: 14px;
        border: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .alert-success {
        background-color: #d4edda;
        color: #155724;
    }

    .alert-danger {
        background-color: #f8d7da;
        color: #721c24;
    }

    .alert-warning {
        background-color: #fff3cd;
        color: #856404;
    }

    .alert-info {
        background-color: #d1ecf1;
        color: #0c5460;
    }
}

/* =================================================================
   ACCESSIBILITY AND TOUCH IMPROVEMENTS
   ================================================================= */

@media (max-width: 768px) {
    /* Ensure all clickable elements have minimum touch target size */
    .btn, .form-control, .form-select, .dropdown-trigger, .option-item {
        min-height: 44px; /* iOS recommended minimum */
    }

    /* Improve contrast for better readability */
    .text-muted {
        color: #6c757d !important;
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }

    /* Remove outline on touch */
    button:focus, input:focus, select:focus, textarea:focus {
        outline: none;
    }

    /* Prevent text selection on buttons */
    .btn, .dropdown-trigger, .option-item {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* Improve tap targets */
    .sidebar-link, .action-buttons .btn {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
}

/* =================================================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ================================================================= */

@media (max-width: 768px) and (orientation: landscape) {
    .modal-dialog {
        max-height: calc(100vh - 20px);
    }

    .dropdown-menu {
        max-height: 50vh;
    }

    .page-header {
        margin-bottom: 15px;
    }

        .page-header h2 {
            font-size: 22px;
        }
}


/* =================================================================
   COMPLETE MOBILE RESPONSIVE STYLES FOR ASP.NET APPLICATION
   ================================================================= */

/* Mobile-First Responsive Breakpoints */
@media (max-width: 1200px) {
    /* Large tablets and small desktops */
    .container-fluid {
        padding: 15px;
    }

    .col-md-2 {
        margin-bottom: 20px;
    }
}

@media (max-width: 992px) {
    /* Tablets */
    .row {
        margin: 0 -10px;
    }

    .col-md-2, .col-md-10 {
        padding: 0 10px;
    }

    /* Sidebar adjustments */
    .sidebar {
        margin-bottom: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .sidebar-link {
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    /* Mobile devices */

    /* Container and layout adjustments */
    .container-fluid {
        padding: 10px;
    }

    .row {
        margin: 0 -5px;
    }

    .col-md-2, .col-md-10, .col-md-6, .col-md-4, .col-md-3 {
        width: 100%;
        padding: 0 5px;
        margin-bottom: 15px;
    }

    /* Page header */
    .page-header {
        text-align: center;
        margin-bottom: 20px;
    }

        .page-header h2 {
            font-size: 24px;
            margin-bottom: 10px;
        }

        .page-header p {
            font-size: 14px;
        }

    /* Sidebar mobile styling */
    .sidebar {
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 20px;
    }

        .sidebar .p-3 {
            padding: 15px !important;
        }

        .sidebar h5 {
            font-size: 18px;
            margin-bottom: 15px;
        }

    .sidebar-link {
        display: block;
        padding: 10px 12px;
        margin-bottom: 5px;
        border-radius: 5px;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .sidebar-link:hover, .sidebar-link.active {
            background-color: #007bff;
            color: white !important;
            transform: translateX(5px);
        }

    /* Action buttons */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 15px;
        align-items: stretch !important;
    }

    .d-flex.gap-2 {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px !important;
    }

    .btn {
        padding: 10px 15px;
        font-size: 14px;
        min-width: auto;
        border-radius: 6px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Search container */
    .search-container {
        margin-bottom: 20px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #dee2e6;
    }

        .search-container .row .col-md-6,
        .search-container .row .col-md-4,
        .search-container .row .col-md-3,
        .search-container .row .col-md-2 {
            padding: 10px;
            margin-bottom: 10px;
        }

    .search-input, .form-control, .form-select {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
        border: 1px solid #ced4da;
    }

        /* Mobile-optimized form controls */
        .form-control:focus, .form-select:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
            font-size: 16px;
        }
}

@media (max-width: 576px) {
    /* Small mobile devices */

    /* Extra small adjustments */
    .container-fluid {
        padding: 8px;
    }

    .page-header h2 {
        font-size: 20px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 13px;
        width: 100%;
        margin-bottom: 8px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }

    .d-flex.gap-2 .btn {
        width: calc(50% - 5px);
        margin-bottom: 10px;
    }

    /* Form controls */
    .search-input, .form-control, .form-select {
        padding: 10px;
        font-size: 16px;
    }

    /* Modal adjustments */
    .modal-lg {
        max-width: 95% !important;
        margin: 10px auto;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 15px;
    }

    .modal-title {
        font-size: 18px;
    }
}

/* =================================================================
   RESPONSIVE TABLE STYLES (PROFESSIONAL MOBILE TABLES)
   ================================================================= */

/* Mobile table container */
.table-responsive {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    /* Hide original table structure on mobile and use custom mobile layout */
    .table-responsive table.mobile-processed thead {
        display: none;
    }

    .table-responsive table.mobile-processed tbody tr {
        display: block;
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        margin-bottom: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.07);
        overflow: hidden;
        transition: all 0.3s ease;
    }

        .table-responsive table.mobile-processed tbody tr:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        }

    .table-responsive table.mobile-processed tbody td.mobile-row-container {
        display: block;
        padding: 0 !important;
        border: none !important;
    }

    /* Mobile row header */
    .mobile-row-header {
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        padding: 15px 20px;
        font-weight: 600;
        font-size: 16px;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        margin-bottom: 0;
    }

    /* Mobile field container */
    .mobile-field {
        border-bottom: 1px solid #f8f9fa;
        transition: background-color 0.2s ease;
    }

        .mobile-field:last-child {
            border-bottom: none;
        }

        .mobile-field:hover {
            background-color: #f8f9fa;
        }

    /* Mobile field header */
    .mobile-field-header {
        background-color: #f1f3f5;
        color: #495057;
        padding: 12px 20px 8px 20px;
        font-weight: 600;
        font-size: 14px;
        border-bottom: 1px solid #e9ecef;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Mobile field content */
    .mobile-field-content {
        padding: 15px 20px;
        color: #212529;
        font-size: 15px;
        line-height: 1.5;
        min-height: 20px;
    }

        /* Special styling for badges in content */
        .mobile-field-content .badge {
            display: inline-block;
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 20px;
            font-weight: 500;
        }

        /* Action buttons in mobile field content */
        .mobile-field-content .action-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-start;
            flex-wrap: wrap;
            margin-top: 5px;
        }

            .mobile-field-content .action-buttons .btn {
                padding: 8px 16px;
                font-size: 13px;
                min-width: 80px;
                border-radius: 6px;
                font-weight: 500;
                transition: all 0.2s ease;
            }

                .mobile-field-content .action-buttons .btn:hover {
                    transform: translateY(-1px);
                    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                }

        /* Empty content styling */
        .mobile-field-content:empty:before {
            content: "غير محدد";
            color: #6c757d;
            font-style: italic;
            font-size: 13px;
        }

        /* Number field styling */
        .mobile-field-content:has(.text-center),
        .mobile-field-header + .mobile-field-content:first-child {
            text-align: center;
            font-weight: 500;
            color: #007bff;
        }

    /* Pagination adjustments */
    .pagination-ys {
        justify-content: center;
        margin-top: 30px;
        padding: 0 20px;
    }

        .pagination-ys .page-link {
            padding: 10px 15px;
            font-size: 14px;
            margin: 0 3px;
            border-radius: 6px;
            border: 1px solid #dee2e6;
            color: #007bff;
            transition: all 0.2s ease;
        }

            .pagination-ys .page-link:hover {
                background-color: #007bff;
                color: white;
                transform: translateY(-1px);
                box-shadow: 0 2px 4px rgba(0,123,255,0.3);
            }

        .pagination-ys .page-item.active .page-link {
            background-color: #007bff;
            border-color: #007bff;
            color: white;
            box-shadow: 0 2px 8px rgba(0,123,255,0.4);
        }
}

/* =================================================================
   SEARCHABLE DROPDOWN MOBILE OPTIMIZATION
   ================================================================= */

@media (max-width: 768px) {
    /* Dropdown container */
    .dropdown-container {
        margin-bottom: 15px;
    }

    .dropdown-trigger {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px; /* Better touch target */
    }

    .dropdown-text {
        font-size: 14px;
    }

    .dropdown-menu {
        max-height: 60vh; /* Limit height on mobile */
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

    .search-input-Special {
        padding: 12px 16px 12px 40px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
    }

    .option-item {
        padding: 15px 16px;
        font-size: 14px;
        min-height: 48px; /* Better touch target */
        display: flex;
        align-items: center;
    }

    .option-name {
        font-size: 14px;
        line-height: 1.4;
    }

    /* Clear and chevron buttons */
    .clear-btn, .chevron {
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* =================================================================
   MODAL MOBILE OPTIMIZATION
   ================================================================= */

@media (max-width: 768px) {
    .modal {
        padding: 10px !important;
    }

    .modal-dialog {
        max-width: 95% !important;
        margin: 20px auto !important;
        max-height: calc(100vh - 40px);
        display: flex;
        flex-direction: column;
    }

    .modal-content {
        border-radius: 12px;
        border: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        max-height: 100%;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        padding: 15px 20px;
        border-bottom: 1px solid #dee2e6;
        border-radius: 12px 12px 0 0;
    }

    .modal-body {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
    }

    .modal-footer {
        padding: 15px 20px;
        border-top: 1px solid #dee2e6;
        border-radius: 0 0 12px 12px;
    }

        .modal-footer .btn {
            width: 100%;
            margin-bottom: 10px;
            padding: 12px;
            font-size: 16px;
        }

            .modal-footer .btn:last-child {
                margin-bottom: 0;
            }
}

/* =================================================================
   FORM MOBILE OPTIMIZATION
   ================================================================= */

@media (max-width: 768px) {
    .form-label {
        font-weight: 600;
        color: #495057;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .form-control, .form-select {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
        border: 2px solid #e9ecef;
        transition: all 0.3s ease;
        background-color: #fff;
    }

        .form-control:focus, .form-select:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
            background-color: #fff;
        }

    .form-check {
        padding: 15px 0;
    }

    .form-check-input {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .form-check-label {
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
    }

    /* Validation messages */
    .text-danger {
        font-size: 13px;
        margin-top: 5px;
        display: block;
    }

    /* Input groups */
    .input-group {
        margin-bottom: 15px;
    }

        .input-group .btn {
            padding: 12px 15px;
            border: 2px solid #e9ecef;
        }
}

/* =================================================================
   ALERT AND NOTIFICATION MOBILE STYLES
   ================================================================= */

@media (max-width: 768px) {
    .MyAlert, .alert {
        margin: 15px 0;
        padding: 15px;
        border-radius: 8px;
        font-size: 14px;
        border: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .alert-success {
        background-color: #d4edda;
        color: #155724;
    }

    .alert-danger {
        background-color: #f8d7da;
        color: #721c24;
    }

    .alert-warning {
        background-color: #fff3cd;
        color: #856404;
    }

    .alert-info {
        background-color: #d1ecf1;
        color: #0c5460;
    }
}

/* =================================================================
   ACCESSIBILITY AND TOUCH IMPROVEMENTS
   ================================================================= */

@media (max-width: 768px) {
    /* Ensure all clickable elements have minimum touch target size */
    .btn, .form-control, .form-select, .dropdown-trigger, .option-item {
        min-height: 44px; /* iOS recommended minimum */
    }

    /* Improve contrast for better readability */
    .text-muted {
        color: #6c757d !important;
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }

    /* Remove outline on touch */
    button:focus, input:focus, select:focus, textarea:focus {
        outline: none;
    }

    /* Prevent text selection on buttons */
    .btn, .dropdown-trigger, .option-item {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* Improve tap targets */
    .sidebar-link, .action-buttons .btn {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
}

/* =================================================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ================================================================= */

@media (max-width: 768px) and (orientation: landscape) {
    .modal-dialog {
        max-height: calc(100vh - 20px);
    }

    .dropdown-menu {
        max-height: 50vh;
    }

    .page-header {
        margin-bottom: 15px;
    }

        .page-header h2 {
            font-size: 22px;
        }
}











/* ===== FAST RESPONSIVE CURSOR ===== */

/* إخفاء المؤشر الافتراضي */
* {
    cursor: none !important;
}

/* حاوي المؤشر المخصص - محسن للسرعة */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #00d2ff 0%, #3a7bd5 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.6), 0 0 30px rgba(58, 123, 213, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
    will-change: transform;
}

    /* الهالة الخارجية - مبسطة للسرعة */
    .custom-cursor::before {
        content: '';
        position: absolute;
        top: -8px;
        left: -8px;
        width: 32px;
        height: 32px;
        border: 1px solid rgba(0, 210, 255, 0.3);
        border-radius: 50%;
        transition: all 0.2s ease;
        animation: fastPulse 1.5s infinite;
    }

@keyframes fastPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.4;
    }
}

/* تأثير التحويم السريع */
.custom-cursor.hover {
    width: 28px;
    height: 28px;
    background: linear-gradient(45deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.7), 0 0 40px rgba(238, 90, 36, 0.4);
}

    .custom-cursor.hover::before {
        border-color: rgba(255, 107, 107, 0.4);
        animation: fastHover 1s infinite;
    }

@keyframes fastHover {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

/* تأثير النقر السريع */
.custom-cursor.click {
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #00ff88 0%, #00d4aa 100%);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.8);
    animation: fastClick 0.2s ease-out;
}

@keyframes fastClick {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.4);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* متتبع مبسط وسريع */
.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(0, 210, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* تأثيرات خاصة للعناصر المختلفة */
.custom-cursor.link {
    width: 24px;
    height: 24px;
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 0 18px rgba(240, 147, 251, 0.6);
}

.custom-cursor.button {
    width: 26px;
    height: 26px;
    background: conic-gradient(from 0deg, #667eea, #764ba2, #667eea);
    animation: fastRotate 2s linear infinite;
}

@keyframes fastRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/*.custom-cursor.input {
    width: 2px;
    height: 18px;
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 1px;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.7);
    animation: fastBlink 0.6s ease-in-out infinite;
}*/

@keyframes fastBlink {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0.3;
    }
}

/* جسيمات النقر المحسنة */
.cursor-particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: rgba(0, 210, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    animation: fastParticle 1s ease-out forwards;
}

@keyframes fastParticle {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0) translateY(-15px);
    }
}

/* إخفاء المؤشر عند عدم الحركة */
.custom-cursor.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    transition: all 0.3s ease;
}

/* محتوى الصفحة للاختبار */
.demo-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

    .demo-content h1 {
        font-size: 2.5em;
        text-align: center;
        margin-bottom: 30px;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }

    .demo-content p {
        font-size: 1.2em;
        line-height: 1.6;
        margin-bottom: 20px;
        text-align: justify;
    }

.demo-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.demo-btn {
    padding: 12px 24px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
    cursor: none;
}

    .demo-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }

.demo-input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    margin: 10px 0;
    background: rgba(255,255,255,0.1);
    color: white;
    backdrop-filter: blur(10px);
}

    .demo-input::placeholder {
        color: rgba(255,255,255,0.7);
    }

.demo-links {
    margin-top: 30px;
    text-align: center;
}

    .demo-links a {
        color: #00d2ff;
        text-decoration: none;
        margin: 0 15px;
        font-size: 1.1em;
        transition: color 0.3s ease;
    }

        .demo-links a:hover {
            color: #ff6b6b;
        }

/* تحسينات الأداء */
.custom-cursor,
.cursor-trail,
.cursor-particle {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .custom-cursor {
        width: 20px;
        height: 20px;
    }

    .cursor-trail {
        width: 6px;
        height: 6px;
    }
}
}
