/* Estilos do formulário */
.csg-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.csg-form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
}

.csg-form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.csg-form-section h4 {
    margin: 20px 0 10px 0;
    color: #666;
    font-size: 16px;
}

.csg-form-group {
    margin-bottom: 15px;
}

.csg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.csg-form-group input,
.csg-form-group select,
.csg-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.csg-form-group input:focus,
.csg-form-group select:focus,
.csg-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.csg-form-group textarea {
    height: 80px;
    resize: vertical;
}

/* Botões */
.csg-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.csg-btn-primary {
    background: #007cba;
    color: white;
}

.csg-btn-primary:hover {
    background: #005a8a;
}

.csg-btn-success {
    background: #4CAF50;
    color: white;
}

.csg-btn-success:hover {
    background: #45a049;
}

.csg-btn-secondary {
    background: #6c757d;
    color: white;
}

.csg-btn-secondary:hover {
    background: #545b62;
}

.csg-form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Modal */
.csg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.csg-modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

/* Animação de sucesso */
.csg-success-animation {
    margin-bottom: 20px;
}

.csg-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.csg-checkmark svg {
    width: 100%;
    height: 100%;
}

.csg-checkmark circle {
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: csg-circle 0.6s ease-in-out forwards;
}

.csg-checkmark path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: csg-checkmark 0.3s ease-in-out 0.6s forwards;
}

@keyframes csg-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes csg-checkmark {
    to {
        stroke-dashoffset: 0;
    }
}

.csg-modal-actions {
    margin-top: 30px;
}

.csg-modal-actions .csg-btn {
    margin: 0 10px;
}

/* Loading */
.csg-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.csg-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: csg-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes csg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 768px) {
    .csg-form {
        padding: 15px;
    }
    
    .csg-form-section {
        padding: 15px;
    }
    
    .csg-modal-content {
        padding: 30px 20px;
    }
    
    .csg-modal-actions .csg-btn {
        display: block;
        margin: 10px 0;
        width: 100%;
    }
}
