/* pabe/questionnaire/style.css */
* {
    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: #f5f7fa;
    padding: 20px;
}

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

/* Header */
.form-header {
    background: linear-gradient(135deg, #4a6fa5, #166088);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.mt-2 {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Progress bar */
.progress-container {
    margin-bottom: 2rem;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a6fa5, #17a2b8);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Form sections */
.form-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a6fa5;
}

.section-number {
    background: #4a6fa5;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group label.required::after {
    content: " *";
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: #4a6fa5;
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

select.form-control {
    cursor: pointer;
}

/* Signature */
.signature-container {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    background: white;
    margin-top: 10px;
}

.signature-note {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.signature-pad {
    width: 100%;
    height: 200px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
}

.signature-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
}

.signature-hint {
    color: #666;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #4a6fa5, #166088);
    color: white;
}

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

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-outline {
    background: white;
    color: #4a6fa5;
    border: 2px solid #4a6fa5;
}

.btn-outline:hover {
    background: #4a6fa5;
    color: white;
}

/* Form actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: white;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.action-group, .export-group {
    display: flex;
    gap: 15px;
}

/* Modal */
.modal {
    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;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    margin: 20px 0;
}

.modal-body p {
    margin-bottom: 15px;
    color: #555;
}

.modal-body ul {
    list-style: none;
    padding: 0;
}

.modal-body li {
    padding: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-group, .export-group {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-number {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .form-header {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .form-actions {
        display: none !important;
    }
    
    .form-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
    
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        max-width: 100%;
    }
}

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

.form-section {
    animation: fadeIn 0.5s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #4a6fa5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #166088;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #4a6fa5;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(74, 111, 165, 0.3);
    color: #2c3e50;
}