﻿/* ========================================
   DEPOSITOSIGLESIA - ESTILOS MODERNOS
   ======================================== */

/* Variables */
:root {
    --depositosiglesia-primary: #4b1ca4;
    --depositosiglesia-primary-dark: #3a1580;
    --depositosiglesia-primary-light: #6a28c4;
    --depositosiglesia-success: #10b981;
    --depositosiglesia-warning: #f59e0b;
    --depositosiglesia-text-dark: #1f2937;
    --depositosiglesia-text-gray: #6b7280;
    --depositosiglesia-text-light: #9ca3af;
    --depositosiglesia-bg-light: #f9fafb;
    --depositosiglesia-border: #e5e7eb;
    --depositosiglesia-white: #ffffff;
    --depositosiglesia-shadow: rgba(0, 0, 0, 0.1);
    --depositosiglesia-shadow-hover: rgba(75, 28, 164, 0.2);
}

/* Contenedor principal */
#depositosiglesia-page-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#depositosiglesia-container {
    width: 100%;
    max-width: 680px;
    background: var(--depositosiglesia-white);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px var(--depositosiglesia-shadow);
    overflow: hidden;
    animation: depositosiglesiaFadeInUp 0.6s ease-out;
}

@keyframes depositosiglesiaFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
#depositosiglesia-header {
    background: linear-gradient(135deg, var(--depositosiglesia-primary) 0%, var(--depositosiglesia-primary-light) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    #depositosiglesia-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: depositosiglesiaHeaderPulse 15s ease-in-out infinite;
    }

@keyframes depositosiglesiaHeaderPulse {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-5%, -5%) scale(1.1);
    }
}

#depositosiglesia-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

    #depositosiglesia-header-icon svg {
        width: 2rem;
        height: 2rem;
        color: var(--depositosiglesia-white);
    }

#depositosiglesia-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--depositosiglesia-white);
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 1;
}

#depositosiglesia-header-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Formulario */
#depositosiglesia-form-container {
    padding: 2rem;
}

.depositosiglesia-form-group {
    margin-bottom: 1.5rem;
}

.depositosiglesia-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--depositosiglesia-text-dark);
    margin-bottom: 0.5rem;
}

.depositosiglesia-label-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--depositosiglesia-primary);
}

.depositosiglesia-input,
.depositosiglesia-select,
.depositosiglesia-file {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--depositosiglesia-text-dark);
    background: var(--depositosiglesia-white);
    border: 2px solid var(--depositosiglesia-border);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    outline: none;
}

    .depositosiglesia-input:focus,
    .depositosiglesia-select:focus {
        border-color: var(--depositosiglesia-primary);
        box-shadow: 0 0 0 4px rgba(75, 28, 164, 0.1);
    }

    .depositosiglesia-input::placeholder {
        color: var(--depositosiglesia-text-light);
    }

.depositosiglesia-input-disabled {
    background: var(--depositosiglesia-bg-light);
    cursor: not-allowed;
}

.depositosiglesia-file {
    padding: 0.75rem 1rem;
    cursor: pointer;
}

    .depositosiglesia-file::file-selector-button {
        padding: 0.5rem 1rem;
        margin-right: 1rem;
        background: var(--depositosiglesia-primary);
        color: var(--depositosiglesia-white);
        border: none;
        border-radius: 0.5rem;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        .depositosiglesia-file::file-selector-button:hover {
            background: var(--depositosiglesia-primary-dark);
        }

/* Subtipo Header */
.depositosiglesia-subtipo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.depositosiglesia-btn-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--depositosiglesia-primary);
    color: var(--depositosiglesia-white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .depositosiglesia-btn-edit:hover {
        background: var(--depositosiglesia-primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px var(--depositosiglesia-shadow-hover);
    }

    .depositosiglesia-btn-edit svg {
        width: 1rem;
        height: 1rem;
    }

/* Periodo Section */
.depositosiglesia-periodo-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--depositosiglesia-bg-light);
    border-radius: 1rem;
    border: 2px dashed var(--depositosiglesia-border);
}

.depositosiglesia-periodo-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--depositosiglesia-primary);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.depositosiglesia-periodo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.depositosiglesia-label-small {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--depositosiglesia-text-dark);
    margin-bottom: 0.375rem;
}

.depositosiglesia-select-small {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
    color: var(--depositosiglesia-text-dark);
    background: var(--depositosiglesia-white);
    border: 2px solid var(--depositosiglesia-border);
    border-radius: 0.625rem;
    transition: all 0.3s ease;
    outline: none;
}

    .depositosiglesia-select-small:focus {
        border-color: var(--depositosiglesia-primary);
        box-shadow: 0 0 0 3px rgba(75, 28, 164, 0.1);
    }

/* Botón Submit */
.depositosiglesia-btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--depositosiglesia-white);
    background: linear-gradient(135deg, var(--depositosiglesia-primary) 0%, var(--depositosiglesia-primary-light) 100%);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(75, 28, 164, 0.3);
}

    .depositosiglesia-btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(75, 28, 164, 0.4);
    }

    .depositosiglesia-btn-submit:active {
        transform: translateY(0);
    }

    .depositosiglesia-btn-submit svg {
        width: 1.25rem;
        height: 1.25rem;
    }

