@font-face {
    font-family: 'Cairo';
    src: url('fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: bold;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Cairo', sans-serif;
    background-color: #f0f0f0;
}
#windy-toggle {
    background-color: #1a4664 !important;
    color: #ffffff !important;
    margin: 0;
    align-self: flex-end !important;
    margin-bottom: 0 !important;
    vertical-align: bottom !important;
    height: 100% !important;
    font-weight: bold !important;
}

@media screen and (max-width: 768px) {
    #windy-toggle {
        flex: 1;
        min-height: 40px;
        white-space: nowrap;
        margin-bottom: 0 !important;
        transform: translateY(0) !important;
        position: relative !important;
        top: 0 !important;
    }
}

#container {
    display: flex;
    width: 100%;
    height: calc(100% - 70px); /* Or another value that works with your taskbar size */
}

#map {
    flex: 4;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#form-container {
    flex: 1;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
	min-width: 500px !important;
	
}

/* Modal Base Styles */
#records-modal, #modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    padding-top: 20px;
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 10px;
    text-align: right;
    z-index: 10000;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

/* Close Button Styles */
.close-button, .close-records-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 28px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
}

.close-button:hover, .close-button:focus,
.close-records-button:hover, .close-records-button:focus {
    color: #333;
    background-color: #f0f0f0;
}

/* Table Styles */
#records-table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
    margin-top: 15px;
    background-color: white;
}

#records-table th, #records-table td {
    border: 1px solid #dee2e6;
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
}

#records-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
}

/* Action Buttons Container */
#records-table td .action-buttons {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Button Base Styles */
#records-table td button {
    width: 80px; /* Fixed width for consistency */
    height: 36px; /* Fixed height for consistency */
    padding: 0; /* Remove padding for uniform size */
    margin: 2px; /* Consistent margin between buttons */
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
}


#records-table td button i {
    margin-left: 5px;
}

/* Specific Button Styles */
#records-table td .show-button {
    background-color: #17a2b8;
}

#records-table td .edit-button {
    background-color: #28a745;
}

#records-table td .delete-button {
    background-color: #dc3545;
}

#records-table td .attachment-button {
    background-color: #ffc107;
    color: #000;
}
/* Base select button style */
#records-table td .select-button {
    background-color: #6c757d !important; /* Default gray color */
    color: white !important;
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    min-width: 80px !important;
}

/* Hover effect */
#records-table td .select-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    opacity: 0.9 !important;
}

/* Active/Selected state */
#records-table td .select-button.btn-success {
    background-color: #28a745 !important; /* Green when selected */
    color: white !important;
}

/* Hover effect for selected state */
#records-table td .select-button.btn-success:hover {
    background-color: #218838 !important; /* Darker green on hover when selected */
}

/* Dark mode support */
body.dark-mode #records-table td .select-button {
    background-color: #495057 !important;
}

body.dark-mode #records-table td .select-button.btn-success {
    background-color: #28a745 !important;
}

/* Button Hover Effects */
#records-table td button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0.9;
}

/* Selection States */
#records-table td .select-button.btn-success {
    background-color: #28a745;
    color: white;
}

/* Show Selected Button */
#show-selected-records {
    margin: 10px 0;
    padding: 8px 15px;
    background-color: #28a745;
    border: none;
    color: white;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#show-selected-records:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* Search Input */
#search-container {
    margin: 15px 0;
    position: relative;
}

#search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    direction: rtl;
}

/* Pagination */
#pagination-container {
    margin: 20px 0;
    text-align: center;
}

#pagination-container button {
    margin: 0 2px;
    padding: 5px 10px;
    min-width: 40px;
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop and Larger Screens */
@media screen and (min-width: 900px) {
    .modal-content {
        width: 80%;
        max-width: 1200px;
        margin: 2% auto;
        padding: 25px;
    }

    #records-table td .action-buttons {
        flex-direction: row;
        gap: 8px;
    }

    #records-table td button {
        width: auto;
        margin: 0;
    }

    #records-table td:last-child {
        min-width: 400px;
    }
}

/* Tablets and Medium Screens */
@media screen and (min-width: 769px) and (max-width: 1200px) {
    .modal-content {
        width: 90%;
        margin: 1.5% auto;
        padding: 20px;
    }

    #records-table td .action-buttons {
        flex-direction: row;
        gap: 5px;
    }

    #records-table td button {
        width: auto;
        margin: 1px;
    }

    #records-table td:last-child {
        min-width: 250px;
    }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1% auto;
        padding: 15px;
    }

    #records-table td .action-buttons {
        flex-direction: column;
        gap: 3px;
    }

    #records-table td button {
        width: 100%;
        margin: 2px 0;
    }

    #records-table td:last-child {
        min-width: auto;
    }
}

/* Dark Mode Support */
body.dark-mode #records-modal .modal-content {
    background-color: #2d2d2d;
    color: #fff;
}

body.dark-mode #records-table {
    background-color: #2d2d2d;
    color: #fff;
}

body.dark-mode #records-table th {
    background-color: #363636;
    border-bottom-color: #404040;
}

body.dark-mode #records-table td, 
body.dark-mode #records-table th {
    border-color: #404040;
}

body.dark-mode #search-input {
    background-color: #363636;
    color: #fff;
    border-color: #404040;
}

body.dark-mode .close-button:hover,
body.dark-mode .close-records-button:hover {
    background-color: #404040;
    color: #fff;
}

/* Fixed width for action column */
#records-table td:last-child {
    min-width: 300px;
    max-width: 400px;
}

/* Table container for better mobile scrolling */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

/* Search input styling */
.search-input {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Pagination styling */
#pagination-container {
    margin-top: 15px;
    display: flex;
    gap: 5px;
    justify-content: center;
}

#pagination-container button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

#pagination-container button:hover {
    background-color: #f0f0f0;
}

#pagination-container button:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-size: 16px;
    font-weight: bold;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

/* Enhanced Layer Control Styling */
.leaflet-control-layers {
    font-family: 'Cairo', sans-serif !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    padding: 15px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.leaflet-control-layers-list {
    margin: 0;
    padding: 0;
}

.leaflet-control-layers-base label {
    /* Layout */
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    vertical-align: top !important;
    
    /* Spacing */
    padding: 4px 6px !important;
    margin: 2px 0 !important;
    margin-bottom: 0 !important;
    
    /* Styling */
    background-color: #1a4664!important;
    border-radius: 6px !important;
    color: #ffffff !important;
    
    /* Typography */
    font-family: 'Cairo', sans-serif !important;
    font-size: 12px !important;
    font-weight: bold !important;
    
    /* Interaction */
    cursor: pointer !important;
    transition: all 0.3s ease !important;
  }
.leaflet-control-layers-base label:hover {
    background-color: #f0f0f0;
}

.leaflet-control-layers-base input[type="radio"] {
    margin-right: 10px;
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
}

.leaflet-control-layers-base input[type="radio"]:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.leaflet-control-layers-base input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* Dark mode support */
body.dark-mode .leaflet-control-layers {
    background: rgba(40, 40, 40, 0.95) !important;
    color: #fff;
}

body.dark-mode .leaflet-control-layers-base label:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .leaflet-control-layers-base input[type="radio"] {
    border-color: #66bb6a;
}

body.dark-mode .leaflet-control-layers-base input[type="radio"]:checked {
    background-color: #66bb6a;
}

/* Separator between options */
.leaflet-control-layers-base label:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .leaflet-control-layers-base label:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hover effect on entire control */
.leaflet-control-layers:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease;
}

/* Add icons to layer options */
.leaflet-control-layers-base label::before {
    font-family: 'Font Awesome 5 Free';
    margin-right: 10px;
    font-weight: 900;
    width: 20px;
    display: inline-block;
}
/* Add this to your existing styles */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.custom-switch .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(74, 175, 80, 0.25);
}

.custom-switch {
    padding-right: 2.5rem; /* Adjust for RTL */
}

.custom-control-label {
    cursor: pointer;
}

/* Dark mode support for toggle */
body.dark-mode .custom-control-label::before {
    background-color: #333;
    border-color: #666;
}

body.dark-mode .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #66bb6a;
    border-color: #66bb6a;
}

.leaflet-control-layers-base label:nth-child(1)::before {
    content: '\f279'; /* Map marker */
    color: #4CAF50;
}

.leaflet-control-layers-base label:nth-child(2)::before {
    content: '\f0ac'; /* Globe */
    color: #2196F3;
}

.leaflet-control-layers-base label:nth-child(3)::before {
    content: '\f5a0'; /* Road */
    color: #FF9800;
}

.leaflet-control-layers-base label:nth-child(4)::before {
    content: '\f0ac'; /* Globe */
    color: #9C27B0;
}

.leaflet-control-layers-base label:nth-child(5)::before {
    content: '\f6fc'; /* Mountain */
    color: #795548;
}

.popup-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    direction: rtl;
    font-family: 'Cairo', sans-serif !important;
}

.popup-table th,
.popup-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: right;
    font-size: 14px;
}

.popup-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 35%;
    white-space: nowrap;
}

.popup-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 35%;
    white-space: nowrap;
}

#search-container {
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #333;
    color: #fff;
}

body.dark-mode #form-container {
    background-color: #444;
}

body.dark-mode input, body.dark-mode textarea {
    background-color: #555;
    color: #fff;
    border-color: #666;
}

body.dark-mode .modal-content {
    background-color: #444;
    color: #fff;
}

body.dark-mode #records-table th {
    background-color: #555;
    color: #fff;  /* Ensure headers have a readable color */
}

body.dark-mode #records-table td {
    border-color: #666;
    color: #fff;  /* Ensure table data has a readable color */
    
}

/* Additional dark mode styling for popup table */
body.dark-mode .popup-table th, 
body.dark-mode .popup-table td {
    background-color: #444;
    color: #fff;
    border-color: #666;
}

#footer-buttons {
    position: fixed !important;
    bottom: 0 !important;
    width: 100% !important;
    background-color: #1a4664  !important;
        box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    padding: 0rem !important;
    z-index: 1000 !important;
    backdrop-filter: blur(5px) !important;
    transition: background-color 0.3s ease !important;
  }
#footer-buttons button {
    margin: 0;
    flex: 1;
}

/* Desktop and Large Screens */
@media screen and (min-width: 1201px) {
    #container {
        flex-direction: row;
        height: calc(100% - 80px);
    }
    
    #map {
        flex: 3;
        height: 100%;
    }
    
    #form-container {
        flex: 1;
        height: 100%;
    }
    
    #footer-buttons {
        flex-direction: row;
        gap: 15px;
        padding: 10px 20px;
    }
    
    #footer-buttons button {
        flex: 1;
        margin: 0;
        padding: 12px;
        font-size: 16px;
        font-weight: bold !important;

    }
    
    .modal-content {
        width: 80%;
        max-width: 1200px;
        margin: 20px auto;
        padding: 25px;
    }
 }
 
 /* Tablets and Medium Screens */
 @media screen and (min-width: 769px) and (max-width: 1200px) {
    #container {
        flex-direction: row;
        height: calc(100% - 100px);
    }
    
    #map {
        flex: 2;
        height: 100%;
    }
    
    #form-container {
        flex: 1;
        height: 100%;
    }
    
    #footer-buttons {
        flex-direction: row;
        gap: 10px;
        padding: 8px 15px;
    }
    
    #footer-buttons button {
        flex: 1;
        margin: 0;
        padding: 10px;
        font-size: 15px;
        font-weight: bold !important;

    }
    
    .modal-content {
        width: 100%;
        margin: 15px auto;
        padding: 20px;
    }
 }
 
/* Mobile Devices */
@media screen and (max-width: 768px) {
    #container {
        flex-direction: column;
        height: calc(100vh - 60px);
    }
    
    #map {
        flex: none;
        height: calc(100vh - 130px);
        width: 100%;
    }
    
    /* Layer Controls Styling */
    .leaflet-control-layers {
        font-family: 'Cairo', sans-serif !important;
        position: absolute !important;
        top: 70px !important;
        right: 10px !important;
        width: auto !important;
        min-width: 200px !important;
        background: white !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
        padding: 8px !important;
        font-size: 14px !important;
    }

    .leaflet-control-layers label {
        margin: 5px 0 !important;
        padding: 5px !important;
    }

   /* Default styles for larger screens */
