/* Global Styles */
:root {
    --primary-color: #1E5631;
    --accent-color: #FFD700;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --error-color: #dc3545;
    --success-color: #28a745;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* Header Styles */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2rem;
    margin-right: 10px;
    color: var(--accent-color);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

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

/* Progress Bar Styles */
.progress-container {
    padding: 20px;
    background-color: var(--secondary-color);
}

.progress {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--border-color);
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--border-color);
    margin: 0 auto 8px;
    font-weight: 600;
    color: var(--light-text);
}

.active-step .step-number {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.completed-step .step-number {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step-label {
    font-size: 0.8rem;
    color: var(--light-text);
}

.active-step .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Styles */
.form-container {
    padding: 30px;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active-step {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 86, 49, 0.2);
}

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

/* Repeatable Section */
.repeatable-section {
    margin-bottom: 20px;
}

.system-detail-item {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    position: relative;
}

.system-detail-item .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.remove-btn:hover {
    background-color: #c82333;
}

.add-system-detail {
    margin-top: 10px;
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-label:hover {
    background-color: var(--secondary-color);
}

.checkbox-label input {
    width: auto;
    margin-right: 10px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 5px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: #144527;
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: #e2e6ea;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

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

.modal-content {
    background-color: white;
    margin: 20px auto;
    padding: 0;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    box-shadow: var(--box-shadow);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Preview Styles */
.preview-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.preview-header h2 {
    color: var(--primary-color);
    border: none;
    margin-bottom: 5px;
}

.preview-section {
    margin-bottom: 25px;
}

.preview-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.preview-table th, .preview-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.preview-table th {
    background-color: var(--secondary-color);
    font-weight: 600;
}

.preview-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.preview-image {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.preview-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    z-index: 1001;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    font-size: 1.2rem;
    margin-right: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .system-detail-item {
        flex-direction: column;
    }
    
    .system-detail-item .form-group {
        width: 100%;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .form-navigation .btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px auto;
    }
    
    .preview-images {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .step-label {
        display: none;
    }
    
    .header {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
}