/* css/style.css */
:root {
    --primary-color: #8B4513;
    --secondary-color: #DAA520;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --ethiopian-green: #078930;
    --ethiopian-yellow: #FCDD09;
    --ethiopian-red: #DA121A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

/* Ethiopian-inspired patterns */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, 
        var(--ethiopian-green) 33%,
        var(--ethiopian-yellow) 33%,
        var(--ethiopian-yellow) 66%,
        var(--ethiopian-red) 66%
    );
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--ethiopian-green), 
        var(--ethiopian-yellow), 
        var(--ethiopian-red)
    );
}

.header h1 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 10px;
}

.header h2 {
    color: var(--secondary-color);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.ethiopian-date {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 10px;
}

.ethiopian-date p {
    margin: 5px 0;
    font-size: 1.1em;
}

/* Form Styles */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.submission-form,
.track-complaint {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.submission-form h3,
.track-complaint h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(218, 165, 32, 0.3);
}

textarea {
    resize: vertical;
}

.file-upload-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.file-upload-section h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px dashed #ddd;
    border-radius: 5px;
    cursor: pointer;
}

small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 12px;
}

/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-staff {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #6B3410;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3);
}

.btn-staff {
    background: var(--dark-color);
    color: white;
    text-decoration: none;
}

.btn-staff:hover {
    background: #23272b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 58, 64, 0.3);
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

.track-input-group {
    display: flex;
    gap: 10px;
}

.track-input-group input {
    flex: 1;
}

/* Alert Styles */
.alert {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert h4 {
    margin-bottom: 10px;
}

/* Complaint Card Styles */
.complaint-details {
    margin-top: 20px;
}

.complaint-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
}

.complaint-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracking-badge {
    font-size: 1.2em;
    font-weight: bold;
    font-family: monospace;
}

.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: var(--warning-color);
    color: #856404;
}

.status-under_review {
    background: var(--info-color);
    color: white;
}

.status-responded {
    background: var(--success-color);
    color: white;
}

.status-closed {
    background: var(--dark-color);
    color: white;
}

.complaint-body {
    padding: 20px;
}

.complaint-body p {
    margin-bottom: 10px;
}

.responses-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.responses-section h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.response-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.response-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}

.no-response {
    color: #777;
    font-style: italic;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}

/* Staff Login Section */
.staff-login {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Dashboard Styles */
.dashboard {
    padding: 20px;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5em;
    color: var(--secondary-color);
}

.stat-content h3 {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--dark-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.5em;
    }
    
    .header h2 {
        font-size: 1.2em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Ethiopian Calendar Specific Styles */
.ethiopian-month {
    background: var(--ethiopian-green);
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

/* Animation for new complaints */
@keyframes newComplaint {
    0% {
        transform: scale(0.9);
        background: #fff3cd;
    }
    100% {
        transform: scale(1);
        background: white;
    }
}

.complaint-new {
    animation: newComplaint 1s ease;
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add these styles to your css/style.css file */

/* Media Grid for uploaded files */
.media-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.media-section h5 {
    color: #8B4513;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.media-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.media-preview {
    height: 180px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.media-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.media-preview img:hover {
    transform: scale(1.1);
}

.media-preview.video-preview,
.media-preview.audio-preview {
    padding: 10px;
}

.media-preview video,
.media-preview audio {
    width: 100%;
    max-height: 180px;
}

.media-preview.document-preview {
    color: #6c757d;
}

.media-info {
    padding: 15px;
    background: white;
}

.media-name {
    font-size: 0.9em;
    margin-bottom: 5px;
    word-break: break-all;
    color: #495057;
}

.media-size {
    font-size: 0.8em;
    color: #6c757d;
    margin-bottom: 10px;
}

.btn-download {
    display: inline-block;
    padding: 8px 15px;
    background: #8B4513;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85em;
    transition: background 0.3s;
}

.btn-download:hover {
    background: #DAA520;
    color: white;
}

/* Image Modal for viewing images */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.image-modal-close:hover {
    color: #DAA520;
}

/* Info grid for complaint details */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item strong {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 5px;
}

.info-item span {
    font-size: 1em;
    color: #495057;
}

.description-section,
.written-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.description-section h5,
.written-section h5 {
    color: #8B4513;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.description-content,
.written-content {
    line-height: 1.6;
    color: #495057;
    white-space: pre-wrap;
}

.responses-section {
    margin-top: 30px;
}

.responses-section h5 {
    color: #8B4513;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.response-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #DAA520;
}

.response-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}

.response-content {
    line-height: 1.6;
    color: #495057;
}

.no-response {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive styles */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .response-header {
        flex-direction: column;
        gap: 5px;
    }
}