.refresh-control {
    position: absolute !important;
    bottom: 70px !important; /* Default position */
    right: 10px !important;
    z-index: 999 !important;
}

.refresh-control button {
    display: block;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    position: fixed;
    bottom: 100px; /* Default distance from bottom */
    right: 30px; /* Default distance from right */
    z-index: 1000;
}

/* Adjust for tablets and smaller screens */
@media (max-width: 768px) {
    .refresh-control button {
        padding: 8px 15px; /* Compact padding */
        font-size: 14px; /* Smaller font size */
        top: 70px; /* Position below header */
        right: 20px; /* Adjust horizontal position */
        bottom: auto; /* Remove bottom positioning */
    }
}

/* Adjust further for mobile screens */
@media (max-width: 480px) {
    .refresh-control button {
        padding: 6px 12px; /* Even smaller padding */
        font-size: 12px; /* Smaller text size */
        top: 90px; /* Slightly further down below header */
        right: 15px; /* Adjust for very small screens */
        bottom: auto; /* Ensure no bottom positioning */
    }
}
.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.map-coord-button button {
    min-width: 200px;
}

#map.picking {
    cursor: crosshair !important;
}
    
    


    /* Footer Buttons */
    #footer-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 8px;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        display: flex;
        justify-content: space-between;
        gap: 8px;
        height: 60px;
        
    }

    #footer-buttons button {
        flex: 1;
        padding: 8px;
        font-size: 13px;
        min-height: 40px;
        white-space: nowrap;
        font-weight: bold !important;
    }
}

/* Extra Small Mobile Devices */
@media screen and (max-width: 380px) {
    .leaflet-control-layers {
        min-width: 180px !important;
        font-size: 13px !important;
    }

    .refresh-control button {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }

 
    #records-table {
        font-size: 12px !important;
    }
}

/* Dark Mode Adjustments */
@media screen and (max-width: 768px) {
    body.dark-mode .leaflet-control-layers,
    body.dark-mode .refresh-control button,
    body.dark-mode #footer-buttons {
        background: #333 !important;
        color: white !important;
    }

    body.dark-mode #records-modal .modal-content {
        background: #222 !important;
        color: white !important;
    }

}

/* Small Mobile Devices */
@media screen and (max-width: 380px) {
    #footer-buttons button {
        font-size: 12px;
        padding: 6px;
    }
    
    /* Layer controls styling */
    .leaflet-control-layers {
        margin: 10px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }

 
 /* Small Mobile Devices */
 @media screen and (max-width: 480px) {
    #container {
        height: calc(100% - 100px);
    }
    
    #map, #form-container {
        height: calc(50% - 10px);
    }
    
    #footer-buttons {
        padding: 3px;
    }
    
    #footer-buttons button {
        padding: 6px;
        font-size: 13px;
        font-weight: bold !important;

    }
    
    .modal-content {
        width: 98%;
        margin: 5px auto;
        padding: 10px;
    }
 }
    /* Add or update in your CSS */
.coordinate-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

    .navbar {
        padding: 0.5rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    #records-table {
        font-size: 14px;
    }

    #records-table th, 
    #records-table td {
        padding: 5px;
        direction: ltr; /* Force left-to-right direction for numbers */

    }

    .leaflet-popup-content {
        width: 450px !important; /* Increase this value to make it wider */
        margin: 0 !important;
        padding: 0 !important;
        font-family: 'Cairo', sans-serif !important;
        direction: rtl;
    }
    
  /* Adjust Popup Content Style */
.leaflet-popup-content {
    width: 480px !important; /* Increase popup width to allow more room for the content */
    margin: 0 !important;
    padding: 10px !important;
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
}



/* Dark Mode Support for Popup */
body.dark-mode .formatted-date {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}
    


.leaflet-popup-content textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: 'Cairo', sans-serif !important;
}

/* Tooltip Styles */
.leaflet-tooltip {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Popup Table Styles */
.popup-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    direction: rtl;
    font-family: 'Cairo', sans-serif !important;
}

.popup-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: right;
    font-size: 13px;
    font-family: 'Cairo', sans-serif !important;
    word-wrap: break-word;
    max-width: 180px; /* Adjust based on your needs */
}

.popup-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    width: 35%; /* Reduced from 40% to give more space for time */
    white-space: nowrap;
}

/* Dark mode adjustments */
body.dark-mode .popup-table td {
    background-color: #908d8d;
    color: #fff;
    border-color: #bcb4b4;
}
.status-indicator {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-family: 'Cairo', sans-serif !important;
}

.active-status {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.inactive-status {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.active-status .status-dot {
    background-color: #4CAF50;
}

.inactive-status .status-dot {
    background-color: #6c757d;
}

/* Dark Mode Styles */
body.dark-mode .leaflet-popup-content-wrapper,
body.dark-mode .leaflet-popup-tip {
    background-color: #979292;
}

body.dark-mode .popup-table th {
    background-color: #555;
    color: #fff;
    border-color: #bcb4b4;
}

body.dark-mode .popup-table td {
    background-color: #908d8d;
    color: #fff;
    border-color: #bcb4b4;
}

body.dark-mode .active-status {
    background-color: rgba(76, 175, 80, 0.2);
}

body.dark-mode .inactive-status {
    background-color: rgba(108, 117, 125, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .leaflet-popup-content {
        width: 300px !important;
    }

    .popup-table th,
    .popup-table td {
        padding: 6px;
        font-size: 12px;
    }

    .status-indicator {
        padding: 6px 10px;
        font-size: 12px;
    }
}

#search-container {
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif !important;
}

#search-input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Cairo', sans-serif !important;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #908d8d;
    color: #fff;
}

body.dark-mode #form-container {
    background-color: #a49a9a;
}

body.dark-mode input, 
body.dark-mode textarea {
    background-color: #969595;
    color: #fff;
    border-color: #aaa4a4;
    font-family: 'Cairo', sans-serif !important;
}

body.dark-mode .modal-content {
    background-color: #979292;
    color: #fff;
}

body.dark-mode #records-table th {
    background-color: #555;
    color: #fff;
    font-family: 'Cairo', sans-serif !important;
}

body.dark-mode #records-table td {
    border-color: #bcb4b4;
    color: #fff;
    font-family: 'Cairo', sans-serif !important;
}

/* Additional dark mode styling for popup table */
body.dark-mode .popup-table th, 
body.dark-mode .popup-table td {
    background-color: #444;
    color: #fff;
    border-color: #666;
}

/* Ensure popup tip maintains style */
.leaflet-popup-tip-container {
    font-family: 'Cairo', sans-serif !important;
}

/* Ensure all text in popup uses Cairo */
.leaflet-popup * {
    font-family: 'Cairo', sans-serif !important;
}

}

/* Extra Small Devices */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 0.9rem;
    }

    input, textarea, button {
        font-size: 14px;
        padding: 8px;
    }

    label {
        font-size: 14px;
    }

    #footer-buttons {
        padding: 3px;
    }

    .modal-content {
        width: 98%;
        margin: 5px auto;
        padding: 10px;
    }

    .close-button, 
    .close-records-button {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    #footer-buttons,
    button,
    .modal {
        display: none !important;
    }

    #container {
        display: block;
        margin: 0;
        height: auto;
    }

    #map {
        height: 500px;
        page-break-after: always;
    }

    #form-container {
        padding: 0;
    }

    .leaflet-control-container {
        display: none;
    }
}

/* Dark Mode Additional Styles */
@media (prefers-color-scheme: dark) {
    body.auto-dark-mode {
        background-color: #f8fcff;
        color: #fff;
    }

    .auto-dark-mode .navbar {
        background-color: #222;
    }

    .auto-dark-mode #footer-buttons {
        background-color: #222;
    }

    .auto-dark-mode .modal-content {
        background-color: #333;
        border-color: #444;
    }
}

/* High Contrast Mode */
@media (forced-colors: active) {
    button {
        border: 2px solid currentColor;
    }

    input, textarea {
        border: 2px solid currentColor;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Apply Animations */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

.alert {
    animation: slideIn 0.3s ease-out;
}

/* Accessibility Improvements */
:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

/* Skip Navigation for Keyboard Users */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 0;
    background: #4CAF50;
    color: white;
    padding: 8px;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-nav:focus {
    top: 0;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button States */
button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Form Validation Styles */
input:invalid,
textarea:invalid {
    border-color: #dc3545;
}

.validation-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

input:invalid + .validation-message {
    display: block;
}

/* Tooltip Improvements */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* RTL Specific Adjustments */
[dir="rtl"] .modal-content {
    text-align: right;
}

[dir="rtl"] .close-button,
[dir="rtl"] .close-records-button {
    float: left;
}

[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Attachment Button Styling */
#records-table td .attachment-button {
    background-color: #ffc107;
    color: black;
}

#records-table td .attachment-button:hover {
    background-color: #e0a800;
}
#region-container {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    max-width: 400px; /* Limit width to make it more compact */
}

.form-check {
    margin-bottom: 15px;
}
/* Modal popup improvements */
button {
    background-color: #1a4664 !important;
    border: none !important;
    color: white !important;
    padding: 12px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 16px !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: background-color 0.3s !important;
}

.modal-content button {
    font-size: 15px !important;
    cursor: pointer !important;
    color: rgb(248, 239, 239) !important;
    border: none !important;
    border-radius: 3px !important;
    display: block !important;
    font-weight: bold !important;
}

.btn-primary, .btn-secondary {
    color: #fff !important;
    background-color: #1a4664 !important;
    border-color: #1a4664 !important;
}


/* Ensure modal is above map controls */
.leaflet-control-container {
    z-index: 999;
}

/* Make close button more visible */
.close-button {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    z-index: 10001;
}

[dir="rtl"] .close-button {
    right: auto;
    left: 20px;
}

/* Popup table improvements */
.popup-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.popup-table th,
.popup-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}

.popup-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

/* Enhanced dark mode */
/* Good implementation but could be improved with CSS variables */
:root {
    --bg-light: #ffffff;
    --bg-dark: #908d8d;
    --text-light: #1a1a1a;
    --text-dark: #ffffff;
    --border-light: #ddd;
    --border-dark: #bcb4b4;
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.dark-mode .modal-content {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .form-control {
    background-color: #333333;
    border-color: #404040;
    color: var(--text-dark);
}

body.dark-mode #records-table th {
    background-color: #2d2d2d;
    border-bottom-color: #404040;
}

body.dark-mode #records-table td {
    border-bottom-color: #404040;
}

body.dark-mode #records-table tr:hover td {
    background-color: #333333;
}
/* New additions - Add these to your CSS file */
/* For the first coordinate pair - side by side */
.coordinate-input:first-child {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

/* For subsequent coordinates - stacked */
.coordinate-input:not(:first-child) {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Style for all coordinate inputs */
.coordinate-input input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    direction: ltr;
    text-align: left;
}
.coordinate-pair {
    margin-bottom: 15px;
    padding-bottom: 10px;
}

/* Style for first pair (side by side) */
.coordinate-pair:first-child {
    border-bottom: 1px solid #eee;
}

/* Style for subsequent pairs (stacked) */
.coordinate-pair:not(:first-child) {
    border-bottom: 1px solid #eee;
}

.coordinate-pair input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* Remove margin from last pair */
.coordinate-pair:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

/* Input focus state */
.coordinate-pair input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 0.2rem rgba(74, 175, 80, 0.25);
}
/* Improved CSS for Governorate Selector */
#option_governates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 15px;
    background-color: #1a4664;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    padding: 8px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, box-shadow 0.3s;
}



.checkbox-label:hover {
    background-color: #1a4664;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.checkbox-label input[type="checkbox"] {
    accent-color: #4CAF50;
    width: 18px;
    height: 18px;
}

/* Non-admin layout adjustments */
.non-admin #form-container {
    display: none !important;
}

.non-admin #container {
    display: block !important;
}

.non-admin #map {
    width: 100% !important;
    flex: none !important;
    height: calc(100vh - 120px) !important; /* Adjust based on your navbar and footer height */
}

/* Ensure the container takes full width in non-admin view */
.non-admin #container {
    width: 100% !important;
    height: calc(100vh - 120px) !important; /* Adjust based on your navbar and footer height */
}

