﻿/* ========================================
   INGRESOS DISTRITO - ESTILOS MODERNOS
   ======================================== */

/* Variables de Color */
:root {
    --ingresosdistrito-primary: #4b1ca4;
    --ingresosdistrito-primary-dark: #3a1580;
    --ingresosdistrito-primary-light: #6a28c4;
    --ingresosdistrito-secondary: #10b981;
    --ingresosdistrito-accent: #f59e0b;
    --ingresosdistrito-danger: #ef4444;
    --ingresosdistrito-text-dark: #1f2937;
    --ingresosdistrito-text-gray: #6b7280;
    --ingresosdistrito-text-light: #9ca3af;
    --ingresosdistrito-bg-light: #f9fafb;
    --ingresosdistrito-bg-gray: #f3f4f6;
    --ingresosdistrito-border: #e5e7eb;
    --ingresosdistrito-white: #ffffff;
    --ingresosdistrito-shadow: rgba(0, 0, 0, 0.1);
    --ingresosdistrito-shadow-hover: rgba(75, 28, 164, 0.15);
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
#ingresosdistrito-page-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    padding: 1.5rem;
}

#ingresosdistrito-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--ingresosdistrito-white);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px var(--ingresosdistrito-shadow);
    overflow: hidden;
    animation: ingresosdistrito-fade-in 0.6s ease-out;
}

@keyframes ingresosdistrito-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   HEADER
   ======================================== */
#ingresosdistrito-header {
    background: linear-gradient(135deg, var(--ingresosdistrito-primary) 0%, var(--ingresosdistrito-primary-light) 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

    #ingresosdistrito-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: ingresosdistrito-header-pulse 15s ease-in-out infinite;
    }

@keyframes ingresosdistrito-header-pulse {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-5%, -5%) scale(1.1);
    }
}

#ingresosdistrito-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#ingresosdistrito-header-icon {
    width: 4rem;
    height: 4rem;
    color: var(--ingresosdistrito-white);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

#ingresosdistrito-header-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--ingresosdistrito-white);
    margin: 0;
    text-align: center;
    letter-spacing: -0.025em;
}

#ingresosdistrito-header-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.ingresosdistrito-btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.ingresosdistrito-btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--ingresosdistrito-white);
    border-color: rgba(255, 255, 255, 0.3);
}

    .ingresosdistrito-btn-primary:hover {
        background: var(--ingresosdistrito-white);
        color: var(--ingresosdistrito-primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.ingresosdistrito-btn-secondary {
    background: rgba(16, 185, 129, 0.2);
    color: var(--ingresosdistrito-white);
    border-color: rgba(16, 185, 129, 0.3);
}

    .ingresosdistrito-btn-secondary:hover {
        background: var(--ingresosdistrito-secondary);
        color: var(--ingresosdistrito-white);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

/* ========================================
   FORMULARIO
   ======================================== */
#ingresosdistrito-form-wrapper {
    padding: 2rem;
}

.ingresosdistrito-form-group {
    margin-bottom: 1.5rem;
}

.ingresosdistrito-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ingresosdistrito-text-dark);
    margin-bottom: 0.5rem;
}

.ingresosdistrito-label-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--ingresosdistrito-primary);
    flex-shrink: 0;
}

.ingresosdistrito-input,
.ingresosdistrito-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--ingresosdistrito-text-dark);
    background: var(--ingresosdistrito-white);
    border: 2px solid var(--ingresosdistrito-border);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    outline: none;
}

    .ingresosdistrito-input:focus,
    .ingresosdistrito-select:focus {
        border-color: var(--ingresosdistrito-primary);
        box-shadow: 0 0 0 4px rgba(75, 28, 164, 0.1);
    }

    .ingresosdistrito-input:disabled {
        background: var(--ingresosdistrito-bg-gray);
        cursor: not-allowed;
        opacity: 0.6;
    }

.ingresosdistrito-file-input {
    padding: 0.625rem;
}

/* ========================================
   RADIO BUTTONS
   ======================================== */
.ingresosdistrito-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
}

.ingresosdistrito-radio-option {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.ingresosdistrito-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ingresosdistrito-radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--ingresosdistrito-bg-light);
    border: 2px solid var(--ingresosdistrito-border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--ingresosdistrito-text-dark);
}

    .ingresosdistrito-radio-label svg {
        width: 1.25rem;
        height: 1.25rem;
        color: var(--ingresosdistrito-text-gray);
        transition: all 0.3s ease;
    }

    .ingresosdistrito-radio-label:hover {
        border-color: var(--ingresosdistrito-primary-light);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px var(--ingresosdistrito-shadow-hover);
    }

