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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    color: black;
    line-height: 1.6;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #BE0127 0%, #8B0000 100%);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header h1 {
    color: #BE0127;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-header h2 {
    color: #BE0127;
    margin-bottom: 15px;
    font-size: 22px;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #BE0127;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #BE0127;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #9a0120;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.forgot-password {
    margin-top: 20px;
}

.forgot-password a {
    color: #BE0127;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 12px;
}

/* Admin Dashboard Styles */
.admin-header {
    background: #BE0127;
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-start;
}

.header-center {
    display: none;
}

.header-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    padding: 2px;
}

.header-title-section {
    display: flex;
    flex-direction: column;
}

.header-title-section .title-main {
    font-size: 16px;
    font-weight: 500;
    color: white;
    line-height: 1.2;
}

.header-title-section .title-location {
    font-size: 22px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.system-title {
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    line-height: 1.3;
}

/* Mobile-specific header text styling */
@media (max-width: 768px) {
    .admin-header {
        height: 60px;
        padding: 0 10px;
    }
    
    .header-logo {
        width: 40px;
        height: 40px;
    }
    
    .header-title-section .title-main {
        font-size: 12px;
    }
    
    .header-title-section .title-location {
        font-size: 16px;
    }
    
    .system-title {
        font-size: 14px;
        font-weight: 700;
        text-align: left;
        line-height: 1.2;
        margin: 0;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
}

.bell-icon {
    font-size: 20px;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-dropdown {
    position: relative;
    cursor: pointer;
}

.profile-name {
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    z-index: 1000;
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: black;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background: #f1f1f1;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    padding: 20px 0;
}

.nav-menu {
    list-style: none;
}

.nav-menu > li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #BE0127;
    color: white;
}

.menu-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 15px;
}

.menu-section:last-child {
    border-bottom: none;
}

.menu-header {
    display: block;
    padding: 12px 20px;
    color: #BE0127;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.submenu li {
    margin-bottom: 2px;
}

.submenu a {
    padding: 10px 20px 10px 35px;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.submenu a:hover,
.submenu a.active {
    background: rgba(190, 1, 39, 0.1);
    border-left-color: #BE0127;
    color: #BE0127;
}

.submenu a.active {
    background: #BE0127;
    color: white;
}

.main-content {
    flex: 1;
    padding: 30px;
}

.dashboard-header h1 {
    color: #BE0127;
    margin-bottom: 10px;
    font-size: 32px;
}

.dashboard-header p {
    color: #666;
    margin-bottom: 30px;
}

/* Enhanced KPI Dashboard Styles */
.dashboard-kpis {
    margin-bottom: 40px;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #BE0127;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50px;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, transparent, rgba(190, 1, 39, 0.05));
    border-radius: 50%;
}

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

.kpi-icon {
    font-size: 24px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(190, 1, 39, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.kpi-content h3 {
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}

.kpi-number {
    font-size: 28px;
    font-weight: bold;
    color: #BE0127;
    margin-bottom: 4px;
    line-height: 1;
}

.kpi-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color variations for different KPI types */
.kpi-card.primary { border-left-color: #BE0127; }
.kpi-card.new { border-left-color: #28a745; }
.kpi-card.pending { border-left-color: #ffc107; }
.kpi-card.resolved { border-left-color: #28a745; }
.kpi-card.urgent { border-left-color: #dc3545; }
.kpi-card.performance { border-left-color: #17a2b8; }
.kpi-card.registered { border-left-color: #6f42c1; }
.kpi-card.guest { border-left-color: #6c757d; }
.kpi-card.users { border-left-color: #20c997; }
.kpi-card.system { border-left-color: #fd7e14; }
.kpi-card.regions { border-left-color: #e83e8c; }
.kpi-card.admin { border-left-color: #6610f2; }

/* Analytics Section */
.analytics-section {
    margin: 40px 0;
}

.analytics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.charts-single-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.chart-container-small {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-container h3,
.chart-container-small h3 {
    color: #BE0127;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
}

/* Specific styles for status chart container */
.chart-container-small:first-child {
    max-width: 280px;
    margin: 0 auto;
}

/* Full Width Complaint Detail Styles */
.full-width-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 100%;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.case-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Department Action Section */
.department-action-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.action-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #BE0127;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.action-section h4 {
    color: #BE0127;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modern Bottom Navigation Styles for Mobile Only */
.bottom-nav {
    position: fixed !important;
    bottom: 15px !important;
    left: 10px !important;
    right: 10px !important;
    background: linear-gradient(135deg, #BE0127, #d63447) !important;
    border-radius: 25px !important;
    display: none !important; /* Hidden by default on desktop */
    justify-content: space-around !important;
    align-items: center !important;
    padding: 8px 5px !important;
    z-index: 2000 !important;
    box-shadow: 0 10px 30px rgba(190, 1, 39, 0.3) !important;
    height: 65px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255,255,255,0.8) !important;
    padding: 6px 8px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    min-width: 50px;
    flex: 1;
    max-width: 65px;
    background: transparent;
}

.nav-item:hover {
    text-decoration: none;
    color: white !important;
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    color: #BE0127 !important;
    background: white !important;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.nav-icon {
    font-size: 18px;
    margin-bottom: 3px;
    line-height: 1;
    transition: all 0.3s ease;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-label {
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    line-height: 1;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.nav-item.active .nav-label {
    opacity: 1;
    font-weight: 700;
}

.nav-badge {
    position: absolute;
    top: 0px;
    right: 5px;
    background: #ff3b30;
    color: white;
    border-radius: 8px;
    padding: 1px 4px;
    font-size: 8px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
    border: 1px solid white;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Floating animation for active state */
.nav-item.active {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(-3px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(-3px);
    }
}

/* Ripple effect on tap */
.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.nav-item:active::before {
    width: 40px;
    height: 40px;
}

/* Adjust main content padding only on mobile */
@media (max-width: 768px) {
    .admin-container,
    .main-content {
        padding-bottom: 100px !important;
    }
}

/* Show bottom navigation only on mobile devices */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important; /* Show on mobile */
        left: 5px !important;
        right: 5px !important;
        height: 60px !important;
    }

    .nav-icon {
        font-size: 16px;
    }

    .nav-label {
        font-size: 8px;
    }

    /* Hide sidebar on mobile for PWA experience */
    .sidebar {
        display: none;
    }

    .admin-container {
        display: block;
    }

    .main-content {
        padding: 20px 15px 120px;
    }
}

/* Upload Area Styles */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #BE0127;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    transform: translateY(-2px);
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(190, 1, 39, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-icon {
    font-size: 60px;
    color: #BE0127;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.upload-subtext {
    font-size: 14px;
    color: #666;
    position: relative;
    z-index: 1;
}

/* Inspection Photos Preview */
.inspection-photos-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

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

.photo-preview-item:hover {
    transform: translateY(-5px);
}

.photo-preview-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.remove-photo-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.remove-photo-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Inspection Location Styles */
.inspection-location-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.location-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: end;
    margin-bottom: 25px;
}

.inspection-map {
    height: 450px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Enhanced Status Form */
.status-update-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: #BE0127;
    background: white;
    box-shadow: 0 0 0 3px rgba(190, 1, 39, 0.1);
}

/* Enhanced Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
    margin: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #BE0127, #ff6b6b);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
    padding-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #BE0127;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #e0e0e0;
    z-index: 1;
}

.timeline-marker.assigned {
    background: #28a745;
}

.timeline-marker.resolved {
    background: #17a2b8;
}

.timeline-marker.inspection {
    background: #ffc107;
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #BE0127;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 20px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 10px solid white;
}

.timeline-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.timeline-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.timeline-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Button Enhancements */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
    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, #BE0127, #e63946);
    color: white;
    box-shadow: 0 4px 15px rgba(190, 1, 39, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a00120, #d62839);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(190, 1, 39, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #BE0127;
    color: #BE0127;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .kpi-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .analytics-row {
        grid-template-columns: 1fr;
    }

    .charts-single-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

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

@media (max-width: 768px) {
    .kpi-row {
        grid-template-columns: 1fr 1fr;
    }

    .kpi-card {
        padding: 15px;
        gap: 10px;
    }

    .kpi-icon {
        font-size: 20px;
        width: 40px;
        height: 40px;
    }

    .kpi-number {
        font-size: 24px;
    }

    .charts-single-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chart-container-small {
        padding: 15px;
    }

    .chart-container-small h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .location-input-row {
        grid-template-columns: 1fr;
    }

    .inspection-photos-preview {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .upload-area {
        padding: 30px 20px;
    }

    .upload-icon {
        font-size: 40px;
    }

    .upload-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .kpi-row {
        grid-template-columns: 1fr;
    }

    .inspection-photos-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -25px;
        width: 16px;
        height: 16px;
    }
}

.recent-complaints {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recent-complaints h2 {
    margin-bottom: 20px;
    color: #BE0127;
}

.complaints-table table {
    width: 100%;
    border-collapse: collapse;
}

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

.complaints-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.view-btn {
    background: #BE0127;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
}

.view-btn:hover {
    background: #9a0120;
}

/* Sidebar Menu Styles */
.menu-item {
    margin-bottom: 10px;
}

.menu-header {
    padding: 12px 20px;
    background: #f8f9fa;
    color: #BE0127;
    font-weight: 600;
    border-left: 4px solid #BE0127;
    margin-bottom: 5px;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0 0 0 20px;
}

.submenu li {
    margin-bottom: 5px;
}

.submenu a {
    display: block;
    padding: 8px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.submenu a:hover {
    background: #f0f0f0;
    color: #BE0127;
}

.submenu a.active {
    background: #BE0127;
    color: white;
}

/* Complaints Management Styles */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #BE0127;
    margin-bottom: 10px;
    font-size: 28px;
}

.page-header p {
    color: #666;
    margin-bottom: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.complaints-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.filter-group.search-group {
    flex: 2;
    min-width: 200px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.search-btn {
    background: #BE0127;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.search-btn:hover {
    background: #9e0121;
}

.clear-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.clear-btn:hover {
    background: #5a6268;
}

.coord-display {
    font-size: 11px;
    line-height: 1.2;
}

.no-coordinates {
    color: #999;
    font-style: italic;
    font-size: 12px;
}

.complaints-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.summary-item {
    display: flex;
    gap: 10px;
}

.summary-label {
    font-weight: 600;
    color: #666;
}

.summary-value {
    color: #BE0127;
    font-weight: bold;
}

.complaints-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.complaints-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.complaints-table th,
.complaints-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* Department Users Table Specific Styling */
.users-table-container .complaints-table th:nth-child(4),
.users-table-container .complaints-table td:nth-child(4) {
    /* Taluk column */
    max-width: 120px;
    width: 120px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.users-table-container .complaints-table th:nth-child(3),
.users-table-container .complaints-table td:nth-child(3) {
    /* Department column */
    max-width: 180px;
    width: 180px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.users-table-container .complaints-table th:nth-child(1),
.users-table-container .complaints-table td:nth-child(1) {
    /* Username column */
    width: 140px;
}

.users-table-container .complaints-table th:nth-child(2),
.users-table-container .complaints-table td:nth-child(2) {
    /* Email column */
    width: 180px;
}

.users-table-container .complaints-table th:nth-child(5),
.users-table-container .complaints-table td:nth-child(5) {
    /* Designation column */
    width: 120px;
}

.users-table-container .complaints-table th:nth-child(6),
.users-table-container .complaints-table td:nth-child(6) {
    /* Phone column */
    width: 120px;
}

.users-table-container .complaints-table th:nth-child(7),
.users-table-container .complaints-table td:nth-child(7) {
    /* Status column */
    width: 80px;
}

.users-table-container .complaints-table th:nth-child(8),
.users-table-container .complaints-table td:nth-child(8) {
    /* Actions column */
    width: 200px;
}

.taluk-assignment {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.current-taluk {
    font-size: 12px;
    line-height: 1.2;
    word-break: break-word;
}

.description {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Enhanced Complaint Detail Page Styles */

/* Page Header */
.complaint-header-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.complaint-id-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.complaint-id-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 24px;
    color: #BE0127;
}

.status-priority-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.priority-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.quick-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #BE0127;
}

/* Layout */
.complaint-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.detail-left-column,
.detail-right-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sticky-section {
    position: sticky;
    top: 20px;
}

/* Section Styles */
.detail-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #BE0127, #d63447);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.section-header i {
    font-size: 18px;
}

.detail-content {
    padding: 20px;
}

/* Case Information */
.case-title-display h4 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.case-description label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.description-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    white-space: pre-wrap;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
}

.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #BE0127;
}

.detail-item label {
    font-weight: 600;
    color: #BE0127;
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-action_needed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-resolved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-fake_complaint {
    background: #e2e3e5;
    color: #41464b;
    border: 1px solid #d6d8db;
}

/* User Type Indicators */
.guest-indicator {
    color: #6c757d;
    font-style: italic;
}

.registered-user {
    color: #28a745;
    font-weight: 600;
}

.guest-user {
    color: #6c757d;
    font-style: italic;
}

.notifications-enabled {
    color: #28a745;
    font-weight: 600;
}

.notifications-disabled {
    color: #dc3545;
}

.no-contact,
.no-coordinates {
    color: #6c757d;
    font-style: italic;
}

.coordinates {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #495057;
}

/* Photos Gallery */
.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
}

.photo-thumbnail {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-thumbnail:hover {
    transform: scale(1.05);
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 12px;
}

/* Photo Modal */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.photo-modal-header {
    background: #BE0127;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-counter {
    font-weight: 600;
}

.photo-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.photo-modal-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.photo-modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1;
}

.photo-prev {
    left: 10px;
}

.photo-next {
    right: 10px;
}

.photo-modal-footer {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Map Styles */
.map-container {
    padding: 20px;
}

#complaintMap {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.map-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.map-error {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Quick Actions */
.quick-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Status & Assignment */
.status-assignment-info {
    padding: 20px;
}

.current-status {
    margin-bottom: 20px;
}

.current-status label,
.assignment-info label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.status-display {
    margin-top: 5px;
}

.assignee-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.assignee-details strong {
    display: block;
    color: #333;
}

.assignee-details small {
    color: #6c757d;
}

.unassigned-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #856404;
}

.not-assigned {
    color: #856404;
    font-weight: 600;
}

/* Department Notifications */
.notification-departments {
    padding: 20px;
}

.dept-notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.dept-name {
    font-weight: 500;
    color: #333;
}

.notification-status {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notification-status.sent {
    color: #28a745;
}

.notification-status.pending {
    color: #ffc107;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 31px;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid white;
    background: #6c757d;
    z-index: 1;
}

.timeline-marker.created {
    background: #BE0127;
}

.timeline-marker.assigned {
    background: #ffc107;
}

.timeline-marker.resolved {
    background: #28a745;
}

.timeline-time {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.timeline-description {
    font-size: 14px;
    color: #666;
}

/* Status Update Form */
.status-update-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #BE0127;
    box-shadow: 0 0 0 2px rgba(190, 1, 39, 0.1);
}

/* Button Styles */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: #BE0127;
    color: white;
}

.btn-primary:hover {
    background: #9a0120;
}

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

.btn-warning {
    background: #ffc107;
    color: #212529;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #333;
}

.btn-outline:hover {
    background: #f8f9fa;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .complaint-detail-layout {
        grid-template-columns: 1fr;
    }

    .sticky-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .complaint-id-section {
        flex-direction: column;
        gap: 15px;
    }

    .quick-stats {
        justify-content: space-around;
    }

    .action-buttons {
        flex-direction: column;
    }

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

    .photos-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-item img:hover {
    transform: scale(1.05);
}

.photo-item small {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 11px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-resolved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.photo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.photo-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.photo-modal img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.photo-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.photo-modal-close:hover {
    color: #BE0127;
}

/* Timeline Enhancements */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 50px;
}

.timeline-marker {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #BE0127;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e9ecef;
}

.timeline-marker.assigned {
    background: #28a745;
}

.timeline-marker.resolved {
    background: #17a2b8;
}

.timeline-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #BE0127;
}

.timeline-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: 600;
    color: #BE0127;
    margin-bottom: 5px;
}

.timeline-description {
    color: #666;
    font-size: 14px;
}

/* Status Form */
.status-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #BE0127;
    box-shadow: 0 0 0 2px rgba(190, 1, 39, 0.1);
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.taluka {
    max-width: 100px;
}

.department {
    font-size: 12px;
    color: #666;
}

.assigned-user {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.coordinates {
    min-width: 120px;
    font-size: 12px;
}

.coord-display {
    line-height: 1.3;
}

.coord-display small {
    color: #666;
    font-family: monospace;
}

.no-coordinates {
    color: #ccc;
    font-style: italic;
    font-size: 12px;
}

.photo-indicator {
    color: #BE0127;
    font-size: 16px;
}

.no-photo {
    color: #ccc;
}

.operations {
    white-space: nowrap;
}

.btn-edit {
    background: #28a745;
    color: white;
    margin-left: 5px;
}

.btn-edit:hover {
    background: #218838;
}

.complaints-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.complaint-id {
    font-family: monospace;
    font-weight: bold;
    color: #BE0127;
    background-color: transparent;
}

.complaint-id a {
    color: #BE0127 !important;
    text-decoration: none;
}

.complaint-id a:hover {
    color: #8B0000 !important;
    text-decoration: underline;
}

.complaint-title {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location {
    max-width: 150px;
    font-size: 13px;
}

.guest-user {
    color: #666;
    font-style: italic;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-resolved {
    background: #d4edda;
    color: #155724;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
}

.btn {
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-view {
    background: #BE0127;
    color: white;
}

.btn-view:hover {
    background: #9a0120;
}

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

.btn-primary {
    background: #BE0127;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-primary:hover {
    background: #9a0120;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 4px;
}

.pagination-btn.active {
    background: #BE0127;
    color: white;
    border-color: #BE0127;
}

.pagination-btn:hover {
    background: #f8f9fa;
}

/* Complaint Detail Styles */
.complaint-id-header {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
}

.complaint-detail-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.detail-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.detail-section h3 {
    color: #BE0127;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.detail-item p {
    color: #666;
    line-height: 1.5;
}

.description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #BE0127;
}

.view-map-btn {
    color: #BE0127;
    text-decoration: none;
    font-size: 12px;
    margin-left: 10px;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ddd;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -23px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #BE0127;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #ddd;
}

.timeline-marker.assigned {
    background: #28a745;
}

.timeline-marker.resolved {
    background: #17a2b8;
}

.timeline-content {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.timeline-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.timeline-description {
    color: #666;
    font-size: 14px;
}

/* Status Update Form */
.status-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Edit Form Styles */
.edit-form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.edit-form {
    max-width: 800px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #BE0127;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #5a6268;
}

.update-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #BE0127;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #BE0127;
}

.timeline-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.timeline-content strong {
    color: #BE0127;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-item img:hover {
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80%;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

/* Additional mobile adjustments */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .header-right {
        gap: 10px;
    }

    .system-title {
        display: none;
    }

    /* Ensure content doesn't overlap with bottom nav */
    .complaints-table-container,
    .recent-complaints {
        margin-bottom: 20px;
    }
}

/* Burger Menu Styles for Admin Mobile View */
.burger-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.burger-menu-btn:hover {
    background: rgba(255,255,255,0.1);
}

.burger-line {
    width: 24px;
    height: 3px;
    background: white;
    margin: 2px 0;
    border-radius: 2px;
    transition: 0.3s;
}

.burger-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.burger-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.burger-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 2999;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    transition: left 0.3s ease;
    overflow-y: auto;
}

.burger-menu.active {
    left: 0;
}

.burger-menu-header {
    background: linear-gradient(135deg, #BE0127 0%, #d4154a 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border: 2px solid rgba(255,255,255,0.3);
}

.admin-info {
    flex: 1;
}

.admin-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.admin-role {
    font-size: 12px;
    opacity: 0.9;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.close-burger {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-burger:hover {
    background: rgba(255,255,255,0.2);
}

.burger-menu-content {
    padding: 0;
}

.burger-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.burger-nav-menu > li {
    border-bottom: 1px solid #f0f0f0;
}

.burger-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.burger-nav-item:hover {
    background: #f8f9fa;
    color: #BE0127;
    text-decoration: none;
}

.burger-nav-item.active {
    background: rgba(190, 1, 39, 0.1);
    color: #BE0127;
    border-right: 3px solid #BE0127;
}

.burger-nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.burger-menu-section > .burger-menu-header {
    background: #f8f9fa;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    margin: 0;
    border: none;
    box-shadow: none;
}

.burger-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fafafa;
}

.burger-submenu .burger-nav-item {
    padding-left: 35px;
    font-size: 13px;
    background: #fafafa;
}

.burger-submenu .burger-nav-item:hover {
    background: #f0f0f0;
}

.burger-submenu .burger-nav-item.active {
    background: rgba(190, 1, 39, 0.15);
}

.burger-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 10px 0;
}

.logout-item {
    color: #dc3545 !important;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
}

.logout-item:hover {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

/* Prevent body scroll when burger menu is open */
body.burger-menu-open {
    overflow: hidden;
}

/* Only show burger menu on mobile for admin users */
@media (min-width: 768px) {
    .burger-menu-btn {
        display: none;
    }
}

/* PWA Install Prompt */
.pwa-install-container {
    position: fixed;
    bottom: 70px;
    left: 10px;
    right: 10px;
    z-index: 1001;
    animation: slideUp 0.3s ease;
}

.pwa-install-prompt {
    background: linear-gradient(135deg, #BE0127 0%, #d4154a 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(190, 1, 39, 0.3);
    overflow: hidden;
}

.install-content {
    display: flex;
    align-items: center;
    padding: 15px;
    position: relative;
}

.install-icon {
    font-size: 32px;
    margin-right: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.install-text {
    flex: 1;
    color: white;
}

.install-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.install-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.install-now-btn {
    background: #ffffff;
    color: #BE0127;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.install-now-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.install-now-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.dismiss-install-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.dismiss-install-btn:hover {
    opacity: 1;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}/* Dual Assignment Styles for Complaint Detail */

/* Dual Assignment Section */
.dual-assignment-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.dual-assignment-section h4 {
    color: #BE0127;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dual-assignment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .dual-assignment-grid {
        grid-template-columns: 1fr;
    }
}

.assignment-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.assignment-card-header {
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tahsildar-card .assignment-card-header {
    background: #e3f2fd;
    color: #1565c0;
}

.police-card .assignment-card-header {
    background: #fff3e0;
    color: #e65100;
}

.assigned-user-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.assigned-user-info .user-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.assigned-user-info .user-detail {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.assigned-user-info .user-detail i {
    width: 14px;
    color: #888;
}

.assignment-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.assignment-badge.assigned {
    background: #d4edda;
    color: #155724;
}

.assignment-badge.unassigned {
    background: #f8d7da;
    color: #721c24;
}

.status-update-info {
    background: #e8f5e9;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-update-info i {
    color: #4caf50;
}
