/* ===== PLANTILLA iOS STYLE PARA WEB =====
   Colores principales definidos como variables CSS para fácil personalización
   ========================================================================= */

:root {
    /* COLORES PRINCIPALES - Cambiar aquí para personalizar toda la plantilla */
    /*--ios-blue: #007AFF;           /* Azul principal de iOS */
    --ios-blue: #091c47 ;           /* Azul principal de iOS */
    --ios-blue-dark: #0056CC;      /* Azul oscuro para hover */
    --ios-green: #34C759;          /* Verde de éxito */
    --ios-red: #FF3B30;            /* Rojo de error */
    --ios-orange: #FF9500;         /* Naranja de advertencia */
    --ios-gray: #8E8E93;           /* Gris secundario */
    --ios-gray-med: #dbdbdd;           /* Gris secundario */
    --ios-light-gray: #F2F2F7;     /* Gris claro para fondos */
    --ios-dark-gray: #1C1C1E;      /* Gris oscuro para texto */
    --ios-white: #FFFFFF;          /* Blanco */
    --ios-shadow: rgba(0, 0, 0, 0.1); /* Sombra suave */

    /* TIPOGRAFÍA */
    --ios-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ios-border-radius: 12px;     /* Radio de bordes redondeados */
    --ios-transition: all 0.3s ease; /* Transición suave */
}
        .ios-style-section {
            margin-bottom: 40px;
            padding: 30px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
        }
        .ios-style-title {
            color: var(--ios-blue);
            font-weight: 700;
            margin-bottom: 20px;
            border-bottom: 2px solid var(--ios-light-gray);
            padding-bottom: 10px;
        } 
/* ===== ESTILOS GENERALES ===== */
body {
    font-family: var(--ios-font);
    background-color: var(--ios-light-gray);
    color: var(--ios-dark-gray);
    line-height: 1.6;
}
/* ===== BACKGROUND ESTILO iOS ===== */
.bg-ios-primary {
    background-color: var(--ios-blue);
}


/* ===== TEXT ESTILO iOS ===== */
.text-ios-white {
    color: white;
}


/* ===== BOTONES ESTILO iOS ===== */
.btn-ios {
    border-radius: var(--ios-border-radius);
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    transition: var(--ios-transition);
    font-size: 16px;
    box-shadow: 0 2px 8px var(--ios-shadow);
}

.btn-ios-primary {
    background-color: var(--ios-blue);
    color: var(--ios-white);
}

.btn-ios-primary:hover {
    background-color: var(--ios-blue-dark);
    color: var(--ios-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--ios-shadow);
}

.btn-ios-success {
    background-color: var(--ios-green);
    color: var(--ios-white);
}

.btn-ios-danger {
    background-color: var(--ios-red);
    color: var(--ios-white);
}

.btn-ios-warning {
    background-color: var(--ios-orange);
    color: var(--ios-white);
}

.btn-ios-secondary {
    background-color: var(--ios-gray);
    color: var(--ios-white);
}

/* Botón outline estilo iOS */
.btn-ios-outline {
    background-color: transparent;
    border: 2px solid var(--ios-blue);
    color: var(--ios-blue);
}

.btn-ios-outline:hover {
    background-color: var(--ios-blue);
    color: var(--ios-white);
}

/* ===== FORMULARIOS ESTILO iOS ===== */
.form-ios {
    background: var(--ios-white);
    border-radius: var(--ios-border-radius);
    padding: 20px;
    box-shadow: 0 2px 16px var(--ios-shadow);
    margin-bottom: 20px;
}

.form-group-ios {
    margin-bottom: 12px;
}

.border-dotted{
    border: 1px dashed #999;
}

.form-label-ios {
    font-weight: 600;
    color: var(--ios-dark-gray);
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
    font-weight: bold;
}

.form-control-ios {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E5E5EA;
    border-radius: 10px;
    font-size: 14px;
    background-color: var(--ios-gray-med);
    transition: var(--ios-transition);
    font-family: var(--ios-font);
}