.ingresosdistrito-radio-input:checked + .ingresosdistrito-radio-label {
    background: linear-gradient(135deg, var(--ingresosdistrito-primary) 0%, var(--ingresosdistrito-primary-light) 100%);
    border-color: var(--ingresosdistrito-primary);
    color: var(--ingresosdistrito-white);
    box-shadow: 0 8px 20px var(--ingresosdistrito-shadow-hover);
}

    .ingresosdistrito-radio-input:checked + .ingresosdistrito-radio-label svg {
        color: var(--ingresosdistrito-white);
    }

/* ========================================
   SUBTIPO + BOTÓN MODAL
   ======================================== */
.ingresosdistrito-subtipo-group {
    position: relative;
}

.ingresosdistrito-subtipo-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

    .ingresosdistrito-subtipo-wrapper .ingresosdistrito-select {
        flex: 1;
    }

.ingresosdistrito-btn-modal {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ingresosdistrito-accent);
    color: var(--ingresosdistrito-white);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.875rem;
}

    .ingresosdistrito-btn-modal:hover {
        background: #d97706;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    }

    .ingresosdistrito-btn-modal svg {
        width: 1.125rem;
        height: 1.125rem;
    }

/* ========================================
   PERIODO
   ======================================== */
.ingresosdistrito-periodo-section {
    background: var(--ingresosdistrito-bg-light);
    border: 2px solid var(--ingresosdistrito-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ingresosdistrito-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ingresosdistrito-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingresosdistrito-periodo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.ingresosdistrito-label-small {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ingresosdistrito-text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.ingresosdistrito-select-small {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
    color: var(--ingresosdistrito-text-dark);
    background: var(--ingresosdistrito-white);
    border: 2px solid var(--ingresosdistrito-border);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    outline: none;
}

    .ingresosdistrito-select-small:focus {
        border-color: var(--ingresosdistrito-primary);
        box-shadow: 0 0 0 3px rgba(75, 28, 164, 0.1);
    }

/* ========================================
   BOTÓN GUARDAR
   ======================================== */
.ingresosdistrito-form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--ingresosdistrito-border);
}

.ingresosdistrito-btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ingresosdistrito-white);
    background: linear-gradient(135deg, var(--ingresosdistrito-primary) 0%, var(--ingresosdistrito-primary-light) 100%);
    border: none;
    border-radius: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(75, 28, 164, 0.3);
}

    .ingresosdistrito-btn-submit:hover {
        background: linear-gradient(135deg, var(--ingresosdistrito-primary-dark) 0%, var(--ingresosdistrito-primary) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(75, 28, 164, 0.4);
    }

    .ingresosdistrito-btn-submit:active {
        transform: translateY(0);
    }

    .ingresosdistrito-btn-submit svg {
        width: 1.25rem;
        height: 1.25rem;
    }

/* ========================================
   MODAL INSCRIPCIÓN
   ======================================== */
.ingresosdistrito-modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 60px var(--ingresosdistrito-shadow);
}

.ingresosdistrito-modal-header {
    background: linear-gradient(135deg, var(--ingresosdistrito-primary) 0%, var(--ingresosdistrito-primary-light) 100%);
    color: var(--ingresosdistrito-white);
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
}

    .ingresosdistrito-modal-header .modal-title {
        font-weight: 700;
        font-size: 1.25rem;
    }

.ingresosdistrito-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ingresosdistrito-modal-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ingresosdistrito-modal-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ingresosdistrito-text-dark);
}

.ingresosdistrito-modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--ingresosdistrito-text-dark);
    background: var(--ingresosdistrito-bg-light);
    border: 2px solid var(--ingresosdistrito-border);
    border-radius: 0.625rem;
    transition: all 0.3s ease;
    outline: none;
}

    .ingresosdistrito-modal-input:focus {
        border-color: var(--ingresosdistrito-primary);
        background: var(--ingresosdistrito-white);
        box-shadow: 0 0 0 3px rgba(75, 28, 164, 0.1);
    }

.ingresosdistrito-modal-total {
    background: linear-gradient(135deg, var(--ingresosdistrito-primary) 0%, var(--ingresosdistrito-primary-light) 100%);
    border-radius: 0.875rem;
    padding: 1.25rem;
    text-align: center;
}

.ingresosdistrito-modal-total-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ingresosdistrito-modal-total-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ingresosdistrito-white);
    letter-spacing: -0.025em;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1024px) {
    #ingresosdistrito-page-wrapper {
        padding: 1rem;
    }

    #ingresosdistrito-container {
        border-radius: 1rem;
    }

    #ingresosdistrito-header {
        padding: 1.75rem 1.5rem;
    }

    #ingresosdistrito-header-icon {
        width: 3.5rem;
        height: 3.5rem;
    }

    #ingresosdistrito-header-title {
        font-size: 1.625rem;
    }

    #ingresosdistrito-form-wrapper {
        padding: 1.5rem;
    }

    .ingresosdistrito-radio-option {
        min-width: 180px;
    }

    .ingresosdistrito-periodo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   RESPONSIVE - MÓVIL
   ======================================== */