/* Adjust footer position for non-admin view */
.non-admin #footer-buttons {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}



/* Responsive adjustments for non-admin view */
@media (max-width: 768px) {
    .non-admin #map {
        height: calc(100vh - 140px) !important; /* Adjust for smaller screens */
    }
    
    .non-admin #container {
        height: calc(100vh - 140px) !important;
    }
}

@media (max-width: 576px) {
    .non-admin #map {
        height: calc(100vh - 160px) !important; /* Further adjust for mobile screens */
    }
    
    .non-admin #container {
        height: calc(100vh - 160px) !important;
    }
}

/* Responsive styling for smaller screens */
@media (max-width: 768px) {
    #option_governates {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .checkbox-label {
        font-size: 14px;
        padding: 6px;
    }
}

@media (max-width: 576px) {
    #option_governates {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
#pagination-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 5px;
    padding: 10px;
}

#pagination-container .btn {
    font-size: 12px;
    padding: 4px 8px;
    min-width: 30px;
    background-color: #1a4664 ;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#pagination-container .btn-primary {
    background-color: #1a4664 ;
    font-weight: bold;
}

#pagination-container .btn-light {
    background-color: #f8f9fa;
    color: #333;
}

#pagination-container .btn[disabled] {
    background-color: #ccc;
    cursor: default;
}
/* Leaflet Popup Styles with Cairo Font */
.leaflet-popup-content-wrapper,
.leaflet-popup-content {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 300px !important;
}

.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 8px !important;
    font-family: 'Cairo', sans-serif !important;
}

.leaflet-popup-content p {
    font-family: 'Cairo', sans-serif !important;
    margin: 0 !important;
}

/* Ensure table inside popup uses Cairo */
.leaflet-popup-content table,
.leaflet-popup-content th,
.leaflet-popup-content td {
    font-family: 'Cairo', sans-serif !important;
}

/* Ensure popup tip maintains style */
.leaflet-popup-tip-container {
    font-family: 'Cairo', sans-serif !important;
}

/* Dark mode support */
body.dark-mode .leaflet-popup-content-wrapper {
    background-color: #979292;
    color: #fff;
}

body.dark-mode .leaflet-popup-tip {
    background-color: #979292;
}

/* Altitude input styling */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-append {
    display: flex;
    margin-left: -1px;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Dark mode support */
body.dark-mode .input-group-text {
    color: #fff;
    background-color: #555;
    border-color: #666;
}

/* RTL adjustments */
[dir="rtl"] .input-group .form-control {
    border-radius: 0 0.25rem 0.25rem 0;
}

[dir="rtl"] .input-group-append {
    margin-right: -1px;
    margin-left: 0;
}

[dir="rtl"] .input-group-text {
    border-radius: 0.25rem 0 0 0.25rem;
}

/* Desktop (large screens) */
@media screen and (min-width: 1201px) {
    .input-group {
        font-size: 16px;
    }
    
    .input-group-text {
        padding: 0.5rem 1rem;
    }
}

/* Tablets and smaller desktops */
@media screen and (min-width: 769px) and (max-width: 1200px) {
    .input-group {
        font-size: 15px;
    }
    
    .input-group-text {
        padding: 0.4rem 0.8rem;
    }
}

/* Tablets and larger phones */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .input-group {
        font-size: 14px;
    }
    
    .input-group-text {
        padding: 0.35rem 0.7rem;
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    .input-group {
        font-size: 13px;
    }
    
    .input-group-text {
        padding: 0.25rem 0.5rem;
    }
    
    /* Additional mobile-specific styles */
    .input-group {
        flex-direction: column;
    }
    
    .input-group > * {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .input-group-text {
        border-radius: 4px;
    }
}

/* Altitude color classes */
.altitude-low {
    color: #FFD700 !important; /* Yellow */
    font-weight: bold;
}

.altitude-medium {
    color: #FFA500 !important; /* Orange */
    font-weight: bold;
}

.altitude-high {
    color: #FF0000 !important; /* Red */
    font-weight: bold;
}

.altitude-very-high {
    color: #0000FF !important; /* Blue */
    font-weight: bold;
}

.altitude-extreme {
    color: #008000 !important; /* Green */
    font-weight: bold;
}

/* Dark mode support */
body.dark-mode .altitude-low,
body.dark-mode .altitude-medium,
body.dark-mode .altitude-high,
body.dark-mode .altitude-very-high,
body.dark-mode .altitude-extreme {
    opacity: 0.9;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.custom-popup .leaflet-popup-content-wrapper {
    max-height: 80vh;
    overflow-y: auto;
    width: 400px;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    width: 100% !important;
}

.custom-popup .leaflet-popup-content-wrapper,
.custom-popup .leaflet-popup-tip {
    background: white;
}

.dark-mode .custom-popup .leaflet-popup-content-wrapper,
.dark-mode .custom-popup .leaflet-popup-tip {
    background: #333;
    color: white;
}
.leaflet-radius-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #ff0000;
    border-radius: 50%;
    color: #ff0000;
    font-weight: bold;
    transform: translate(-50%, -50%); /* Centers the icon precisely on its coordinates */
}
.spinner-border {
    width: 3rem;
    height: 3rem;
}

.gap-2 {
    gap: 0.5rem;
}

.float-action-button {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 1000;
}

.float-action-button .btn {
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.coordinate-input {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Dark mode support */
body.dark-mode .coordinate-input {
    background-color: #343a40;
}


/* Add this to your CSS file */
/* Input group responsive styles */
.input-group {
    width: 100%;
    margin-bottom: 1rem;
}

.input-group .form-control {
    height: auto;
    padding: 0.5rem 1rem;
    min-height: 45px; /* Larger touch target for mobile */
}

.input-group-append {
    height: 100%;
}

.input-group-text {
    height: 100%;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .input-group {
        flex-direction: row !important; /* Force row direction */
    }

    .input-group > .form-control {
        flex: 1;
        width: auto;
        min-height: 45px;
        font-size: 16px; /* Better readability on mobile */
    }

    .input-group-append {
        width: auto;
    }

    .input-group-text {
        white-space: nowrap;
        padding: 0.5rem 1rem;
        font-size: 16px;
    }

    /* Adjust vertical spacing */
    #الارتفاع {
        margin-bottom: 0;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .input-group {
        margin-bottom: 1rem;
    }

    .input-group > .form-control,
    .input-group-text {
        font-size: 14px;
        padding: 0.5rem;
    }
}
/* Add to your existing styles */
.input-group {
    margin-bottom: 1rem;
}

.input-group input[type="number"] {
    text-align: left;
    direction: ltr;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .input-group input[type="number"],
    #radius-request,
    #الارتفاع {
        min-height: 45px;
        font-size: 16px;
    }

    .input-group-text {
        min-height: 45px;
        display: flex;
        align-items: center;
        padding: 0.5rem 1rem;
        font-size: 16px;
        white-space: nowrap;
    }

    .form-text {
        font-size: 12px;
        margin-top: 0.25rem;
    }
}
.status-filter-bar .btn-group {
    display: flex;
    gap: 5px;
}

.status-filter-bar .btn {
    flex: 1;
    transition: all 0.3s ease;
}

.status-filter-bar .btn.active {
    font-weight: bold;
}

.action-info {
    border-left: 3px solid;
}

.action-info.border-success {
    border-left-color: var(--bs-success);
}

.action-info.border-danger {
    border-left-color: var(--bs-danger);
}

.card {
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.card-header {
    background-color: rgba(0,0,0,0.02) !important;
    padding: 10px !important;
}

.card-body {
    padding: 15px !important;
    background-color: var(--card-body-bg) !important;
    color: var(--card-body-color) !important;
}

/* Light mode styles */
:root {
    --card-body-bg: #ffffff;
    --card-body-color: #212529;
}

/* Dark mode styles */
.dark-mode {
    --card-body-bg: #2b2b2b;
    --card-body-color: #f0f0f0;
}
.request-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 15px !important;
    table-layout: fixed !important; /* Add this line */
}

.request-table td {
    padding: 8px !important;
    vertical-align: top !important;
    word-wrap: break-word !important; /* Add this line */
}

.request-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

.request-table tr td:first-child {
    font-weight: bold !important;
    width: 30% !important;
}

.request-table tr td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Add this new class */
.request-table .date-cell {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 0 !important;
}
.action-info {
    padding: 10px !important;
    border-radius: 4px !important;
    background-color: var(--action-info-bg) !important;
    color: var(--action-info-color) !important;
}

.action-info.border-warning {
    border: 1px solid var(--warning-border-color) !important;
}

.action-info.border-success {
    border: 1px solid var(--success-border-color) !important;
}

.action-info.border-danger {
    border: 1px solid var(--danger-border-color) !important;
}

/* Light mode styles */
:root {
    --action-info-bg: #f8f9fa;
    --action-info-color: #212529;
    --warning-border-color: #ffc107;
    --success-border-color: #28a745;
    --danger-border-color: #dc3545;
}

/* Dark mode styles */
.dark-mode {
    --action-info-bg: #343a40;
    --action-info-color: #f0f0f0;
    --warning-border-color: #ffa000;
    --success-border-color: #00c851;
    --danger-border-color: #ff4444;
}

.additional-details {
    margin-top: 15px !important;
}

.systems-send-section {
    margin-top: 15px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.systems-send-title {
    font-weight: bold !important;
    margin-bottom: 10px !important;
}

.systems-checkbox {
    margin-bottom: 5px !important;
}

.button-container {
    margin-top: 10px !important;
}

.approve-button {
    background-color: #28a745 !important;
    color: white !important;
}

.reject-button {
    background-color: #dc3545 !important;
    color: white !important;
}


.request-summary {
    font-size: 0.95rem;
}

.additional-details {
    font-size: 0.9rem;
    padding: 1rem;
    background: rgba(0,0,0,0.02);
    border-radius: 6px;
}
.collapse-content {
    transition: all 0.3s ease;
}

.btn-link {
    text-decoration: none;
    color: #6c757d;
}

.btn-link:hover {
    color: #0056b3;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.additional-details {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}
/* Light Mode Text Colors */
#request-form-modal {
    color: #333333 !important;
}

#request-form-modal .modal-title {
    color: #333333 !important;
}

#request-form-modal label {
    color: #333333 !important;
}

#request-form-modal .form-control {
    color: #333333 !important;
}

#request-form-modal .input-group-text {
    color: #333333 !important;
}

#request-form-modal .checkbox-label {
    color: #333333 !important;
}

#request-form-modal .custom-file-label {
    color: #333333 !important;
}

#request-form-modal input::placeholder {
    color: #6c757d !important;
}

#request-form-modal textarea::placeholder {
    color: #6c757d !important;
}

/* Button Text Colors */
#request-form-modal .btn {
    color: #ffffff !important;
}

.btn-secondary {
    color: #fff !important;
    background-color: #1a4664!important;
    border-color: #1a4664!important;
}


/* Governorates Section */
#governates_btn {
    color: #333333 !important;
}

#option_governates_btn .checkbox-label {
    color: #333333 !important;
}

/* Dark Mode Text Colors */
body.dark-mode #request-form-modal {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal .modal-title {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal label {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal .form-control {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal .input-group-text {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal .checkbox-label {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal .custom-file-label {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal input::placeholder {
    color: #adb5bd !important;
}

body.dark-mode #request-form-modal textarea::placeholder {
    color: #adb5bd !important;
}

/* Dark Mode Button Text Colors */
body.dark-mode #request-form-modal .btn {
    color: #ffffff !important;
}

body.dark-mode #request-form-modal .btn-secondary {
    color: #ffffff !important;
}

/* Dark Mode Governorates Section */
body.dark-mode #governates_btn {
    color: #ffffff !important;
}

body.dark-mode #option_governates_btn .checkbox-label {
    color: #ffffff !important;
}

/* Input Fields Specific */
#request-form-modal input[type="text"],
#request-form-modal input[type="number"],
#request-form-modal input[type="date"],
#request-form-modal input[type="datetime-local"],
#request-form-modal textarea {
    color: #333333 !important;
    background-color: #ffffff !important;
}

body.dark-mode #request-form-modal input[type="text"],
body.dark-mode #request-form-modal input[type="number"],
body.dark-mode #request-form-modal input[type="date"],
body.dark-mode #request-form-modal input[type="datetime-local"],
body.dark-mode #request-form-modal textarea {
    color: #ffffff !important;
    background-color: #454d55 !important;
}

