/* Root Variables */
:root {
  --primary-color: #b22c20;
  --primary-dark: #8e2319;
  --primary-light: #d64b3f;
  --secondary-color: #333333;
  --background-color: #f8f8f8;
  --text-color: #333333;
  --text-light: #ffffff;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Font */
@font-face {
  font-family: 'Roboto';
  src: url('/static/fonts/Roboto-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Styles */
body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f5f5f5;
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}
/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

/* Container for the entire layout */
.container {
    display: flex;
    flex-grow: 1;
    min-height: 100vh;
    width: 100%;
}


/* Login */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #8e2319 0%, #d64b3f 100%);
}

.login-container {
  width: 90%;
  max-width: 350px;
  margin: 10vh auto;
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
}

.login-logo {
  margin-bottom: 25px;
}

.login-logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.login-container h2 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.login-container p {
  color: #666;
  margin-bottom: 20px;
}

.login-container input {
  width: 100%;
  padding: 12px;
  margin: 15px 0;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
}

.login-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(178, 44, 32, 0.2);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: var(--transition);
  margin-top: 10px;
}

.login-btn:hover {
  background-color: var(--primary-dark);
}

/* Header */
/*
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 99%;
    margin-left: 4px;
    background-color: var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}
*/

.header-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    padding-left: 5px;
    color: white;
    box-shadow: var(--box-shadow);
    z-index: 50; /* Ensure header is above main content */
    position: fixed;
    height: 60px; /* Fixed height for the header */
    background: linear-gradient(135deg, #8e2319 0%, #d64b3f 100%);
}

.logo img {
    height: 48px;
}
/*
#current-page-title {
    font-size: 1.5rem;
    font-weight: bold;
}
*/

#current-page-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    flex-grow: 1; /* Allow title to take available space */
    text-align: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* push logout to bottom */
    width: 200px;
    background-color: #2c3e50;
    color: #fff;
    position: fixed;
    top: 60px;
    left: -200px; /* hidden by default */
    bottom: 0;
    transition: left 0.3s ease;
    z-index: 1000;
}

.sidebar.open {
    left: 0;
}

.sidebar-content {
    background: linear-gradient(135deg, #8e2319 0%, #d64b3f 100%);
    height: 100%;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 15px;
    padding-left: 1px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header span {
    margin-left: 10px;
    font-size: 1.2rem;
}

#sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between; /* push logout to bottom */
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-items li {
    margin-bottom: 15px; /* spacing between menu items */
}

.logout-item {
    margin-bottom: 20px;
}

.sidebar-menu ul li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}

.sidebar-menu ul li a:hover,
.sidebar-menu ul li a.active {
    background-color: #34495e;
}

.sidebar-menu ul li a i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.sidebar-menu ul li a span {
    display: inline;
}

/* Main Content */
.main-content {
    margin-left: 0;
    margin-top: 60px;
    padding: 20px;
    width: 100%;
    transition: none;
    overflow-y: auto;
}
/*
.main-content {
    flex-grow: 1;
    margin-left: 200px;
    margin-top: 60px;
    padding: 20px;
    width: calc(100% - 200px);
    transition: margin-left 0.3s ease, width 0.3s ease;
    overflow-y: auto; 
}
*/
/*
.main-content {
    flex-grow: 1;
    padding: 20px;
    margin-left: 250px; 
    transition: margin-left 0.3s ease;
    overflow-y: auto; 
    height: calc(100vh - 60px); 
}
*/


/* Tab Content */
.tab-content {
    display: none;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/*
.chart-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 300px;
}
*/
.chart-container {
    background-color: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: 350px; /* Fixed height for charts */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Filter Section */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: bold;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    flex-grow: 1; /* Allow inputs to expand */
}

.apply-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.apply-btn:hover {
    background-color: var(--primary-dark);
}

/* Forms */
form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.form-group textarea {
    resize: vertical;
}

/* Data Table */
.data-table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

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

.data-table th {
    background-color: #f4f4f9;
    font-weight: bold;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #fff;
}

.status-badge.status-pending {
    background-color: #FFC107;
}

.status-badge.status-resolved {
    background-color: #4CAF50;
}

.status-badge.status-inprogress {
    background-color: #2196F3;
}

/* Reports Tab Layout */
.reports-sidebar {
    width: 30%;
    max-width: 400px;
    background-color: #f4f4f9;
    padding: 20px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.map-content {
    flex: 1;
    padding: 20px;
}

#map-container {
    height: calc(100vh - 10px);
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#issue-details {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.issue-list {
    list-style: none;
}

.issue-item {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

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

.issue-item h4 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.issue-item p {
    margin: 5px 0;
}

.issue-item .media {
    margin-top: 10px;
}

.issue-item img,
.issue-item video,
.issue-item audio {
    max-width: 100%;
    margin: 5px 0;
}

/* Loading Spinner */
.loading {
    padding: 10px;
    text-align: center;
    color: #666;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 5px;
    background-color: #4CAF50;
    z-index: 2000;
    transition: width 0.3s ease;
    display: none;
}

.progress-bar.active {
    display: block;
    width: 100%;
}

/* Notification Banners */
.notification {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 4px;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: fadeInOut 5s ease forwards;
    margin-bottom: 10px;
}

.notification .icon {
    margin-right: 10px;
}

.notification .close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
}

.notification.info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
}

.notification.warning {
    background-color: #fff3e0;
    border-left: 4px solid #FFC107;
}

.notification.error {
    background-color: #ffebee;
    border-left: 4px solid #F44336;
}

.notification.success {
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
}

/* Modern Container */
    .report-container {
        display: grid;
        grid-template-columns: 400px 1fr;
        gap: 24px;
        max-width: 1600px;
        margin: 0 auto;
        height: calc(100vh - 40px);
    }
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Reports Tab New Layout */
.reports-main-layout {
    display: flex;
    height: calc(100vh - 120px);
    gap: 20px;
    overflow: hidden;
    position: relative;
}

.map-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    background-color: #fff;
    overflow: hidden;
    position: relative;
}

