        :root {
            --primary-color: rgba(255, 20, 82, 0.75);
            --primary-dark: #ff1452;
            --secondary-color: #f7876b;
            --light-bg: #f8f9fa;
            --dark-text: #282828;
            --gray-text: #666;
            --border-color: rgba(255, 20, 82, 0.2);
            --success-color: #28a745;
            --danger-color: #dc3545;
            --warning-color: #ffc107;
        }
        
        a  {color: #fff; text-decoration: none;}
        a:hover {color: #fff; text-decoration: underline;}
        
        /* Checkbox styling */
        .checkbox-group {
            margin: 1rem 0;
        }
        
        .checkbox-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-weight: 500;
            color: var(--dark-text);
            transition: color 0.2s;
        }
        
        .checkbox-label:hover {
            color: var(--primary-color);
        }
        
        .checkbox-custom {
            display: inline-block;
            width: 20px;
            height: 20px;
            background: white;
            border: 2px solid var(--border-color);
            border-radius: 4px;
            margin-right: 10px;
            position: relative;
            transition: all 0.2s;
        }
        
        #is_anonymous_checkbox:checked + .checkbox-label .checkbox-custom {
            background: var(--primary-color);
            border-color: var(--primary-color);
        }
        
        #is_anonymous_checkbox:checked + .checkbox-label .checkbox-custom::after {
            content: '';
            position: absolute;
            left: 6px;
            top: 2px;
            width: 6px;
            height: 10px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }
        
        .checkbox-text {
            font-size: 1rem;
        }
        
        /* Hide the actual checkbox */
        #is_anonymous_checkbox {
            display: none;
        }        
        
        /* Debug panel */
        .debug-panel {
            background: #ffeb3b;
            color: #333;
            padding: 10px;
            border-bottom: 2px solid #ff9800;
            font-family: monospace;
            font-size: 12px;
        }
        
        .debug-info {
            display: inline-block;
            margin-right: 15px;
        }
        
        .debug-label {
            font-weight: bold;
            color: #e65100;
        }
        
        /* Dashboard-like header styling */
        .public-header {
            background: #fafafa;
            padding: 1rem 2rem;
            border-bottom: 1px solid #eee;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .public-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1400px;
            margin: 0 auto;
        }
        
        .nav-logo {
            height: 50px;
        }
        
        .nav-logo-link {
            display: inline-block;
            transition: opacity 0.2s ease;
        }
        
        .nav-logo-link:hover {
            opacity: 0.8;
        }        
        
        .public-container { 
            max-width: 1200px; 
            margin: 0 auto; 
            padding: 1.5rem;
            min-height: 80vh;
        }
        
        .page-header {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: white;
            padding: 2.5rem 2rem;
            border-radius: 16px;
            margin-bottom: 2rem;
            box-shadow: 0 8px 25px rgba(247, 135, 107, 0.3);
            position: relative;
            overflow: hidden;
        }
        
        .page-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 100%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
            background-size: 20px 20px;
            opacity: 0.3;
        }
        
        .page-header h1 { 
            color: #fff; 
            font-size: 2.5rem; 
            margin-bottom: 0.5rem;
            position: relative;
            z-index: 1;
        }
        
        .page-header p { 
            color: rgba(255, 255, 255, 0.9); 
            font-size: 1.1rem;
            max-width: 1336px;
            position: relative;
            z-index: 1;
        }
        
        .header-actions {
            display: flex;
            gap: 1rem;
            margin-top: 1.5rem;
            flex-wrap: wrap;
            position: relative;
            z-index: 1;
        }
        
        .btn-header {
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background: white;
            color: var(--primary-color);
            border: 2px solid white;
        }
        
        .btn-primary:hover {
            background: transparent;
            color: white;
        }
        
        .btn-secondary {
            background: transparent;
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
        }
        
        .btn-secondary:hover {
            background: white;
            color: var(--primary-color);
        }
        
        /* Stats Bar */
        .stats-bar {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        .stat-card {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border-left: 4px solid var(--primary-color);
            transition: transform 0.3s ease;
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
        }
        
        .stat-number {
            font-size: 2.5rem;
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }
        
        .stat-label {
            color: var(--gray-text);
            font-size: 0.95rem;
        }
        
        /* Filters Section */
        .filters-container {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        
        .filters-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .filter-group {
            margin-bottom: 1rem;
        }
        
        .filter-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--dark-text);
        }
        
        .filter-select, .filter-input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .filter-select:focus, .filter-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(247, 135, 107, 0.1);
        }
        
        .filter-actions {
            display: flex;
            gap: 1rem;
            justify-content: flex-end;
            flex-wrap: wrap;
        }
        
        .btn-filter {
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            border: none;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
        }
        
        .btn-apply {
            background: var(--primary-color);
            color: white;
        }
        
        .btn-apply:hover {
            background: var(--primary-dark);
        }
        
        .btn-reset {
            background: var(--light-bg);
            color: var(--gray-text);
        }
        
        .btn-reset:hover {
            background: #e9ecef;
        }
        
        .map-inter {
            width: 100%;
            margin: 1.5rem 0;
        }
        
        .map-inter img {
            width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            display: block;
        }
        
        .map-inter img:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
        }        
        
        /* Reports Grid */
        .reports-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .report-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        
        .report-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        }
        
        .report-card.urgent {
            border-top: 4px solid var(--danger-color);
        }
        
        .report-card.closed {
            opacity: 0.85;
            background: #f8f9fa;
        }
        
        .report-header {
            padding: 1.25rem;
            background: var(--light-bg);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }
        
        .report-type {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .type-person { background: #e3f2fd; color: #1565c0; }
        .type-pet { background: #f3e5f5; color: #7b1fa2; }
        .type-asset { background: #e8f5e8; color: #2e7d32; }
        
        .report-body {
            padding: 1.25rem;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        
        .report-title {
            font-size: 1.25rem;
            font-weight: 700;
            margin-bottom: 0.75rem;
            color: var(--dark-text);
            line-height: 1.3;
        }
        
        .report-meta {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--gray-text);
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        .report-description {
            color: var(--gray-text);
            font-size: 0.9rem;
            line-height: 1.5;
            margin-bottom: 1rem;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            flex-grow: 1;
        }
        
        .report-footer {
            padding: 1.25rem;
            background: var(--light-bg);
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .btn-view {
            padding: 0.6rem 1.25rem;
            background: var(--primary-color);
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 600;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .btn-view:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }
        
        /* Pagination */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            margin: 2rem 0;
            flex-wrap: wrap;
        }
        
        .page-link {
            padding: 0.5rem 1rem;
            background: white;
            color: var(--gray-text);
            text-decoration: none;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }
        
        .page-link:hover {
            background: var(--light-bg);
            color: var(--primary-color);
        }
        
        .page-link.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .page-link.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        /* Report Detail View */
        .report-detail-container {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }
        
        .detail-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 2rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        .detail-actions {
            display: flex;
            gap: 0.75rem;
        }
        
        .btn-action {
            padding: 0.75rem 1.25rem;
            border-radius: 6px;
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
        }
        
        .btn-edit { 
            background: var(--warning-color); 
            color: #000; 
        }
        
        .btn-edit:hover { 
            background: #e0a800; 
        }
        
        .btn-share { 
            background: var(--secondary-color); 
            color: white; 
        }
        
        .btn-share:hover { 
            background: #0d4058; 
        }
        
        /* Photos Grid */
        .photos-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .photo-item {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            background: #f8f9fa;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 150px;
        }
        
        .photo-item img {
            width: 100%;
            height: 150px;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        
        .photo-item:hover img {
            transform: scale(1.05);
        }
        
        /* Comments Section */
        .comments-section {
            margin-top: 3rem;
        }
        
        .comment-form {
            background: var(--light-bg);
            padding: 1.5rem;
            border-radius: 12px;
            margin-bottom: 2rem;
            border-left: 4px solid var(--primary-color);
        }
        
        .comment-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .comment-item {
            background: white;
            border-radius: 8px;
            padding: 1.25rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            border-left: 4px solid var(--primary-color);
        }
        
        .comment-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }
        
        .comment-author {
            font-weight: 600;
            color: var(--dark-text);
        }
        
        .comment-date {
            font-size: 0.85rem;
            color: var(--gray-text);
        }
        
        .comment-body {
            color: var(--gray-text);
            line-height: 1.6;
        }
        
        /* Form Styles */
        .form-group { margin-bottom: 1.25rem; }
        
        .form-label { 
            display: block; 
            margin-bottom: 0.5rem; 
            font-weight: 600; 
            color: var(--dark-text); 
        }
        
        .form-control { 
            width: 100%; 
            padding: 0.75rem 1rem; 
            border: 1px solid var(--border-color); 
            border-radius: 6px; 
            font-size: 1rem; 
            transition: all 0.3s ease;
        }
        
        .form-control:focus { 
            outline: none; 
            border-color: var(--primary-color); 
            box-shadow: 0 0 0 3px rgba(247, 135, 107, 0.1); 
        }
        
        .btn-submit { 
            background: var(--primary-color); 
            color: white; 
            border: none; 
            padding: 0.75rem 1.5rem; 
            border-radius: 6px; 
            font-size: 1rem; 
            font-weight: 600;
            cursor: pointer; 
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
        }
        
        .btn-submit:hover { 
            background: var(--primary-dark); 
            transform: translateY(-2px);
        }
        
        /* Alerts */
        .alert {
            padding: 1rem 1.5rem;
            border-radius: 8px;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            border-left: 4px solid;
        }
        
        .alert-error { 
            background: #f8d7da; 
            border-color: var(--danger-color); 
            color: #721c24; 
        }
        
        .alert-success { 
            background: #d4edda; 
            border-color: var(--success-color); 
            color: #155724; 
        }
        
        .reporter-badge {
            display: inline-block;
            background: #e8f5e8;
            color: #2e7d32;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.8rem;
            margin-left: 0.5rem;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .public-container {
                padding: 1rem;
            }
            
            .page-header {
                padding: 1.5rem 1rem;
            }
            
            .page-header h1 {
                font-size: 2rem;
            }
            
            .reports-grid {
                grid-template-columns: 1fr;
            }
            
            .detail-header {
                flex-direction: column;
                gap: 1rem;
            }
            
            .detail-actions {
                width: 100%;
                justify-content: flex-start;
            }
            
            .filters-grid {
                grid-template-columns: 1fr;
            }
            
            .filter-actions {
                flex-direction: column;
            }
            
            .btn-filter {
                width: 100%;
                justify-content: center;
            }
        }
        
        @media (max-width: 480px) {
            .stats-bar {
                grid-template-columns: 1fr 1fr;
            }
            
            .header-actions {
                flex-direction: column;
            }
            
            .btn-header {
                width: 100%;
                justify-content: center;
            }
        }
        
        /* Loading State */
        .loading {
            opacity: 0.7;
            pointer-events: none;
        }
        
        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 3rem;
            color: var(--gray-text);
        }
        
        .empty-state i {
            font-size: 3rem;
            margin-bottom: 1rem;
            color: var(--border-color);
        }
        
        /* Back Link */
        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
            margin-top: 1rem;
            padding: 0.75rem 1.5rem;
            background: white;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }
        
        .back-link:hover {
            background: var(--light-bg);
            transform: translateX(-5px);
        }
        
        /* Search Bar */
        .search-container {
            position: relative;
            margin-bottom: 1rem;
        }
        
        .search-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray-text);
        }
        
        .search-input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 3rem;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(247, 135, 107, 0.1);
        }
        
        /* Status Badge Styles - UPDATED */
        .status-badge {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-left: 0.5rem;
            text-transform: uppercase;
        }
        
        .status-open {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .status-investigating {
            background-color: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }
        
        .status-found {
            background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }
        
        .status-closed {
            background-color: #e2e3e5;
            color: #383d41;
            border: 1px solid #d6d8db;
        }
        
        .status-archived {
            background-color: #f8f9fa;
            color: #6c757d;
            border: 1px solid #e9ecef;
        }
        
        /* Type Badge Styles */
        .report-type {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 4px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-right: 0.5rem;
            text-transform: uppercase;
        }
        
        .type-person {
            background-color: #cce5ff;
            color: #004085;
            border: 1px solid #b8daff;
        }
        
        .type-pet {
            background-color: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }
        
        .type-asset {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        /* Reporter Badge */
        .reporter-badge {
            display: inline-block;
            padding: 0.15rem 0.5rem;
            background: #28a745;
            color: white;
            border-radius: 10px;
            font-size: 0.7rem;
            margin-left: 0.5rem;
        }
        
        .admin-badge {
            display: inline-block;
            padding: 0.15rem 0.5rem;
            background: #dc3545;
            color: white;
            border-radius: 10px;
            font-size: 0.7rem;
            margin-left: 0.5rem;
        }  
     
        /* Share Modal */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }
        
        .modal-content {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            max-width: 500px;
            width: 100%;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        }
        
        /* Image error state */
        .image-error {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            color: #999;
        }
        
        .image-error i {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }
        
        /* Admin badge */
        .admin-badge {
            display: inline-block;
            background: #d4edda;
            color: #155724;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.8rem;
            margin-left: 0.5rem;
            border: 1px solid #c3e6cb;
        }
        /* Modal Form Styles */
        .modal-form-group {
            margin-bottom: 1.25rem;
        }
        
        .modal-form-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--dark-text);
        }
        
        .modal-form-control {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }
        
        .modal-form-control:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(247, 135, 107, 0.1);
        }
        
        /* Button spacing in modal */
        .modal-buttons {
            display: flex;
            gap: 1rem;
            justify-content: flex-end;
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--border-color);
        } 
        
        /* Fix image loading/fade-in */
        .photo-item img {
            opacity: 1 !important; /* Override the JavaScript opacity */
            transition: opacity 0.3s ease;
            background: transparent !important;
        }
        
        .photo-item {
            background: transparent !important;
        }
        
        /* Remove the JavaScript opacity setting from images */
        img[style*="opacity: 0"] {
            opacity: 1 !important;
        }        