/* Coordinates Section */
.coordinate-input input {
    color: #333333 !important;
}

body.dark-mode .coordinate-input input {
    color: #ffffff !important;
}

/* File Input */
.custom-file-label::after {
    color: #333333 !important;
}

body.dark-mode .custom-file-label::after {
    color: #ffffff !important;
}


/* Base formatted date styles */
.formatted-date {
    display: inline-block;
    font-family: 'Cairo', sans-serif !important;
    font-size: 14px;
    font-weight: 500;
    direction: ltr;
    white-space: nowrap;
    background-color: #f8f9fa;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-width: 160px;
    text-align: center;
    margin: 2px 0;
}

/* Popup table specific styles */
.popup-table td .formatted-date {
    width: 100%;
    min-width: 160px;
    margin: 0;
    font-size: 13px;
}

/* Ensure the date is always visible in table cells */
td.date-cell {
    min-width: 170px;
    white-space: nowrap;
}

/* Dark mode support */
body.dark-mode .formatted-date {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .formatted-date {
        font-size: 13px;
        padding: 4px 8px;
        min-width: 140px;
    }
    
    .popup-table td .formatted-date {
        min-width: 140px;
        font-size: 12px;
    }
}

/* Print styles */
@media print {
    .formatted-date {
        background: none;
        border: none;
        padding: 0;
    }
}

/* Leaflet Popup Content - Standard Mode */
.leaflet-popup-content {
    width: 450px !important; /* Set consistent width to provide enough room */
    margin: 0 !important;
    padding: 10px !important; /* Padding for better internal spacing */
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
}

.leaflet-popup-content-wrapper {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 10px !important;
    width: auto !important;
    min-width: 300px !important;
    max-width: 400px !important;
}

.popup-content {
    direction: rtl !important;
    font-family: 'Cairo', sans-serif !important;
}

.popup-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 10px !important;
}

.popup-table th, 
.popup-table td {
    padding: 8px !important;
    border: 1px solid #ddd !important;
    text-align: right !important;
}

.popup-table th {
    background-color: #f8f9fa !important;
    font-weight: bold !important;
    width: 40% !important;
}

.status-indicator {
    padding: 5px 10px !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.status-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    display: inline-block !important;
}

.active-status {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}
/* Fix for mobile dropdown menu */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #1a4664;
        z-index: 1030;
        padding: 1rem;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        background-color: rgba(0,0,0,0.2) !important;
        border: none !important;
        margin-top: 5px !important;
        box-shadow: none !important;
    }
    
    .dropdown-item {
        color: #fff !important;
        padding: .5rem 1.5rem !important;
    }
    
    .navbar-toggler {
        border: 1px solid rgba(255,255,255,0.3) !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .navbar-toggler:focus {
        outline: none !important;
        box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.15) !important;
    }
}
.active-status .status-dot {
    background-color: #28a745 !important;
}

.notam-text-container {
    max-height: 200px !important;
    overflow-y: auto !important;
    background-color: #f8f9fa !important;
    border-radius: 6px !important;
    border: 1px solid #e9ecef !important;
    margin-top: 4px !important;
}

.notam-text-content {
    font-family: 'Courier New', monospace !important;
    font-size: 13px !important;
    white-space: pre-line !important;
    padding: 10px !important;
    direction: ltr !important;
    text-align: left !important;
    line-height: 1.4 !important;
}

/* Popup Textarea Styles */
.leaflet-popup-content textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical; /* Allow users to resize vertically */
    font-family: 'Cairo', sans-serif !important;
}

/* Dark Mode Support for Popup */
body.dark-mode .leaflet-popup-content-wrapper {
    background-color: #2d2d2d; /* Dark background */
    color: #ffffff; /* Light text color for contrast */
    border-radius: 8px !important;
    padding: 15px !important;
}

body.dark-mode .formatted-date {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

body.dark-mode .leaflet-popup-content textarea {
    background-color: #444;
    color: #fff;
    border-color: #666;
}

/* Dark Mode Popup Box Shadow and Overflow Fix */
body.dark-mode .leaflet-popup-content-wrapper,
body.dark-mode .leaflet-popup-content {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.systems-send-section .btn-primary {
    background-color: #1a4664 ;
    border-color: #1a4664 ;
    margin-bottom: 0.5rem;
}

.systems-send-section .gap-2 {
    gap: 0.5rem !important;
}

.systems-send-section .flex-column {
    flex-direction: column !important;
}

.systems-send-section .w-100 {
    width: 100% !important;
}

.systems-send-section .mb-2 {
    margin-bottom: 0.5rem !important;
}

.systems-send-section .button-container {
    margin-top: 0.5rem;
}

.systems-send-section .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

.modal-content {
    max-height: 90vh;
}

.modal-body {
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

.request-table {
    position: relative;
}

.request-row {
    cursor: pointer;
}

.request-row:hover {
    background-color: rgba(0,0,0,.05);
}

.controls-sticky {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}
.modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

.modal-content {
    height: 90vh;
}

.badge {
    font-size: 0.875rem;
    padding: 0.4em 0.6em;
}

.btn-group .btn {
    padding: 0.25rem 0.5rem;
}



.form-control:focus {
    box-shadow: none;
    border-color: #80bdff;
}

.custom-div-icon {
    position: relative;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}


/* Modal Styles */
#records-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: none;
    z-index: 1050 !important;
    overflow-y: auto !important;
}



.close-records-button:hover {
    color: #dc3545 !important;
}

/* Search Container */
#search-container {
    margin-bottom: 20px !important;
    position: relative !important;
}

/* Search Input */
#search-input {
    width: 100% !important;
    padding: 12px 45px 12px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    background-color: #f8f9fa !important;
    direction: rtl !important;
}

#search-input:focus {
    border-color: #1a4664  !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    background-color: #fff !important;
}

/* Show Selected Button */
#show-selected-records {
    background-color: #28a745 !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    border: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    margin: 10px 0 20px 0 !important;
}

#show-selected-records:hover {
    background-color: #218838 !important;
    transform: translateY(-1px) !important;
}






#records-table tbody tr:hover {
    background-color: #f8f9fa !important;
}

/* Base Pagination Container */
#pagination-container {
    margin-top: 15px !important;
    padding: 10px !important;
    text-align: center !important;
    background: #fff !important;
    border-top: 1px solid #dee2e6 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
}

/* All Pagination Buttons (Base Style) */
#pagination-container button,
#pagination-container .btn,
#pagination-container .btn-light {
    padding: 8px 16px !important;
    margin: 0 4px !important;
    min-width: 30px !important;
    font-size: 16px !important;
    border: 1px solid #ddd !important;
    background-color: white !important;
    color: #1a4664 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-align: center !important;
    line-height: 1.5 !important;
    vertical-align: middle !important;
    user-select: none !important;
}

/* Hover State */
#pagination-container button:hover,
#pagination-container .btn:hover,
#pagination-container .btn-light:hover {
    background-color: #f8f9fa !important;
    border-color: #ddd !important;
    color: #333 !important;
}

/* Active/Selected State */
#pagination-container button.active,
#pagination-container .btn.active,
#pagination-container .btn-light.active {
    background-color: #1a4664 !important;
    border-color: #1a4664 !important;
    color: white !important;
}

/* Disabled State */
#pagination-container button:disabled,
#pagination-container .btn:disabled,
#pagination-container .btn-light:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f8f9fa !important;
}

/* Previous/Next Buttons */
#pagination-container button:first-child,
#pagination-container button:last-child {
    min-width: 70px !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #pagination-container button,
    #pagination-container .btn,
    #pagination-container .btn-light {
        padding: 6px 12px !important;
        font-size: 14px !important;
        min-width: 25px !important;
    }
}

/* Coordinates Display */
#coordinates {
    position: fixed !important;
    bottom: 10px !important;
    left: 10px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    font-size: 14px !important;
    z-index: 1000 !important;
}

/* Dark Mode Styles */
body.dark-mode #records-modal .modal-content {
    background-color: #2d2d2d !important;
    color: #fff !important;
}

body.dark-mode #search-input {
    background-color: #363636 !important;
    border-color: #404040 !important;
    color: #fff !important;
}

body.dark-mode #records-table {
    background-color: #2d2d2d !important;
}

body.dark-mode #records-table thead th {
    background-color: #363636 !important;
    color: #fff !important;
    border-bottom-color: #404040 !important;
}

body.dark-mode #records-table tbody td {
    border-bottom-color: #404040 !important;
    color: #fff !important;
}

body.dark-mode #records-table tbody tr:hover {
    background-color: #363636 !important;
}

/* Responsive Styles */
@media (max-width: 992px) {
    #records-modal .modal-content {
        width: 98% !important;
        padding: 15px !important;
        margin: 10px auto !important;
    }

    #search-input {
        padding: 10px 40px 10px 10px !important;
        font-size: 14px !important;
    }
}



/* Fixed Header */
#records-table thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #f8f9fa !important;
}


.badge-light {
    color: #212529;
    background-color: #ea2424;
}



.btn-primary.btn-block {
    background-color: #fff !important; /* Initial white background */
    color: #1a4664 !important; /* Dark blue text */
    border-color: #1a4664 !important; /* Dark blue border */
    width: 100%; /* Full-width button */
    padding: 10px 15px; /* Padding for button spacing */
    font-size: 16px; /* Font size */
    text-align: center; /* Centers text */
    border-radius: 4px; /* Rounded corners */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

.btn-primary.btn-block:hover {
    background-color: #6c757d !important; /* Gray background on hover */
    color: #fff !important; /* White text on hover */
    border-color: #6c757d !important; /* Border color matches hover background */
}

label, 
.custom-control-label {
  position: relative !important;
  margin-bottom: 0 !important;  /* Removing the .5rem margin */
  vertical-align: top !important;
  display: inline-block !important;
  font-size: 16px !important;
  font-weight: bold !important;
  color: black !important;  /* Making text white */
}

.btn-group-sm>.btn, .btn-sm {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-border-radius: var(--bs-border-radius-sm);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #1a4664;
    --bs-btn-border-color: #1a4664;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1a4664;  /* Darker shade for hover */
    --bs-btn-hover-border-color: #1a4664;  /* Even darker for border */
    --bs-btn-focus-shadow-rgb: 149, 193, 218;  /* RGB values for #95c1da */
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1a4664;  /* Darker shade for active */
    --bs-btn-active-border-color: #1a4664;  /* Even darker for active border */
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #1a4664;
    --bs-btn-disabled-border-color: #1a4664;
}

.btn {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
    border: 1px solid transparent;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #1a4664;             /* Changed to match primary color */
    --bs-btn-border-color: #1a4664;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #7ba7c0;       /* Darker shade for hover */
    --bs-btn-hover-border-color: #1a4664;
    --bs-btn-focus-shadow-rgb: 149, 193, 218;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1a4664;      /* Darker shade for active */
    --bs-btn-active-border-color: #1a4664;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #1a4664;
    --bs-btn-disabled-border-color: #1a4664;
}

.btn-secondary {
    color: #fff;
    background-color: #0f3246;
    border-color: #0f3246;
}

#footer-buttons button {
    background-color: #1a4664!important;
    color: #ffffff !important;
}

@media screen and (min-width: 1201px) {
    #footer-buttons button {
        flex: 1;
        margin: 0;
        padding: 12px;
        font-size: 16px;
        background-color: #1a4664!important;
        color: #ffffff !important;
        font-weight: bold !important;

    }
}

.custom-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.dialog-content {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    min-width: 300px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #333;
    color: white;
    direction: rtl;
}

