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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation */
nav {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background: #667eea;
    color: white;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-edit {
    background: #28a745;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

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

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #c82333;
}

/* Grid Layout untuk Laporan */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-style: italic;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.card-content .deskripsi {
    color: #666;
    margin-bottom: 1rem;
}

.card-content .lokasi,
.card-content .tanggal,
.card-content .pelapor {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #555;
}

/* Status Styles */
.status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.hilang {
    background: #fff3cd;
    color: #856404;
}

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

.status.selesai {
    background: #d4edda;
    color: #155724;
}

/* Form Styles */
.form-laporan, .tanggapan-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-laporan h2, .tanggapan-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

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

/* Login/Register Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.login-form p {
    text-align: center;
    margin-top: 1rem;
}

.login-form a {
    color: #667eea;
    text-decoration: none;
}

.login-form a:hover {
    text-decoration: underline;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

table tr:hover {
    background: #f8f9fa;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

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

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

/* No Data Message */
.no-data {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .form-laporan, .tanggapan-form {
        padding: 1.5rem;
    }
    
    .login-form {
        padding: 2rem;
        margin: 1rem;
    }
}

/* ==================== */
/* STYLES BARU UNTUK SISTEM TANGGAPAN YANG DIPERBAIKI */
/* ==================== */

/* Styles untuk sistem tanggapan baru */
.laporan-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.laporan-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease;
    position: relative;
}

.laporan-item:hover {
    transform: translateY(-2px);
}

.laporan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.laporan-info {
    flex: 1;
}

.laporan-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.laporan-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.laporan-meta .tanggal {
    color: #6c757d;
    font-size: 0.9rem;
}

.laporan-foto {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.no-foto {
    width: 100px;
    height: 100px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.8rem;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.laporan-deskripsi {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.laporan-deskripsi p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Info Tanggapan */
.tanggapan-info {
    margin: 1rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.jumlah-tanggapan {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    margin: 0;
}

.icon-tanggapan {
    font-size: 1.2rem;
}

/* Tombol Aksi */
.laporan-actions {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

/* Toggle Tanggapan */
.tanggapan-toggle {
    margin-bottom: 1rem;
}

.btn-tanggapan {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

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

/* Area Tanggapan */
.tanggapan-area {
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.tanggapan-list {
    margin-bottom: 2rem;
}

.tanggapan-list h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}

.tanggapan-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.tanggapan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tanggapan-header strong {
    color: #333;
    font-size: 1rem;
}

.tanggapan-header-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.tanggapan-time {
    background: #28a745;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.btn-edit-small {
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

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

.tanggapan-isi {
    color: #555;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.foto-tanggapan {
    max-width: 200px;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.no-tanggapan {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 1rem;
}

/* Form Tambah Tanggapan */
.tambah-tanggapan-form {
    background: #f1f3f4;
    padding: 1.5rem;
    border-radius: 8px;
}

.tambah-tanggapan-form h4 {
    margin-bottom: 1rem;
    color: #333;
}

.form-tanggapan {
    margin: 0;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.tanggapan-form-simple {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

/* Preview Tanggapan di user.php */
.tanggapan-preview {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.tanggapan-preview h4 {
    margin-bottom: 0.8rem;
    color: #333;
    font-size: 1rem;
}

.tanggapan-item-preview {
    background: white;
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 0.8rem;
    border-left: 3px solid #667eea;
}

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

.foto-indicator {
    margin-top: 0.3rem;
}

.foto-indicator small {
    color: #6c757d;
}

.lihat-semua {
    text-align: center;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #dee2e6;
}

.btn-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ==================== */
/* STYLES UNTUK USER.PHP */
/* ==================== */

.user-laporan {
    margin-bottom: 3rem;
}

.no-data-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.no-data {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
}

.no-data h3 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.no-data p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Statistik Section */
.statistik {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.statistik h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Warna statistik berdasarkan status */
.stat-hilang .stat-number {
    color: #dc3545;
}

.stat-ditemukan .stat-number {
    color: #28a745;
}

.stat-selesai .stat-number {
    color: #6c757d;
}

/* Hover effects untuk statistik */
.stat-hilang:hover {
    background: #f8d7da;
}

.stat-ditemukan:hover {
    background: #d4edda;
}

.stat-selesai:hover {
    background: #e2e3e5;
}

/* ==================== */
/* RESPONSIVE DESIGN TAMBAHAN */
/* ==================== */

@media (max-width: 768px) {
    .laporan-header {
        flex-direction: column;
    }
    
    .laporan-foto {
        max-width: 100%;
        max-height: 200px;
    }
    
    .tanggapan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .laporan-actions {
        flex-direction: column;
    }
    
    .laporan-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .laporan-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .no-data {
        padding: 2rem 1rem;
    }
    
    .tanggapan-header-preview {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .tanggapan-time {
        align-self: flex-start;
    }
}

/* ==================== */
/* IMPROVEMENT VISUAL */
/* ==================== */

/* Border kiri berwarna berdasarkan status */
.laporan-item[data-status="hilang"] {
    border-left: 4px solid #dc3545;
}

.laporan-item[data-status="ditemukan"] {
    border-left: 4px solid #28a745;
}

.laporan-item[data-status="selesai"] {
    border-left: 4px solid #6c757d;
}

/* Badge untuk status yang lebih menarik */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth transitions untuk semua interactive elements */
a, button, .btn, input, textarea, select {
    transition: all 0.3s ease;
}

/* Focus styles untuk accessibility */
a:focus, button:focus, .btn:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

html {
    scroll-behavior: smooth;
}