* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.logo-section h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.logo-section h2 {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
}

.login-content {
    padding: 40px 30px;
    text-align: center;
}

.login-content p {
    margin-bottom: 30px;
    color: #666;
}

.g_id_signin {
    display: inline-block;
    margin: 20px 0;
}

.login-info {
    margin-top: 30px;
    text-align: left;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
}

.login-info h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.login-info ul {
    list-style: none;
}

.login-info li {
    padding: 8px 0;
    color: #666;
    font-size: 14px;
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.nav-left h2 {
    color: #667eea;
    font-size: 24px;
}

.login-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}

/* ===== Footer ===== */
.site-footer {
    margin-top: auto;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 18px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.3px;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.site-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.site-footer a:hover {
    color: #e0e0e0;
}

.site-footer a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info {
    color: #666;
    font-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 30px;
    flex: 1;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 22px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 48px;
}

.stat-info h3 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

.stat-pending .stat-info h3 { color: #f39c12; }
.stat-reviewed .stat-info h3 { color: #3498db; }
.stat-resolved .stat-info h3 { color: #27ae60; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.checkbox-group {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 5px;
}

.checkbox-group small {
    color: #999;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.filter-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.complaints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.complaint-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.complaint-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.complaint-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    gap: 10px;
}

.complaint-header h4 {
    color: #333;
    font-size: 18px;
    flex: 1;
}

.complaint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.category-tag {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.visibility-tag {
    background: #e0e0e0;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.date {
    color: #999;
    font-size: 12px;
    align-self: center;
}

.complaint-submitter {
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.complaint-submitter small {
    color: #999;
}

.anonymous-badge {
    color: #9b59b6;
    font-weight: 500;
}

.complaint-description {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.complaint-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-reviewed {
    background: #cfe2ff;
    color: #084298;
}

.badge-resolved {
    background: #d1e7dd;
    color: #0f5132;
}

.status-select {
    padding: 6px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.status-select:focus {
    outline: none;
    border-color: #667eea;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

.info-text {
    color: #666;
    margin-bottom: 20px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    margin-top: -10px;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-right {
        justify-content: center;
    }
    
    .complaints-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success-message {
    background: #d1e7dd;
    color: #0f5132;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #0f5132;
}

.error-message {
    background: #f8d7da;
    color: #842029;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #842029;
}

/* File Upload Area */
.file-upload-area {
    background: #f9f9f9;
    border: 2px dashed #d0d0d0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.file-upload-area:hover {
    border-color: #667eea;
}

.file-upload-area input[type="file"] {
    margin-bottom: 10px;
}

.file-upload-area small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* Photo Preview Grid */
.photo-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.preview-remove:hover {
    background: #e74c3c;
}

/* Photo Gallery in Complaint Cards */
.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.gallery-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

/* Complaint Footer */
.complaint-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

/* Relate (Me Too) Button */
.relate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f0;
    color: #666;
    border: 2px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.relate-btn:hover {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.relate-btn-active {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.relate-icon {
    font-size: 16px;
}

.relate-text {
    font-weight: 500;
}

.relate-count {
    font-weight: 400;
    opacity: 0.8;
}

/* Admin Response */
.admin-response {
    margin-top: 15px;
    background: #e8f4fd;
    border-left: 3px solid #2196f3;
    padding: 12px 15px;
    border-radius: 0 8px 8px 0;
}

.response-header {
    font-size: 13px;
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 8px;
}

.response-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* Related Info */
.related-info {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    background: #fff8e1;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.related-info strong {
    color: #f57c00;
}

/* Response Form */
.response-form {
    margin-top: 12px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
}

.response-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.response-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.response-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}