.dialog-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.dialog-body {
    margin: 15px 0;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.dialog-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.ok-button {
    background-color: #ffd700;
    color: black;
}

.ok-button:hover {
    background-color: #ffed4a;
}

.cancel-button {
    background-color: #2d3748;
    color: #ffd700;
}

.cancel-button:hover {
    background-color: #4a5568;
}

.btn-primary {
    color: #fff;
    background-color: #1a4664;
    border-color: #1a4664;
}

button {
    background-color: #1a4664;
    border: none;
    color: white;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}
button {
    background-color: #1a4664;
    border: none;
    color: white;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}
button, select {
    text-transform: none;
}
button, input {
    overflow: visible;
}
button, input, optgroup, select, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}
button {
    border-radius: 0;
    background-color: #1a4664; /* Ensure color applies to all button states */
}
*, ::after, ::before {
    box-sizing: border-box;
}
.btn-danger {
    color: #fff !important; /* White text */
    background-color: red !important; /* Red background */
    border-color: red !important; /* Red border */
    border-radius: 4px; /* Rounded corners */
    padding: 10px 15px; /* Padding for better spacing */
    font-size: 16px; /* Adjust font size */
    display: inline-flex; /* Aligns icon and text inline */
    align-items: center; /* Vertically centers content */
    justify-content: center; /* Centers content horizontally */
    transition: background-color 0.3s ease; /* Smooth color transition */
}

.btn-danger i {
    margin-right: 8px; /* Adds spacing between icon and text */
}

.btn-danger:hover {
    background-color: darkred !important; /* Darker red on hover */
}
.custom-file-label {
    display: inline-block;
    width: 100%; /* Makes it full-width */
    max-width: 500px; /* Adjust this value to your preferred maximum width */
    padding: 10px 15px; /* Adds padding for a more spacious look */
    font-size: 16px; /* Adjusts font size */
    text-align: center; /* Centers the label text */
    border: 1px solid #ccc; /* Optional: Adds a border */
    border-radius: 4px; /* Optional: Adds rounded corners */
    background-color: #f8f9fa; /* Optional: Sets a background color */
    cursor: pointer; /* Changes cursor to pointer */
}
/* Modal Base */
#records-modal {
    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: 1050 !important;
    display: none;
    overflow-y: auto !important;
}

/* Modal Content */
#records-modal .modal-content {
    background-color: rgba(255, 255, 255, 0.95) !important;
    margin: 22px auto !important;
    padding: 25px !important;
    border-radius: 15px !important;
    width: 100% !important;
    max-width: 1400px !important;
    position: relative !important;
    height: 90vh !important;
    overflow: hidden !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px) !important;
}

/* Search Container */
#search-container {
    margin-bottom: 20px !important;
    position: relative !important;
}

/* Search Input */
#search-input {
    width: 100% !important;
    padding: 12px 45px 12px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    background-color: rgba(248, 249, 250, 0.9) !important;
    direction: rtl !important;
}

#search-input:focus {
    border-color: #1a4664 !important;
    box-shadow: 0 0 0 0.2rem rgba(11, 68, 100, 0.25) !important;
    background-color: #fff !important;
}

/* Table Container */
.table-responsive {
    overflow-y: auto !important;
    height: calc(100% - 180px) !important;
    margin-bottom: 20px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

/* For desktop screens */
@media (min-width: 1200px) {
    .table-responsive {
        width: 98% !important;
        max-width: 1800px !important; /* Increased max-width */
    }
}

/* For tablets and smaller desktops */
@media (max-width: 1199px) {
    .table-responsive {
        width: 96% !important;
    }
}

/* For mobile screens */
@media (max-width: 768px) {
    .table-responsive {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: auto !important;
    }
    
    #records-table {
        min-width: 1000px !important; /* Increased minimum width */
    }
}

/* Custom scrollbar for better usability */
.table-responsive::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.8) !important;
    border-radius: 5px !important;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(136, 136, 136, 0.8) !important;
    border-radius: 5px !important;
    border: 2px solid rgba(241, 241, 241, 0.8) !important;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 102, 102, 0.8) !important;
}

/* Table Styles */
#records-table {
    width: 100% !important;
    border-collapse: collapse !important;
    direction: rtl !important;
    font-family: 'Cairo', sans-serif !important;
    background-color: transparent !important;
}

/* Table Header */
#records-table thead th {
    background-color: rgba(248, 249, 250, 0.9) !important;
    color: #333 !important;
    font-weight: 600 !important;
    padding: 15px 12px !important;
    text-align: center !important;
    border-bottom: 2px solid rgba(222, 226, 230, 0.7) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    backdrop-filter: blur(5px) !important;
}

/* Table Body */
#records-table tbody td {
    padding: 12px !important;
    text-align: center !important;
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(222, 226, 230, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.6) !important;
}

#records-table tbody tr:hover td {
    background-color: rgba(248, 249, 250, 0.85) !important;
}

/* Action Buttons */
#records-table .action-buttons {
    display: flex !important;
    gap: 5px !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
}

#records-table td button {
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    min-width: 80px !important;
    color: white !important;
}

#records-table td .refresh-button,
#records-table td button.refresh {
    background-color: #1a4664 !important;
}

#records-table td .view-button,
#records-table td button.view {
    background-color: #1a4664 !important;
}

#records-table td .edit-button,
#records-table td button.edit {
    background-color: #ffc107 !important;
    color: black !important;
}

#records-table td .delete-button,
#records-table td button.delete {
    background-color: #dc3545 !important;
}

/* Button Hover Effects */
#records-table td button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    opacity: 0.9 !important;
}

/* Pagination */
#pagination-container {
    margin-top: 20px !important;
    text-align: center !important;
    position: absolute !important;
    bottom: 20px !important;
    width: calc(100% - 50px) !important;
    display: flex !important;
    justify-content: center !important;
    gap: 5px !important;
}

#pagination-container button {
    padding: 8px 16px !important;
    margin: 0 4px !important;
    border: 1px solid #ddd !important;
    background-color: white !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    color: #1a4664 !important;
}

#pagination-container button:hover:not(:disabled) {
    background-color: #1a4664 !important;
    color: #fff !important;
    border-color: #1a4664 !important;
}

#pagination-container button.active {
    background-color: #1a4664 !important;
    color: #fff !important;
    border-color: #1a4664 !important;
}

/* Close button */
.close-records-button {
    position: absolute !important;
    top: 10px !important;
    left: 20px !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #666 !important;
    background: none !important;
    border: none !important;
}

/* Dark Mode */
body.dark-mode #records-modal .modal-content {
    background-color: rgba(45, 45, 45, 0.95) !important;
    color: #fff !important;
}

body.dark-mode #records-table thead th {
    background-color: rgba(54, 54, 54, 0.9) !important;
    color: #fff !important;
    border-bottom-color: rgba(64, 64, 64, 0.7) !important;
}

body.dark-mode #records-table tbody td {
    background-color: rgba(45, 45, 45, 0.6) !important;
    color: #fff !important;
    border-bottom-color: rgba(64, 64, 64, 0.5) !important;
}

body.dark-mode #records-table tbody tr:hover td {
    background-color: rgba(54, 54, 54, 0.85) !important;
}

body.dark-mode #search-input {
    background-color: rgba(54, 54, 54, 0.9) !important;
    border-color: #404040 !important;
    color: #fff !important;
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.8) !important;
    border-radius: 5px !important;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(136, 136, 136, 0.8) !important;
    border-radius: 5px !important;
    border: 2px solid rgba(241, 241, 241, 0.8) !important;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 102, 102, 0.8) !important;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .modal-content {
        width: 98% !important;
        margin: 10px auto !important;
        padding: 15px !important;
    }
    
    #records-table th,
    #records-table td {
        padding: 8px 6px !important;
        font-size: 14px !important;
    }
    
    #records-table td button {
        padding: 4px 8px !important;
        font-size: 12px !important;
        min-width: 60px !important;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
    }
    
    #records-table {
        min-width: 800px !important;
    }
}

/* Show Selected Button */
.عرض_المحدد {
    color: white !important;
    background-color: #28a745 !important;
    padding: 10px !important;
    border-radius: 4px !important;
    text-align: center !important;
    margin-bottom: 15px !important;
}

/* Table Container */
.table-responsive {
    overflow: auto !important; /* Enables both scrollbars */
    max-height: calc(90vh - 250px) !important; /* Height for vertical scroll */
    margin-bottom: 20px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    width: 100% !important;
    position: relative !important;
    display: block !important; /* Ensures proper scroll behavior */
}

/* Table itself */
#records-table {
    min-width: 1200px !important; /* Forces horizontal scroll */
    width: 100% !important;
}

/* Column widths to ensure proper spacing */
#records-table th:nth-child(1), /* المحافظات */
#records-table td:nth-child(1) {
    min-width: 150px !important;
}

#records-table th:nth-child(2), /* رقم */
#records-table td:nth-child(2) {
    min-width: 100px !important;
}

#records-table th:nth-child(3), /* تاريخ */
#records-table td:nth-child(3) {
    min-width: 150px !important;
}

#records-table th:nth-child(4), /* الجهة */
#records-table td:nth-child(4) {
    min-width: 120px !important;
}

#records-table th:nth-child(5), /* نوع */
#records-table td:nth-child(5) {
    min-width: 120px !important;
}

#records-table th:nth-child(6), /* تفاصيل */
#records-table td:nth-child(6) {
    min-width: 200px !important;
}

#records-table th:last-child, /* الإجراءات */
#records-table td:last-child {
    min-width: 300px !important;
}

/* Custom scrollbar styling */
.table-responsive::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important; /* Height for horizontal scrollbar */
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 5px !important;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 5px !important;
    border: 2px solid #f1f1f1 !important;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #666 !important;
}

/* Corner where scrollbars meet */
.table-responsive::-webkit-scrollbar-corner {
    background: #f1f1f1 !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .table-responsive {
        max-height: calc(90vh - 200px) !important;
    }
}

/* Dark mode scrollbar */
body.dark-mode .table-responsive::-webkit-scrollbar-track {
    background: #2d2d2d !important;
}

body.dark-mode .table-responsive::-webkit-scrollbar-thumb {
    background: #666 !important;
    border-color: #2d2d2d !important;
}

body.dark-mode .table-responsive::-webkit-scrollbar-corner {
    background: #2d2d2d !important;
}

#requests-modal .modal-content {
    position: relative !important;
    direction: rtl !important;
    text-align: right !important;
    background-color: #f8f9fa !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    height: 90vh !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    animation: slideIn 0.3s ease-out !important;
    width: 80% !important;
    max-width: 1200px !important;
    margin: 20px auto !important;
    padding: 25px !important;
 }
 
 /* Animation for modal entry */
 @keyframes slideIn {
    from {
        transform: translateY(-10%) !important;
        opacity: 0 !important;
    }
    to {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
 }
 
 /* Scrollbar styling */
 #requests-modal .modal-content::-webkit-scrollbar {
    width: 8px !important;
 }
 
 #requests-modal .modal-content::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
 }
 
 #requests-modal .modal-content::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 4px !important;
 }
 
 #requests-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: #666 !important;
 }

 #requests-modal .pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    direction: rtl !important;
}

#requests-modal .page-item {
    margin: 0 5px !important;
}

#requests-modal .page-link {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 35px !important;
    height: 35px !important;
    padding: 6px 12px !important;
    color: #495057 !important;
    background-color: #fff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

/* Active page */
#requests-modal .page-item.active .page-link {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2) !important;
}

/* Hover state */
#requests-modal .page-link:hover {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    z-index: 2 !important;
}

/* Previous/Next buttons */
#requests-modal .page-item:first-child .page-link,
#requests-modal .page-item:last-child .page-link {
    padding: 6px 15px !important;
    font-weight: bold !important;
}

/* Disabled state */
#requests-modal .page-item.disabled .page-link {
    color: #6c757d !important;
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Current page info */
#requests-modal .pagination-info {
    text-align: center !important;
    margin-top: 10px !important;
    color: #6c757d !important;
    font-size: 0.875rem !important;
}

/* For small screens */
@media screen and (max-width: 576px) {
    #requests-modal .page-link {
        min-width: 30px !important;
        height: 30px !important;
        padding: 4px 8px !important;
        font-size: 0.875rem !important;
    }

    #requests-modal .pagination {
        flex-wrap: wrap !important;
    }
}

/* Dark mode */
body.dark-mode #requests-modal .page-link {
    background-color: #2d3436 !important;
    border-color: #4a5568 !important;
    color: #f7fafc !important;
}

body.dark-mode #requests-modal .page-link:hover {
    background-color: #4a5568 !important;
}

body.dark-mode #requests-modal .page-item.active .page-link {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