@media (max-width: 768px) {
    #ingresosdistrito-page-wrapper {
        padding: 0.75rem;
    }

    #ingresosdistrito-container {
        border-radius: 0.875rem;
    }

    #ingresosdistrito-header {
        padding: 1.5rem 1rem;
    }

    #ingresosdistrito-header-icon {
        width: 3rem;
        height: 3rem;
    }

    #ingresosdistrito-header-title {
        font-size: 1.375rem;
    }

    #ingresosdistrito-header-actions {
        flex-direction: column;
        width: 100%;
    }

    .ingresosdistrito-btn-nav {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    #ingresosdistrito-form-wrapper {
        padding: 1.25rem;
    }

    .ingresosdistrito-form-group {
        margin-bottom: 1.25rem;
    }

    .ingresosdistrito-label {
        font-size: 0.875rem;
    }

    .ingresosdistrito-input,
    .ingresosdistrito-select {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }

    .ingresosdistrito-radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ingresosdistrito-radio-option {
        min-width: 100%;
    }

    .ingresosdistrito-radio-label {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .ingresosdistrito-subtipo-wrapper {
        flex-direction: column;
    }

    .ingresosdistrito-btn-modal {
        width: 100%;
        margin-top: 0;
    }

    .ingresosdistrito-periodo-section {
        padding: 1.25rem;
    }

    .ingresosdistrito-section-title {
        font-size: 1rem;
    }

    .ingresosdistrito-periodo-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .ingresosdistrito-label-small {
        font-size: 0.8125rem;
    }

    .ingresosdistrito-select-small {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .ingresosdistrito-btn-submit {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .ingresosdistrito-modal-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .ingresosdistrito-modal-total-value {
        font-size: 1.75rem;
    }
}

/* ========================================
   RESPONSIVE - MÓVIL PEQUEÑO
   ======================================== */
@media (max-width: 480px) {
    #ingresosdistrito-page-wrapper {
        padding: 0.5rem;
    }

    #ingresosdistrito-container {
        border-radius: 0.75rem;
    }

    #ingresosdistrito-header {
        padding: 1.25rem 0.875rem;
    }

    #ingresosdistrito-header-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    #ingresosdistrito-header-title {
        font-size: 1.25rem;
    }

    .ingresosdistrito-btn-nav {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
    }

    #ingresosdistrito-form-wrapper {
        padding: 1rem;
    }

    .ingresosdistrito-form-group {
        margin-bottom: 1rem;
    }

    .ingresosdistrito-label {
        font-size: 0.8125rem;
    }

    .ingresosdistrito-label-icon {
        width: 1.125rem;
        height: 1.125rem;
    }

    .ingresosdistrito-input,
    .ingresosdistrito-select {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .ingresosdistrito-radio-label {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

        .ingresosdistrito-radio-label svg {
            width: 1.125rem;
            height: 1.125rem;
        }

    .ingresosdistrito-periodo-section {
        padding: 1rem;
    }

    .ingresosdistrito-section-title {
        font-size: 0.9375rem;
    }

    .ingresosdistrito-btn-submit {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

        .ingresosdistrito-btn-submit svg {
            width: 1.125rem;
            height: 1.125rem;
        }

    .ingresosdistrito-modal-header {
        padding: 1.25rem;
    }

        .ingresosdistrito-modal-header .modal-title {
            font-size: 1.125rem;
        }

    .ingresosdistrito-modal-total {
        padding: 1rem;
    }

    .ingresosdistrito-modal-total-value {
        font-size: 1.5rem;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
.ingresosdistrito-input:focus-visible,
.ingresosdistrito-select:focus-visible,
.ingresosdistrito-btn-submit:focus-visible,
.ingresosdistrito-btn-nav:focus-visible,
.ingresosdistrito-btn-modal:focus-visible {
    outline: 3px solid var(--ingresosdistrito-primary);
    outline-offset: 2px;
}

/* Reducir animaciones para usuarios con preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbar personalizado (Webkit) */
#ingresosdistrito-container::-webkit-scrollbar {
    width: 8px;
}

#ingresosdistrito-container::-webkit-scrollbar-track {
    background: var(--ingresosdistrito-bg-light);
}

#ingresosdistrito-container::-webkit-scrollbar-thumb {
    background: var(--ingresosdistrito-primary-light);
    border-radius: 10px;
}

    #ingresosdistrito-container::-webkit-scrollbar-thumb:hover {
        background: var(--ingresosdistrito-primary);
    }