/* Modal */
.depositosiglesia-modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 60px var(--depositosiglesia-shadow);
}

.depositosiglesia-modal-header {
    background: linear-gradient(135deg, var(--depositosiglesia-primary) 0%, var(--depositosiglesia-primary-light) 100%);
    color: var(--depositosiglesia-white);
    border-bottom: none;
    padding: 1.5rem 2rem;
    border-radius: 1rem 1rem 0 0;
}

    .depositosiglesia-modal-header .modal-title {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0;
    }

.depositosiglesia-modal-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.depositosiglesia-modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

    .depositosiglesia-modal-header .btn-close:hover {
        opacity: 1;
    }

.depositosiglesia-modal-body {
    padding: 2rem;
}

.depositosiglesia-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.depositosiglesia-modal-field {
    display: flex;
    flex-direction: column;
}

.depositosiglesia-modal-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--depositosiglesia-text-dark);
    margin-bottom: 0.5rem;
}

.depositosiglesia-modal-input {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--depositosiglesia-text-dark);
    background: var(--depositosiglesia-white);
    border: 2px solid var(--depositosiglesia-border);
    border-radius: 0.625rem;
    transition: all 0.3s ease;
    outline: none;
}

    .depositosiglesia-modal-input:focus {
        border-color: var(--depositosiglesia-primary);
        box-shadow: 0 0 0 4px rgba(75, 28, 164, 0.1);
    }

.depositosiglesia-modal-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--depositosiglesia-primary) 0%, var(--depositosiglesia-primary-light) 100%);
    border-radius: 0.875rem;
    box-shadow: 0 4px 12px rgba(75, 28, 164, 0.2);
}

.depositosiglesia-modal-total-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--depositosiglesia-white);
    margin: 0;
}

.depositosiglesia-modal-total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--depositosiglesia-white);
}

.depositosiglesia-modal-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid var(--depositosiglesia-border);
}

.depositosiglesia-modal-btn-confirm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--depositosiglesia-white);
    background: var(--depositosiglesia-success);
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .depositosiglesia-modal-btn-confirm:hover {
        background: #059669;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    .depositosiglesia-modal-btn-confirm svg {
        width: 1rem;
        height: 1rem;
    }

/* Responsive */
@media (max-width: 768px) {
    #depositosiglesia-page-wrapper {
        padding: 1rem;
    }

    #depositosiglesia-container {
        max-width: 100%;
    }

    #depositosiglesia-header {
        padding: 2rem 1.5rem;
    }

    #depositosiglesia-header-icon {
        width: 3.5rem;
        height: 3.5rem;
    }

        #depositosiglesia-header-icon svg {
            width: 1.75rem;
            height: 1.75rem;
        }

    #depositosiglesia-header-title {
        font-size: 1.25rem;
    }

    #depositosiglesia-header-subtitle {
        font-size: 1.125rem;
    }

    #depositosiglesia-form-container {
        padding: 1.5rem;
    }

    .depositosiglesia-periodo-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .depositosiglesia-modal-grid {
        grid-template-columns: 1fr;
    }

    .depositosiglesia-modal-body {
        padding: 1.5rem;
    }

    .depositosiglesia-modal-footer {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    #depositosiglesia-page-wrapper {
        padding: 0.75rem;
    }

    #depositosiglesia-header {
        padding: 1.5rem 1rem;
    }

    #depositosiglesia-header-icon {
        width: 3rem;
        height: 3rem;
    }

        #depositosiglesia-header-icon svg {
            width: 1.5rem;
            height: 1.5rem;
        }

    #depositosiglesia-header-title {
        font-size: 1.125rem;
    }

    #depositosiglesia-header-subtitle {
        font-size: 1rem;
    }

    #depositosiglesia-form-container {
        padding: 1.25rem;
    }

    .depositosiglesia-form-group {
        margin-bottom: 1.25rem;
    }

    .depositosiglesia-input,
    .depositosiglesia-select {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }

    .depositosiglesia-btn-submit {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }

    .depositosiglesia-periodo-section {
        padding: 1.25rem;
    }

    .depositosiglesia-modal-total {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Estados de validación */
.depositosiglesia-input:invalid:not(:placeholder-shown),
.depositosiglesia-select:invalid:not([value="0"]) {
    border-color: #ef4444;
}

.depositosiglesia-input:valid:not(:placeholder-shown),
.depositosiglesia-select:valid:not([value="0"]) {
    border-color: var(--depositosiglesia-success);
}

/* Animación de carga */
@keyframes depositosiglesiaLoading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.depositosiglesia-loading {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--depositosiglesia-white);
    border-radius: 50%;
    animation: depositosiglesiaLoading 0.8s linear infinite;
}

/* Accesibilidad */
.depositosiglesia-input:focus-visible,
.depositosiglesia-select:focus-visible,
.depositosiglesia-btn-submit:focus-visible,
.depositosiglesia-btn-edit:focus-visible {
    outline: 3px solid var(--depositosiglesia-primary);
    outline-offset: 2px;
}

/* Transiciones suaves */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Optimización de fuentes */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