body.dark-mode #requests-modal .pagination-info {
    color: #cbd5e0 !important;
}



 .close.ml-0.mr-auto {
    position: relative !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 auto 0 0 !important; /* RTL margin */
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    opacity: 0.7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
 }
 
 /* X symbol - Changed to red */
 .close.ml-0.mr-auto::before,
 .close.ml-0.mr-auto::after {
    content: '' !important;
    position: absolute !important;
    width: 16px !important;
    height: 2px !important;
    background-color: #dc3545 !important; /* Changed to red */
    border-radius: 1px !important;
    transition: all 0.3s ease !important;
 }
 
 .close.ml-0.mr-auto::before {
    transform: rotate(45deg) !important;
 }
 
 .close.ml-0.mr-auto::after {
    transform: rotate(-45deg) !important;
 }
 
 /* Hover state - Red background */
 .close.ml-0.mr-auto:hover {
    opacity: 1 !important;
    background-color: rgba(220, 53, 69, 0.1) !important; /* Light red background */
    transform: rotate(90deg) !important;
 }
 
 /* Active/Click state - Darker red */
 .close.ml-0.mr-auto:active {
    transform: rotate(90deg) scale(0.95) !important;
    background-color: rgba(220, 53, 69, 0.15) !important;
 }
 
 /* Focus state - Red outline */
 .close.ml-0.mr-auto:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important; /* Red shadow */
 }
 
 /* Hover color change - Darker red */
 .close.ml-0.mr-auto:hover::before,
 .close.ml-0.mr-auto:hover::after {
    background-color: #c82333 !important; /* Darker red on hover */
 }
 
 /* For dark mode if needed */
 [data-theme='dark'] .close.ml-0.mr-auto::before,
 [data-theme='dark'] .close.ml-0.mr-auto::after {
    background-color: #ff4d5e !important; /* Brighter red for dark mode */
 }
 
 [data-theme='dark'] .close.ml-0.mr-auto:hover {
    background-color: rgba(255, 77, 94, 0.1) !important;
 }

 .btn.btn-outline-success {
    color: #ffffff !important; /* Changed to white text */
    background-color: #198754 !important; /* Solid green background */
    border: 2px solid #198754 !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
 }
 
 .btn.btn-outline-success:hover {
    color: #ffffff !important;
    background-color: #157347 !important; /* Darker green on hover */
    border-color: #157347 !important;
    box-shadow: 0 4px 8px rgba(25, 135, 84, 0.3) !important;
    transform: translateY(-1px) !important;
 }
 
 .btn.btn-outline-success:active {
    color: #ffffff !important;
    background-color: #146c43 !important; /* Even darker green when active */
    border-color: #146c43 !important;
    box-shadow: 0 2px 4px rgba(25, 135, 84, 0.2) !important;
    transform: translateY(0) !important;
 }
 
 .btn.btn-outline-success:focus {
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.3) !important;
    outline: none !important;
 }
 
 /* Active state */
 .btn.btn-outline-success.active {
    color: #ffffff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
 }
 
 /* Disabled state */
 .btn.btn-outline-success:disabled {
    background-color: #75b798 !important; /* Lighter green when disabled */
    border-color: #75b798 !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
 }
 
 /* Ripple effect */
 .btn.btn-outline-success::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) !important;
    transition: width 0.3s ease-out, height 0.3s ease-out !important;
 }
 
 .btn.btn-outline-success:active::after {
    width: 200px !important;
    height: 200px !important;
    opacity: 0 !important;
 }
 
 /* Loading state */
 .btn.btn-outline-success.loading {
    color: transparent !important;
    pointer-events: none !important;
 }
 
 .btn.btn-outline-success.loading::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid #ffffff !important;
    border-top-color: transparent !important;
    border-radius: 50% !important;
    animation: button-loading-spinner 0.75s linear infinite !important;
 }
 
 @keyframes button-loading-spinner {
    from {
        transform: translate(-50%, -50%) rotate(0deg) !important;
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg) !important;
    }
 }

 .btn.btn-outline-danger {
    color: #dc3545 !important;
    background-color: transparent !important;
    border: 2px solid #dc3545 !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* When clicked/active */
.btn.btn-outline-danger.active {
    color: #ffffff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3) !important;
}

/* Hover state */
.btn.btn-outline-danger:hover {
    color: #c82333 !important;
    border-color: #c82333 !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Focus state */
.btn.btn-outline-danger:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3) !important;
    outline: none !important;
}

/* Disabled state */
.btn.btn-outline-danger:disabled {
    color: #e4606d !important;
    border-color: #e4606d !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    background-color: transparent !important;
}

/* Normal state - outline */
.btn.btn-outline-warning {
    color: #ffc107 !important;
    background-color: transparent !important;
    border: 2px solid #ffc107 !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Active/clicked state - yellow background */
.btn.btn-outline-warning.active {
    color: #000 !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

/* Hover state - still outline */
.btn.btn-outline-warning:hover {
    color: #ffca2c !important;
    border-color: #ffca2c !important;
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* Focus state */
.btn.btn-outline-warning:focus {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3) !important;
    outline: none !important;
}

/* Disabled state */
.btn.btn-outline-warning:disabled {
    color: #ffe69c !important;
    border-color: #ffe69c !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    background-color: transparent !important;
}

/* Coordinate display styling */
.coordinate-display {
    position: fixed !important;
    bottom: 80px !important;  /* Above the footer */
    right: 10px !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 12px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
    direction: ltr !important;
}

/* Horizontal altitude legend below coordinates */
.altitude-legend-box {
    position: fixed !important;
    bottom: 40px !important;  /* Just above footer */
    right: 10px !important;
    background: #ffffff !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
    direction: rtl !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
}

.legend-items {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    align-items: center !important;
}

.legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.color-box {
    width: 10px !important;
    height: 10px !important;
    border-radius: 2px !important;
    flex-shrink: 0 !important;
}

.color-box.red { background-color: #FF0000 !important; }
.color-box.orange { background-color: #ff8c00 !important; }
.color-box.yellow { background-color: #FFFF00 !important; }
.color-box.green { background-color: #c7c800 !important; }
.color-box.blue {
    background-color: #0000FF;
}
.legend-text {
    font-size: 11px !important;
    color: #444 !important;
    font-weight: bold !important;
}

/* Dark mode support */
body.dark-mode .coordinate-display,
body.dark-mode .altitude-legend-box {
    background: #2d2d2d !important;
    color: #ffffff !important;
}

body.dark-mode .legend-text {
    color: #ffffff !important;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .coordinate-display {
        bottom: 90px !important;
        font-size: 11px !important;
        padding: 6px 10px !important;
    }

    .altitude-legend-box {
        bottom: 50px !important;
        padding: 6px 10px !important;
        right: 5px !important;
    }

    .legend-items {
        gap: 10px !important;
    }

    .legend-text {
        font-size: 10px !important;
    }
}

/* For very small screens */
@media screen and (max-width: 480px) {
    .altitude-legend-box {
        transform: scale(0.9) !important;
        transform-origin: bottom right !important;
    }

    .legend-items {
        gap: 8px !important;
    }
}
/* Handle notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .altitude-legend-box {
        bottom: calc(120px + env(safe-area-inset-bottom));
    }
}
#request-type {
    border-radius: 4px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#request-type:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

#request-type-other {
    display: none;
    margin-top: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

#request-type-other:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Dark mode support */
body.dark-mode #request-type,
body.dark-mode #request-type-other {
    background-color: #2d2d2d;
    border-color: #444;
    color: #fff;
}

body.dark-mode #request-type option {
    background-color: #2d2d2d;
    color: #fff;
}
#request-type-other.is-invalid {
    border-color: #dc3545;
}

#request-type-other.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220,53,69,.25);
}

/* Request Type Dropdown Styles */
#request-type {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#request-type:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#request-type-other {
    margin-top: 0.5rem;
    display: none;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

#request-type-other:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Dark Mode Support */
body.dark-mode #request-type,
body.dark-mode #request-type-other {
    background-color: #343a40;
    border-color: #495057;
    color: #fff;
}

body.dark-mode #request-type:focus,
body.dark-mode #request-type-other:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #request-type,
    #request-type-other {
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}
.float-action-button {
    position: fixed;
    bottom: 20px; /* Distance from the bottom of the viewport */
    right: 20px; /* Distance from the right of the viewport */
    background-color: #007bff; /* Primary color */
    color: white;
    border-radius: 20%; /* Circular shape */
    width: 40px; /* Smaller width */
    height: 40px; /* Smaller height */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px; /* Smaller icon/text size */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    cursor: pointer;
    border: none;
    outline: none;
    z-index: 1000; /* Keeps button above most elements */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.float-action-button:hover {
    background-color: #0056b3; /* Darker shade on hover */
    transform: scale(1.1); /* Slightly increases size on hover */
}
/* Position the overlay toggles in the footer */
#footer-buttons .custom-control.custom-switch {
    display: inline-block !important;
    margin-left: 15px !important;  /* Space between toggles */
    margin-right: 0 !important;
    order: 2 !important;  /* Controls the order in flex container */
    margin-top: -10px !important; /* Move up by adjusting negative margin */
    position: relative !important;
    top: -10px !important;  /* Move up using top positioning */
}

#footer-buttons #dark-mode-toggle {
    order: 3 !important;  /* Place dark mode toggle after overlay toggles */
    margin-top: -10px !important;
    position: relative !important;
    top: -10px !important;
}

/* For the second overlay toggle */
#footer-buttons #overlay-toggle2-container {
    order: 1 !important;  /* Place second overlay toggle before first one */
    margin-top: -10px !important;
    position: relative !important;
    top: -10px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #footer-buttons .custom-control.custom-switch {
        margin-left: 10px !important;
        margin-top: -8px !important;  /* Slightly less margin on mobile */
        top: -8px !important;
    }
}
#footer-buttons #dark-mode-toggle {
    order: 3 !important;
    margin-top: -10px !important;
    position: relative !important;
    top: -10px !important;
}

#footer-buttons button {
    background-color: #1a4664 !important;
    color: #ffffff !important;
    margin: 0;
    /* Add these properties to align with footer */
    align-self: flex-end !important;
    margin-bottom: 0 !important;
    vertical-align: bottom !important;
    height: 100% !important;
}

@media screen and (max-width: 768px) {
    #footer-buttons button {
        flex: 1;
        min-height: 40px;
        white-space: nowrap;
        /* Add these to ensure proper mobile alignment */
        margin-bottom: 0 !important;
        transform: translateY(0) !important;
        position: relative !important;
        top: 0 !important;
        font-weight: bold !important;

    }

    /* Specific adjustment for dark mode toggle */
    #footer-buttons #dark-mode-toggle {
        transform: none !important;
        top: 0 !important;
        margin-top: 0 !important;
        height: 40px !important;  /* Match other buttons */
        line-height: 40px !important;
    }
}
/* Dark mode toggle in navbar */
#dark-mode-toggle.nav-link {
    background: transparent !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    color: rgba(255, 255, 255, 0.75) !important;
    margin: 0 !important;
    height: auto !important;
    transition: color 0.15s ease-in-out !important;
}

#dark-mode-toggle.nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* For better alignment */
.navbar-nav.ml-auto {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Adjust for dark mode */
body.dark-mode #dark-mode-toggle.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
}

body.dark-mode #dark-mode-toggle.nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

@media screen and (max-width: 768px) {
    #dark-mode-toggle.nav-link {
        padding: 0.5rem !important;
    }
}
/* Overlay toggle switches styling */
#overlay-toggle + .custom-control-label,
#overlay-toggle2 + .custom-control-label {
    color: white !important;
}

/* Icon color */
#overlay-toggle + .custom-control-label i,
#overlay-toggle2 + .custom-control-label i {
    color: white !important;
}

/* Switch background */
#overlay-toggle:checked + .custom-control-label::before,
#overlay-toggle2:checked + .custom-control-label::before {
    background-color: #1a4664!important;
    border-color: #1a4664!important;
}

/* Switch background when unchecked */
#overlay-toggle + .custom-control-label::before,
#overlay-toggle2 + .custom-control-label::before {
    background-color: #495057 !important;
    border-color: #495057 !important;
}

/* Switch handle/circle */
#overlay-toggle + .custom-control-label::after,
#overlay-toggle2 + .custom-control-label::after {
    background-color: white !important;
}

