/* --- PREMIUM UNIFIED DESIGN v2 --- */

/* Contenedor Principal Flotante */
.mt-modern-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    width: 95%;
    max-width: 1000px;
    margin: 50px auto 100px auto;
    /* Margen inferior amplio para evitar footer */
    overflow: visible;
    /* Permitir que sombras o tooltips salgan */
    font-family: 'Inter', system-ui, sans-serif;
    border: 1px solid #e2e8f0;
    position: relative;
    z-index: 10;
}

/* Headers con Degradado */
.mt-card-header {
    padding: 45px 35px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

/* Variante Azul (Gastos) */
.mt-header-blue {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

/* Variante Verde (Ingresos) */
.mt-header-green {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
}

.mt-header-content {
    position: relative;
    z-index: 2;
}

/* Icono Hero en Header - EMOJI MODE */
.mt-header-icon {
    font-size: 4rem;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Reset para evitar conflictos con Elementor */
.mt-modern-card img,
.mt-modern-card svg {
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100%;
    height: auto;
}

.mt-header-text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.02em;
    color: white !important;
    line-height: 1.2 !important;
}

.mt-header-text p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Cuerpo de la Card */
.mt-card-body {
    padding: 50px;
    background: #ffffff;
    border-radius: 0 0 20px 20px;
}

/* Secciones y Tipografía */
.mt-form-section {
    margin-bottom: 35px;
}

.mt-section-heading {
    font-size: 1.15rem;
    color: #334155;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.mt-section-icon {
    font-size: 1.3rem;
}

/* Grids y Layouts */
.mt-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .mt-grid-2 {
        grid-template-columns: 1fr;
    }

    .mt-card-body {
        padding: 25px;
    }
}

/* Inputs Unificados */
.mt-field-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mt-field-group.full-width {
    grid-column: 1 / -1;
}

.mt-field-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mt-input,
.mt-select,
.mt-textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.mt-input:focus,
.mt-select:focus,
.mt-textarea:focus {
    outline: none;
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.mt-header-green+.mt-card-body .mt-input:focus,
.mt-header-green+.mt-card-body .mt-select:focus,
.mt-header-green+.mt-card-body .mt-textarea:focus {
    border-color: #10b981;
    /* Focus verde si es ingresos */
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.mt-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Divider */
.mt-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 30px 0;
}

/* Archivos */
.mt-help-text {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 15px;
    margin-top: -10px;
}

.mt-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.mt-file-input-wrapper {
    position: relative;
    height: 100px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #f8fafc;
}

.mt-file-input-wrapper:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.mt-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.mt-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #64748b;
    pointer-events: none;
}

.mt-file-icon {
    font-size: 1.5rem;
}

.mt-file-text {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Botones */
.mt-form-actions {
    margin-top: 40px;
    text-align: right;
}

.mt-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

@media(min-width: 600px) {
    .mt-btn-submit {
        width: auto;
    }
}

.mt-btn-blue {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mt-btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}

.mt-btn-green {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.mt-btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}