/* Registro de Gastos ASENF - Frontend Styles */

.rga-formulario-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
}

.rga-formulario-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.rga-titulo {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 3px solid #3b82f6;
}

.rga-form-group {
    margin-bottom: 25px;
}

.rga-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
}

.rga-required {
    color: #ef4444;
    font-weight: bold;
}

.rga-input,
.rga-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.rga-input:focus,
.rga-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rga-input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rga-input-valor {
    flex: 1;
}

.rga-select-moneda {
    width: 100px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rga-select-moneda:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rga-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Comprobante Section */
.rga-comprobante-section {
    border-top: 2px solid #e2e8f0;
    padding-top: 25px;
    margin-top: 30px;
}

.rga-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.rga-help-text {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 15px;
}

.rga-button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.rga-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rga-btn-camera {
    background: #3b82f6;
    color: white;
}

.rga-btn-camera:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.rga-btn-file {
    background: #10b981;
    color: white;
}

.rga-btn-file:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.rga-btn-capture {
    background: #3b82f6;
    color: white;
}

.rga-btn-capture:hover {
    background: #2563eb;
}

.rga-btn-cancel {
    background: #64748b;
    color: white;
}

.rga-btn-cancel:hover {
    background: #475569;
}

.rga-btn-submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 16px;
    margin-top: 10px;
}

.rga-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.rga-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rga-file-hidden {
    display: none;
}

/* Camera */
.rga-camera-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.rga-camera-container {
    text-align: center;
}

.rga-video {
    width: 100%;
    max-width: 640px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rga-camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Preview */
.rga-preview-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.rga-preview-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 15px;
}

.rga-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.rga-preview-item {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rga-preview-content {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
}

.rga-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rga-pdf-icon {
    font-size: 48px;
}

.rga-file-name-preview {
    font-size: 12px;
    color: #64748b;
    margin: 8px 0 0 0;
    text-align: center;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rga-btn-remove-file {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 300;
    line-height: 28px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    opacity: 0.8;
}

.rga-btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.9);
    opacity: 1;
    transform: scale(1.1);
}

.rga-btn-remove-file:active {
    transform: scale(0.95);
}

/* Messages */
.rga-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.6;
}

.rga-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.rga-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.rga-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .rga-formulario-container {
        padding: 20px 15px;
    }
    
    .rga-titulo {
        font-size: 24px;
    }
    
    .rga-button-group {
        grid-template-columns: 1fr;
    }
    
    .rga-camera-controls {
        flex-direction: column;
    }
    
    .rga-btn {
        width: 100%;
    }
    
    .rga-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .rga-input-group {
        flex-wrap: wrap;
    }
    
    .rga-select-moneda {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rga-formulario-wrapper {
        padding: 10px;
        margin: 15px auto;
    }
    
    .rga-formulario-container {
        padding: 20px 12px;
    }
    
    .rga-titulo {
        font-size: 20px;
    }
    
    .rga-preview-grid {
        grid-template-columns: 1fr 1fr;
    }
}