/* Hover effect */
.custom-switch:hover #overlay-toggle + .custom-control-label::before,
.custom-switch:hover #overlay-toggle2 + .custom-control-label::before {
    border-color: #1a4664!important;
}
.systems-checkbox {
    margin-bottom: 25px !important;
    font-size: 1.1rem;
}



.form-check {
    position: relative !important;
    display: block !important;
    padding-left: 0.25rem !important;
    margin-bottom: 8px !important;
    text-align: right !important;
}

.form-check {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
}

.form-check-input {
    position: relative !important;
    margin: 0 10px !important;  /* Add space between checkbox and label */
    transform: scale(1.5) !important;
    cursor: pointer !important;
    order: 2 !important;  /* Push checkbox to the left */
}

.form-check-label {
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    order: 1 !important;  /* Keep label on the right */
}
.systems-send-section .btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 0.2rem !important;
    background-color: #28a745 !important; /* Bootstrap green */
    border-color: #28a745 !important;
    color: white !important;
}
.form-check-input {
    width: 20px !important;
    height: 20px !important;
}

/* Hover state */
.systems-send-section .btn-sm:hover {
    background-color: #218838 !important; /* Darker green on hover */
    border-color: #1e7e34 !important;
}

/* Active/Pressed state */
.systems-send-section .btn-sm:active {
    background-color: #1e7e34 !important;
    border-color: #1c7430 !important;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.popup-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.search-container {
    margin-bottom: 20px !important;
}

#requests-search-input {
    width: 100% !important;
    padding: 12px 45px 12px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    background-color: #f8f9fa !important;
    direction: rtl !important;
}

#requests-search-input:focus {
    border-color: #1a4664 !important;
    box-shadow: 0 0 0 0.2rem rgba(11, 68, 100, 0.25) !important;
    background-color: #fff !important;
}

/* Dark mode support */
body.dark-mode #requests-search-input {
    background-color: #363636 !important;
    border-color: #404040 !important;
    color: #fff !important;
}

.review-date {
    display: inline-block;
    padding: 0 4px;
    font-family: 'Arial', sans-serif;
}

.action-info {
    border-right: 3px solid #6c757d;
    background-color: #f8f9fa !important;
}

.action-info.approved {
    border-right-color: #28a745;
}

.action-info.rejected {
    border-right-color: #dc3545;
}

.custom-file-label {
    text-align: right;
    direction: rtl;
}

.custom-file-label::after {
    content: "تصفح";
    right: auto;
    left: 0;
    border-left: none;
    border-right: inherit;
}

#submit-request-btn:disabled {
    cursor: not-allowed;
}

.button-content {
    display: inline-flex;
    align-items: center;
}

.spinner-border {
    margin-left: 8px;
}

#loading-modal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

#loading-modal .spinner-border {
    width: 3rem;
    height: 3rem;
}
.text-muted {
    color: #6c757d !important;
    margin-top: 6px;  /* Add space above */
    display: block;   /* Make it a block element */
    padding-top: 4px; /* Additional top padding */
}

.small, small {
    font-size: .875em;
    font-weight: 400;
    display: block;   /* Make it a block element */
    margin-top: 8px;  /* Space above */
    margin-bottom: 4px; /* Space below */
}

/* For the file input helper text specifically */
.custom-file + .text-muted {
    margin-top: 8px;
    padding-right: 4px; /* RTL padding */
}
.swal2-popup.swal2-toast {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.swal2-popup.swal2-toast .swal2-title {
    margin: 0.5rem 0;
    font-size: 1rem;
}

#requests-list {
    transition: opacity 0.3s ease;
}

.swal2-popup {
    font-family: 'Cairo', sans-serif !important;
    border-radius: 15px !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.1) !important;
}

.swal2-title {
    font-size: 1.5em !important;
    font-weight: bold !important;
    color: #333 !important;
}

.swal2-html-container {
    font-size: 1.1em !important;
    line-height: 1.5 !important;
}

.animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fadeInDown {
    animation-name: fadeInDown;
}

.arabic-text {
    direction: rtl !important;
    text-align: center !important;
}
.btn.btn-primary.btn-lg {
    display: block;
    margin: 0 auto 10px; /* Center and add spacing above the legend */
    font-size: 18px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px; /* Optional: Rounded corners */
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: -75px; /*  the button slightly to the left */
    font-weight: bold !important;
  }
  
  .btn.btn-primary.btn-lg:hover {
    background-color: #0056b3;
  }

  .float-action-button {
    margin-bottom: 300px; /* Default for larger screens */
    position: fixed;
    right: 30px; /* Default right position */
    bottom: 20px; /* Default bottom position */
    z-index: 1000;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) { /* For tablets and smaller devices */
    .float-action-button {
        right: 15px; /* Adjust horizontal position */
        bottom: 50px; /* Move higher vertically */
        margin-bottom: 0; /* Ensure no extra margin */
    }
}

@media (max-width: 480px) { /* For mobile devices */
    .float-action-button {
        right: 10px; /* Further adjust for very small screens */
        bottom: 70px; /* Move higher vertically on small screens */
        width: 60px; /* Optionally make the button smaller */
        height: 60px;
    }
    .float-action-button button {
        font-size: 12px; /* Adjust text size for smaller buttons */
        padding: 10px; /* Adjust padding for smaller buttons */
    }
}
.swal2-popup {
    font-family: 'Cairo', sans-serif !important;
}

.swal2-title, .swal2-content {
    font-family: 'Cairo', sans-serif !important;
}
/* Preview Container Base */
#request-preview-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto; /* Allow scrolling for the entire modal */
}

/* Preview Content Box */
#request-preview-container .preview-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    margin: 30px auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Ensure internal content stays within the box */
}

/* Header Section */
.preview-header {
    padding: 24px 30px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.preview-close {
    background: #f7fafc;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-close:hover {
    background: #edf2f7;
}

/* Content Section */
.preview-body {
    padding: 30px;
    max-height: calc(100vh - 150px); /* Allow more space for content on small screens */
    overflow-y: auto; /* Ensure scrolling inside the content section */
}

/* Data Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.preview-item {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.preview-item:hover {
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.preview-item label {
    display: block;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 6px;
}

.preview-item p {
    color: #1a202c;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

/* Full Width Items */
.preview-item.full-width {
    grid-column: 1 / -1;
}

/* Action Buttons */
.preview-actions {
    padding: 16px 20px; /* Adjust padding for smaller screens */
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    position: sticky; /* Keep buttons at the bottom when scrolling */
    bottom: 0;
    background: white; /* Ensure background consistency for sticky behavior */
    z-index: 1;
}

.preview-actions button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-confirm {
    background: #2563eb;
    color: white;
    border: none;
}

.btn-confirm:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-edit {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-edit:hover {
    background: #f8fafc;
    color: #1e293b;
}

/* Dark Mode */
body.dark-mode .preview-content {
    background: #1a202c;
}

body.dark-mode .preview-header {
    border-color: #2d3748;
}

body.dark-mode .preview-header h2 {
    color: #f7fafc;
}

body.dark-mode .preview-item {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .preview-item:hover {
    background: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

body.dark-mode .preview-item label {
    color: #a0aec0;
}

body.dark-mode .preview-item p {
    color: #f7fafc;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-content {
    animation: slideIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .preview-actions {
        justify-content: center; /* Center the buttons */
        gap: 8px; /* Reduce gap for smaller screens */
    }
    .preview-actions button {
        padding: 10px 16px; /* Reduce padding for buttons */
        font-size: 14px; /* Adjust font size */
    }
}

@media (max-width: 480px) {
    .preview-actions {
        flex-direction: column; /* Stack buttons vertically */
        align-items: center; /* Center-align stacked buttons */
    }
    .preview-actions button {
        width: 100%; /* Make buttons full-width */
        max-width: 300px; /* Optional: Set a max width */
    }
}
/* Modal Styles */
.preview-modal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: #fff;
}

.preview-modal .modal-header {
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
    border-bottom: 2px solid #eee;
    padding: 1rem 1.5rem;
    align-items: center;
    direction: rtl;
}

.preview-modal .modal-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.25rem;
    margin: 0;
}

.preview-modal .btn-close {
    margin: 0;
    padding: 1rem;
}

.preview-modal .modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 210px);
    overflow-y: auto;
    direction: rtl;
}

/* Table Styles */
.preview-modal .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.preview-modal .table th,
.preview-modal .table td {
    border: 1px solid #dee2e6;
    padding: 1rem;
    vertical-align: middle;
}

.preview-modal .table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    width: 30%;
    text-align: right;
}

.preview-modal .table td {
    background-color: #fff;
}

/* Coordinates Cell */
.preview-modal .coordinates-cell {
    font-family: monospace;
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9em;
    direction: ltr;
}

/* Footer Styles */
.preview-modal .modal-footer {
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
    padding: 1rem 1.5rem;
    border-top: 2px solid #eee;
    direction: rtl;
}

/* Button Styles */
.preview-modal .btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 100px;
}

.preview-modal .btn i {
    margin-left: 0.5rem;
}

.preview-modal .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.preview-modal .btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.preview-modal .btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.preview-modal .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.preview-modal .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Status Badge Styles */
.preview-modal .status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Timestamps */
.preview-modal .timestamp {
    color: #6c757d;
    font-size: 0.875rem;
    direction: ltr;
}

/* Attachment Section */
.preview-modal .attachments {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.preview-modal .attachments .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Loading Overlay */
.preview-modal .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 15px;
}