.map-controls {
    padding: 10px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.map-toggle-btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.map-toggle-btn.active,
.map-toggle-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#reports-map-container {
    height: 100%;
    position: relative;
}

.pinned-result {
    position: fixed; /* Make it float over the full screen */
    top: 60px;
    left: 0px;
    z-index: 1000;
    width: 400px;
    height: calc(100% - 80px); /* Leave room for padding or header */
    max-height: calc(100% - 80px);
    background: #fff;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

/* Header */
.pinned-result-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    padding: 10px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

/* Make entire result scrollable except header */
.pinned-result-body {
    overflow-y: auto;
    padding: 10px;
    flex-grow: 1;
}

.close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #888;
}

.close-btn:hover {
    color: #000;
}

/* Google-like Search Box Overlay */
/* Adjust overlay now that it's inside pinned-result */
.map-search-overlay {
    position: static; /* No longer absolute */
    z-index: auto;
    width: 100%;
    padding: 0;
    max-width: 100%;
}

/* Search results */
.search-results {
    max-height: 200px;
    overflow-y: auto;
    display: block;
}

/* Optional: refine spacing in pinned-result-body */
#pinnedResultContent {
    margin-top: 10px;
}

.map-toggle-btn, .filter-btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.map-toggle-btn.active,
.map-toggle-btn:hover,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-box-container {
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.search-icon {
    margin-right: 12px;
    color: #9aa0a6;
    font-size: 20px;
}

.map-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    background: transparent;
}