.form-control-ios:focus {
    outline: none;
    border-color: var(--ios-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Input File estilo iOS */
.file-input-ios {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-input-ios input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 2px dashed var(--ios-blue);
    border-radius: 10px;
    background-color: rgba(0, 122, 255, 0.05);
    color: var(--ios-blue);
    font-weight: 500;
    transition: var(--ios-transition);
}

.file-input-label:hover {
    background-color: rgba(0, 122, 255, 0.1);
}

.file-input-label i {
    margin-right: 8px;
    font-size: 18px;
}

/* ===== MODALES ESTILO iOS ===== */
.modal-ios .modal-content {
    border-radius: var(--ios-border-radius);
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-ios .modal-header {
    border-bottom: 1px solid #E5E5EA;
    padding: 20px;
    background-color: var(--ios-white);
    border-radius: var(--ios-border-radius) var(--ios-border-radius) 0 0;
}

.modal-ios .modal-title {
    font-weight: 700;
    color: var(--ios-dark-gray);
    font-size: 18px;
}

.modal-ios .modal-body {
    padding: 20px;
    background-color: var(--ios-white);
}

.modal-ios .modal-footer {
    border-top: 1px solid #E5E5EA;
    padding: 20px;
    background-color: var(--ios-white);
    border-radius: 0 0 var(--ios-border-radius) var(--ios-border-radius);
}

/* ===== ALERTAS ESTILO iOS ===== */
.alert-ios {
    border-radius: var(--ios-border-radius);
    border: none;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px var(--ios-shadow);
}

.alert-ios i {
    margin-right: 12px;
    font-size: 18px;
}

.alert-ios-success {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--ios-green);
    border-left: 4px solid var(--ios-green);
}

.alert-ios-danger {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--ios-red);
    border-left: 4px solid var(--ios-red);
}

.alert-ios-warning {
    background-color: rgba(255, 149, 0, 0.1);
    color: var(--ios-orange);
    border-left: 4px solid var(--ios-orange);
}

.alert-ios-info {
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--ios-blue);
    border-left: 4px solid var(--ios-blue);
}

/* ===== LOADERS ESTILO iOS ===== */
.loader-ios {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 122, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--ios-blue);
    animation: spin-ios 1s ease-in-out infinite;
}

.loader-ios-large {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

@keyframes spin-ios {
    to { transform: rotate(360deg); }
}

/* Overlay de loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: var(--ios-white);
    padding: 30px;
    border-radius: var(--ios-border-radius);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ===== CARDS ESTILO iOS ===== */
.card-ios {
    background: var(--ios-white);
    border-radius: var(--ios-border-radius);
    box-shadow: 0 2px 16px var(--ios-shadow);
    border: none;
    margin-bottom: 20px;
    overflow: hidden;
}

.card-ios-header {
    padding: 20px;
    border-bottom: 1px solid #E5E5EA;
    background-color: var(--ios-white);
}

.card-ios-body {
    padding: 20px;
}

.card-ios-footer {
    padding: 20px;
    border-top: 1px solid #E5E5EA;
    background-color: #FAFAFA;
}

/* ===== WIZARD ESTILO iOS ===== */
.wizard-ios {
    background: var(--ios-white);
    border-radius: var(--ios-border-radius);
    box-shadow: 0 2px 16px var(--ios-shadow);
    overflow: hidden;
}

.wizard-header {
    padding: 20px;
    border-bottom: 1px solid #E5E5EA;
    background: linear-gradient(135deg, var(--ios-blue), var(--ios-blue-dark));
    color: var(--ios-white);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.wizard-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 10px;
}

.wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #E5E5EA;
    transform: translateY(-50%);
    z-index: 1;
}

.wizard-step.active:not(:last-child)::after {
    background-color: var(--ios-blue);
}

.wizard-step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #E5E5EA;
    color: var(--ios-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.wizard-step.active .wizard-step-number {
    background-color: var(--ios-blue);
    color: var(--ios-white);
}

.wizard-step.completed .wizard-step-number {
    background-color: var(--ios-green);
    color: var(--ios-white);
}

.wizard-step-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--ios-gray);
}

.wizard-step.active .wizard-step-title {
    color: var(--ios-blue);
    font-weight: 600;
}

.wizard-content {
    padding: 30px;
    min-height: 300px;
}

.wizard-actions {
    padding: 20px;
    border-top: 1px solid #E5E5EA;
    background-color: #FAFAFA;
    display: flex;
    justify-content: space-between;
}

/* ===== UTILIDADES ===== */
.text-ios-blue { color: var(--ios-blue); }
.text-ios-green { color: var(--ios-green); }
.text-ios-red { color: var(--ios-red); }
.text-ios-orange { color: var(--ios-orange); }
.text-ios-gray { color: var(--ios-gray); }

.bg-ios-blue { background-color: var(--ios-blue); }
.bg-ios-green { background-color: var(--ios-green); }
.bg-ios-red { background-color: var(--ios-red); }
.bg-ios-orange { background-color: var(--ios-orange); }
.bg-ios-light { background-color: var(--ios-light-gray); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wizard-steps {
        flex-direction: column;
        gap: 10px;
    }

    .wizard-step:not(:last-child)::after {
        display: none;
    }

    .wizard-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-ios {
        width: 100%;
    }
}

/* ===== ANIMACIONES ADICIONALES ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Campo inválido (rojo iOS) */
.is-invalid-ios {
    border-color: var(--ios-red) !important;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15) !important;
}

/* Campo válido (azul iOS opcional) */
.is-valid-ios {
    border-color: var(--ios-green) !important;
    box-shadow: 0 0 0 3px rgba(52,199,89,0.15) !important;
}

/* Mensaje de error */
.label.error, .field-error-ios {
    color: var(--ios-red);
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
}