/* Animation for loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.preview-modal .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Hover Effects */
.preview-modal .table tr:hover td {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.preview-modal .btn:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .preview-modal .modal-dialog {
        margin: 0.5rem;
    }
    
    .preview-modal .modal-header {
        padding: 1rem;
    }
    
    .preview-modal .modal-body {
        padding: 1rem;
    }
    
    .preview-modal .modal-footer {
        padding: 1rem;
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .preview-modal .modal-footer .d-flex {
        flex-direction: column;
        width: 100%;
    }
    
    .preview-modal .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .preview-modal .table th,
    .preview-modal .table td {
        padding: 0.75rem;
    }
    
    .preview-modal .modal-title {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .preview-modal .modal-content {
        box-shadow: none;
    }
    
    .preview-modal .modal-footer {
        display: none;
    }
    
    .preview-modal .table th,
    .preview-modal .table td {
        border: 1px solid #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .preview-modal .modal-content {
        background: #ffffff;
        color: #fff;
    }
    
    .preview-modal .modal-header,
    .preview-modal .modal-footer {
        background: #243342;
        border-color: #34495e;
    }
    
    .preview-modal .table th {
        background-color: #243342;
        color: #fff;
    }
    
    .preview-modal .table td {
        background-color: #ffffff;
        border-color: #34495e;
    }
    
    .preview-modal .coordinates-cell {
        background-color: #243342;
    }
    
    .preview-modal .btn-close {
        filter: invert(1);
    }
}
.preview-modal .admin-controls {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.preview-modal .form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: block;
}

.preview-modal .form-check {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 4px;
    margin: 0.25rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.preview-modal .form-check:hover {
    background: #f8f9fa;
}

.preview-modal .form-check-input {
    margin-left: 0.5rem;
}

.preview-modal .form-check-label {
    cursor: pointer;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .preview-modal .admin-controls {
        border-color: #34495e;
        background: #243342;
    }

    .preview-modal .form-check {
        background: #2c3e50;
        border-color: #34495e;
    }

    .preview-modal .form-check:hover {
        background: #34495e;
    }

    .preview-modal .form-group label {
        color: #fff;
    }
}
/* Navbar base styling */
.navbar {
    padding: 0.5rem;
    background-color: #1a4664 !important; /* Dark blue-gray color from image */
}

/* Container modifications */
.navbar .container {
    max-width: 100%;
    padding: 0 1rem;
}

/* Brand/Logo */
.navbar-brand {
    padding: 0;
    margin-right: 1rem;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

/* Navigation items */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-item .nav-link {
    color: #ffffff !important;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: bold !important;
}

/* Active state */
.navbar-nav .nav-item.active .nav-link {
    background-color: #ffc1078c;
    color: #ffffff !important;
}

/* User info styling */
.navbar-nav .nav-item span.nav-link {
    color: #ffd700 !important; /* Golden yellow for user info */
    font-size: 0.9rem;
}

/* Special buttons/counters */
.nav-link.counter {
    background-color: transparent;
    position: relative;
}

.counter-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ffd700;
    color: #1e2832;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Mode toggle button */
.light-mode-toggle {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
}

/* Responsive design */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand img {
        height: 35px;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-nav .nav-item .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

/* RTL Support */
[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

/* Utility classes */
.text-yellow {
    color: #ffd700 !important;
}

.bg-dark-blue {
    background-color: #1e2832 !important;
}
/* Add this CSS */
.navbar-nav.ml-auto {
    margin-right: auto !important;  /* Reset right margin */
    margin-left: 0 !important;     /* Reset left margin */
}

/* Specific styling for the logout item */
.navbar-nav .nav-link i.fa-sign-out-alt {
    margin-left: 5px;  /* Add some space between icon and text */
}

/* Alternative approach - add this class to the logout nav-item */
.logout-item {
    margin-right: auto !important;
    margin-left: 0 !important;
}


@media (max-width: 600px) {
    .windy-toggle-button {
        bottom: 150px !important;  /* Move it higher on smaller screens */
        right: 5px !important;     /* Move it a little closer to the right edge */
        padding: 8px 16px !important;  /* Smaller padding for a better fit */
    }
}





.windy-panel.leaflet-control {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    height: 90vh !important;
    max-width: 1500px !important;
    background: white !important;
    z-index: 1000 !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.2) !important;
    border-radius: 8px !important;
}

/* Notification Styles */
.notification-dropdown {
    width: 350px;
    max-height: 500px;
    overflow-y: auto;
    left: auto !important;
    right: 0 !important;
    direction: rtl;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #f0f7ff;
}

.notification-badge {
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
}

.notification-badge.has-new {
    animation: notification-pulse 1s infinite;
}

@keyframes notification-pulse {
    0% { transform: scale(1) translate(-50%, -50%); }
    50% { transform: scale(1.2) translate(-50%, -50%); }
    100% { transform: scale(1) translate(-50%, -50%); }
}

/* Dark mode support */
body.dark-mode .notification-dropdown {
    background-color: #2c3e50;
    border-color: #34495e;
}

body.dark-mode .notification-item {
    border-color: #34495e;
}

body.dark-mode .notification-item:hover {
    background-color: #34495e;
}

body.dark-mode .notification-item.unread {
    background-color: #2c3e50;
}
/* Add these styles to your existing CSS */
.notification-dropdown {
    width: 300px !important;
    min-width: 300px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    right: auto !important;
    left: 0 !important;
    direction: rtl !important;
}

.notification-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.notification-header h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #f0f7ff;
}

.mark-all-read {
    color: #007bff;
    font-size: 0.875rem;
    text-decoration: none;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.empty-message {
    color: #6c757d;
    font-size: 0.9rem;
    padding: 20px;
}

.notification-badge {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.5rem !important;
    position: absolute !important;
    top: 0 !important;
    right: -5px !important;
    transform: translate(50%, -50%) !important;
}

/* Dark mode support */
body.dark-mode .notification-dropdown {
    background-color: #2c3e50 !important;
    border-color: #34495e !important;
}

body.dark-mode .notification-header {
    background-color: #34495e !important;
    border-color: #445566 !important;
}

body.dark-mode .notification-item {
    border-color: #445566 !important;
}

body.dark-mode .empty-message {
    color: #a0aec0 !important;
}

/* RTL specific adjustments */
.dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}

.notification-item.unread {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
}

.notification-item.unread .notification-title {
    font-weight: bold;
}

.notification-badge {
    display: none; /* Hidden by default */
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Notifications Dropdown Styles */
.notification-dropdown {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-header {
    background-color: #f8f9fa;
}

.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.notification-item.unread {
    background-color: #e9f7fe;
    font-weight: bold;
}

.notification-item:hover {
    background-color: #f1f1f1;
}

.notification-icon {
    margin-right: 10px;
    color: #007bff;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.notification-message {
    color: #555;
    font-size: 0.9em;
}

.notification-time {
    font-size: 0.8em;
    color: #999;
}

.mark-all-read {
    cursor: pointer;
    color: #007bff;
}

.mark-all-read:hover {
    text-decoration: underline;
}

/* Badge Styles */
.notification-badge {
    display: none;
    padding: 5px 7px;
    font-size: 0.75rem;
}

/* Notification Popup Styles */
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: fadeIn 0.5s;
}

.notification-popup-content {
    padding: 15px;
}

.notification-popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.notification-popup-title {
    font-weight: bold;
    flex-grow: 1;
}

.notification-popup-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.notification-popup-message {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.notification-popup-time {
    font-size: 0.8em;
    color: #999;
}

.notification-popup-content.success {
    border-left: 4px solid #28a745;
}

.notification-popup-content.danger {
    border-left: 4px solid #dc3545;
}

.notification-popup-content.info {
    border-left: 4px solid #17a2b8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.notification-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.notification-item.unread {
    background-color: #f8f9fa;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.notification-title {
    font-weight: bold;
}

.notification-time {
    font-size: 0.85em;
    color: #6c757d;
}

.notification-body {
    margin-bottom: 10px;
}

.notification-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.empty-message {
    padding: 20px;
    color: #6c757d;
}

.empty-message i {
    font-size: 2em;
    margin-bottom: 10px;
}

.notification-actions .btn-group {
    display: flex;
    gap: 5px;
}

.delete-notification {
    transition: all 0.2s ease;
}

.delete-notification:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.notification-item {
    opacity: 1;
    transition: all 0.3s ease;
}

.notification-item.deleting {
    opacity: 0;
    transform: translateX(-100%);
}

.notification-item {
    border-bottom: 1px solid #eee !important;
    transition: background-color 0.2s !important;
    cursor: pointer !important;
}

.notification-item:hover {
    background-color: #f8f9fa !important;
}

.notification-item:last-child {
    border-bottom: none !important;
}

.notification-content {
    padding: 0.75rem 1rem !important;
}

.notification-title {
    font-size: 0.9rem !important;
    color: #333 !important;
    margin-bottom: 0 !important;
}

.notification-body {
    font-size: 0.85rem !important;
    color: #666 !important;
    margin-top: 0.25rem !important;
}

.notification-item.unread {
    background-color: #f8f9fa !important;
}

.notification-item.unread .notification-title {
    font-weight: 600 !important;
}

.text-muted {
    color: #6c757d !important;
    font-size: 0.8rem !important;
}

.notification-icon {
    margin-right: 0.5rem !important;
}

/* Fix dropdown padding */
.dropdown-menu.notification-dropdown {
    padding: 0 !important;
    min-width: 300px !important;
}

.notification-container {
    max-height: calc(100vh - 200px) !important;
    overflow-y: auto !important;
}
.fa-bell-slash {
    opacity: 0.5;
}

.alert {
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Notification Mute Button Styles */
.notification-mute-toggle,
.notification-mute-toggle-dropdown {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

/* Default bell color */
.notification-mute-toggle i,
.notification-mute-toggle-dropdown i {
    color: #dc3545; /* Red color for the bell */
}

/* Only show red while muted */
.notification-mute-toggle:not(.muted) i,
.notification-mute-toggle-dropdown:not(.muted) i {
    color: #0fff46; /* Normal color when not muted */
}

.notification-mute-toggle:hover,
.notification-mute-toggle-dropdown:hover {
    opacity: 0.7;
}

/* Muted state styles - only change icon, keep red color */
.notification-mute-toggle.muted .fa-bell:before,
.notification-mute-toggle-dropdown.muted .fa-bell:before {
    content: "\f1f6"; /* Bell slash icon */
}

/* Style for bell icon in notification popup */
.notification-popup .notification-mute {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
}

.notification-popup .notification-mute i {
    color: #dc3545; /* Red color for the bell */
}

.notification-popup .notification-mute:not(.muted) i {
    color: #ff051d; /* Normal color when not muted */
}

.notification-popup .notification-mute.muted .fa-bell:before {
    content: "\f1f6";
}
/* Modal close button styles */
.btn-close-custom {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.btn-close-custom i {
    font-size: 14px !important; /* Smaller X size */
    color: #666 !important;
    line-height: 1 !important;
}

.btn-close-custom:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Ensure modal header has proper positioning */
.modal-header {
    position: relative !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* Make sure the title doesn't overlap with the close button */
.modal-title {
    margin-right: 20px !important;
    font-size: 25px !important;
}


.modal-header {
    position: relative !important;
    padding: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* For RTL support */
.modal-header .btn-close {
    margin: 0 !important;
    left: 15px !important;  /* For RTL layout */
    right: auto !important; /* For RTL layout */
}

.btn-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff3333;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

/* The X symbol */
.btn-close span {
    font-size: 24px;
    color: #ff3333;
    line-height: 1;
    transition: all 0.3s ease;
}

/* Hover effects */
.btn-close:hover {
    background-color: rgba(255, 0, 0, 0.2);
    transform: rotate(90deg);
    border-color: rgba(255, 0, 0, 0.3);
}

.btn-close:hover span {
    color: #ff0000;
}

/* Focus state for accessibility */
.btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.25);
}

/* Active state when clicking */
.btn-close:active {
    background-color: rgba(255, 0, 0, 0.3);
    transform: scale(0.95) rotate(90deg);
}
/* Modal Close Button Styles */
.btn-secondary1 {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out,
                background-color 0.15s ease-in-out,
                border-color 0.15s ease-in-out,
                box-shadow 0.15s ease-in-out;
}

.btn-secondary1:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
    cursor: pointer;
}

.btn-secondary1:focus {
    box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
    outline: none;
}

.btn-secondary1:active {
    background-color: #545b62;
    border-color: #4e555b;
    transform: translateY(1px);
}

/* Modal Close Button Positioning */
.modal-footer .btn-secondary1 {
    margin-right: 10px;
    order: 1; /* Ensures it appears before other buttons */
}

/* Dark Mode Support */
body.dark-mode .btn-secondary1 {
    background-color: #495057;
    border-color: #495057;
    color: #fff;
}

body.dark-mode .btn-secondary1:hover {
    background-color: #424649;
    border-color: #373b3e;
}
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@700&display=swap');

/* More specific selector to override main CSS */
form .label2, 
.form-group .label2 {
    color: white !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block !important;
    text-align: right !important;
    direction: rtl !important;
    position: relative !important;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}
.modal-content {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.card {
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-1px);
}
/* Float Action Button Container */
.float-action-button {
    position: fixed !important;
    bottom: 180px !important;  /* Increased to move button down */
    right: 20px !important;
    z-index: 1000 !important;
    transition: all 0.3s ease !important;
}

/* Button Styling */
.float-action-button .btn {
    padding: 12px 24px !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
}

.float-action-button .btn i {
    font-size: 18px !important;
}

/* Hover Effects */
.float-action-button .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Active/Click Effect */
.float-action-button .btn:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Dark Mode Support */
body.dark-mode .float-action-button .btn {
    background-color: #2d3436 !important;
    border-color: #4a5568 !important;
    color: #fff !important;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .float-action-button {
        bottom: 140px !important;  /* Adjusted for mobile */
        right: 16px !important;
    }

    .float-action-button .btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }

    .float-action-button .btn i {
        font-size: 16px !important;
    }
}

/* For Very Small Screens */
@media screen and (max-width: 480px) {
    .float-action-button {
        bottom: 130px !important;  /* Adjusted for very small screens */
        right: 12px !important;
    }

    .float-action-button .btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    .float-action-button .btn i {
        font-size: 14px !important;
    }
}

/* For Landscape Mode */
@media screen and (max-height: 480px) {
    .float-action-button {
        bottom: 100px !important;  /* Adjusted for landscape */
    }
}

/* For Tablets in Portrait Mode */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .float-action-button {
        bottom: 160px !important;  /* Adjusted for tablets */
        right: 24px !important;
    }
}
#form-container {
    display: none !important; /* Initially hidden */
    transition: all 0.3s ease !important;
}

.form-toggle-btn {
    position: fixed !important;
    bottom: 80px !important; /* Position above the footer */
    left: 20px !important;
    z-index: 999 !important;
    background-color: #1a4664 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.form-toggle-btn:hover {
    background-color: #235785 !important;
    transform: scale(1.05) !important;
}

.form-toggle-btn i {
    font-size: 24px !important;
}