.map-search-input::placeholder {
    color: #9aa0a6;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #9aa0a6;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.clear-search-btn:hover {
    background-color: #f1f3f4;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

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

.search-result-item:last-child {
    border-bottom: none;
}

.result-icon {
    margin-right: 12px;
    color: #9aa0a6;
    font-size: 16px;
}

.result-details {
    flex: 1;
}

.result-title {
    font-size: 14px;
    color: #202124;
    margin-bottom: 2px;
}

.result-subtitle {
    font-size: 12px;
    color: #5f6368;
}

/* Geofence Circle Styling */
.geofence-info {
    position: absolute;
    top: 60px;
    left: 10px;
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 14px;
    z-index: 999;
    display: none;
}

.geofence-info.active {
    display: block;
}

.distance-info {
    color: #1a73e8;
    font-weight: 500;
}

.phone-location-marker {
    background-color: #34A853;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Info Window Styles */
.info-window-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 400px;
    padding: 10px;
    margin: 0;
}

.info-window-header {
    background: linear-gradient(135deg, #8e2319 0%, #d64b3f 100%);
    color: white;
    padding: 16px 20px;
    margin: -8px -8px 16px -8px;
}

.info-window-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.issue-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.issue-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.issue-card:last-child {
    margin-bottom: 0;
}

.problem-title {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
}

.info-label {
    font-weight: 600;
    color: #34495e;
    min-width: 100px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: #2c3e50;
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-submitted {
    background-color: #e8f4fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-in-progress {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.status-completed {
    background-color: #e8f5e8;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.responsive-media {
    width: 100%;
    max-height: 200px;
    border-radius: 6px;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.responsive-audio {
    width: 100%;
    margin-top: 8px;
}

.media-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    transition: background-color 0.2s ease;
}

.media-link:hover {
    background-color: #2980b9;
    color: white;
    text-decoration: none;
}

.created-info {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 12px;
    border-left: 3px solid #3498db;
}

.created-info .info-value {
    font-size: 12px;
    color: #6c757d;
}

/* Distance info in info window */
.distance-section {
    background-color: #e8f5e8;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 12px 0;
    border-left: 3px solid #34A853;
}

/* Action Section Styles */
.action-section {
    margin-bottom: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    background-color: white;
    border-left: 3px solid var(--primary-dark);
}

/* Button Tabs Styles */
.button-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 6px 12px;
    border: 2px solid #dee2e6;
    background-color: #fff;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tab-button:active {
    transform: scale(0.98);
    background-color: #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button.active,
.tab-button.active:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Dropdown Select Styles */
.action-dropdown-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    color: #495057;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.action-dropdown-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.action-dropdown-select option {
    padding: 8px;
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) { /* Adjust breakpoint as needed */
    .reports-main-layout {
        flex-direction: column; /* Stack columns vertically on smaller screens */
        height: calc(100vh - 10px); /* Allow content to dictate height */
    }

    .map-panel, .reports-details-panel {
        flex: none; /* Remove flex sizing */
        width: 100%; /* Take full width */
        margin-bottom: 20px; /* Space between stacked panels */
    }

    #reports-map-container {
        height: 400px; /* Fixed height for map on smaller screens */
    }

    .reports-details-panel {
        height: auto; /* Allow details panel to grow as needed */
        overflow-y: visible; /* No internal scroll for the panel itself */
    }

    #reports-issue-list-container {
        max-height: 500px; /* Max height for the scrollable list within the panel */
    }

    .map-search-overlay {
            width: calc(100% - 20px);
    }

    .map-panel{
        height: calc(100vh - 10px);
    }

    #reports-map-container {
        height: calc(100vh - 10px);
        position: relative;
    }

}

/* Responsive Design*/
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar {
        width: 200px;
        left: -200px;
    }

    .sidebar.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar.collapsed {
        width: 60px;
        left: 0;
    }

    .charts {
        grid-template-columns: 1fr;
    }

    .reports-sidebar {
        width: 100%;
        max-width: none;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .map-content {
        padding: 10px;
    }

    #map-container {
        height: 400px;
    }

    .notification {
        min-width: 250px;
        right: 10px;
    }

    .map-panel{
            height: calc(100vh - 10px);
    }

    .map-search-overlay {
        position: relative;
        top: 0;
        left: 0;
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .reports-main-layout{
        height: calc(100vh - 10px);
    }

    #reports-map-container {
        height: calc(100vh - 10px);
        position: relative;
    }

}

/* Cluster Management Styles */

/* Bootstrap Grid System */


.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.col-md-6,
.col-md-4,
.col-md-12 {
    position: relative;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Bootstrap spacing utilities */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

/* Main container styling */
#cluster-tab {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* Header styling */
#cluster-tab h2 {
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Card enhancements */
.card {
    border: none;
    border-radius: 0px;
    transition: all 0.3s ease;
    overflow: hidden;
    background: #ffffff;
}

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

.card-header {
    background: linear-gradient(135deg, #8e2319 0%, #d64b3f 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.card-header strong {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 2rem 1.5rem;
    background-color: #ffffff;
}

/* Form styling */
.form-group {
    position: relative;
}

.form-group label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background-color: #ffffff;
}

.form-control:hover {
    border-color: #ced4da;
}

/* Select dropdown styling */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Button styling */
.btn {
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #4e9a2a 0%, #95d4b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #1976D2 0%, #00BCD4 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

/* Row spacing */
.row.mb-4 {
    margin-bottom: 2.5rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #cluster-tab {
        padding: 1rem;
        margin-top: 1rem !important;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    #cluster-tab h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

     .map-panel{
        height: calc(100vh - 10px);
    }

    #reports-map-container {
        height: calc(100vh - 10px);
        position: relative;
    }

}

@media (max-width: 576px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .map-panel{
        height: calc(100vh - 10px);
    }
    .reports-main-layout{
        height: calc(100vh - 10px);
    }

    #reports-map-container {
        height: calc(100vh - 10px);
        position: relative;
    }

}

/* Animation for form submission */
.form-submitting {
    opacity: 0.7;
    pointer-events: none;
}

.form-submitting .btn {
    position: relative;
}

.form-submitting .btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Focus management for accessibility */
.form-control:focus,
.btn:focus {
    outline: none;
}

/* Success/Error states */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Custom scrollbar for select elements */
select.form-control::-webkit-scrollbar {
    width: 8px;
}

select.form-control::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

select.form-control::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

select.form-control::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}