* {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* ===== FONDO ELEGANTE CON COLORES INSTITUCIONALES ===== */
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 30%, #7aa5da 70%, #fdc12b 100%);
        min-height: 100vh;
        margin: 0;
        padding: 20px;
        background-attachment: fixed;
    }

    .container {
        max-width: 1000px;
        margin: 0 auto;
    }

    .header {
        text-align: center;
        margin-bottom: 30px;
        padding: 25px;
        background: rgba(255, 255, 255, 0.92);
        border-radius: 20px;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
        border-top: 5px solid #fdc12b;
        position: relative;
        overflow: hidden;
    }

    .header::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 5px;
        background: linear-gradient(90deg, #1e3a8a, #7aa5da, #fdc12b);
    }

    .header img {
        max-width: 220px;
        height: auto;
        margin-bottom: 15px;
        border-radius: 10px;
        /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        box-shadow: 0 6px 15px rgba(30, 58, 138, 0.3);
        border: 3px solid #7aa5da;
        background: rgba(253, 193, 43, 0.1);*/
    }

    .header h1 {
        color: #1e3a8a;
        font-size: 2.6em;
        margin-bottom: 12px;
        font-weight: 800;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
        letter-spacing: -0.5px;
    }

    .header p {
        color: #7aa5da;
        font-size: 1.2em;
        font-weight: 600;
        margin-top: 5px;
    }

    .form-container {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 20px;
        padding: 35px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.28);
        margin-bottom: 30px;
        border: 2px solid rgba(122, 165, 218, 0.4);
        position: relative;
        overflow: hidden;
    }

    .form-container::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, #1e3a8a, #7aa5da);
    }

    .form-title {
        color: #1e3a8a;
        font-size: 2em;
        margin-bottom: 28px;
        padding-bottom: 18px;
        border-bottom: 3px solid #7aa5da;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .form-title i {
        color: white;
        background: #1e3a8a;
        padding: 10px;
        border-radius: 50%;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
    }

    .form-group {
        margin-bottom: 22px;
    }

    .form-group label {
        display: block;
        color: #1e3a8a;
        font-weight: 700;
        margin-bottom: 10px;
        font-size: 1.05em;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .form-control {
        width: 100%;
        padding: 14px 18px;
        border: 2px solid #cbd5e1;
        border-radius: 10px;
        font-size: 1.05em;
        transition: all 0.35s ease;
        background: #f8fafc;
    }

    .form-control:focus {
        outline: none;
        border-color: #7aa5da;
        box-shadow: 0 0 0 4px rgba(122, 165, 218, 0.25);
        background: white;
    }

    /* Selector de cantidad de alumnos - AZUL INSTITUCIONAL */
    .selector-alumnos {
        background: linear-gradient(135deg, #f0f7ff 0%, #e0f0ff 100%);
        padding: 25px;
        border-radius: 18px;
        border: 2px solid #7aa5da;
        margin-bottom: 30px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    .selector-alumnos::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, #1e3a8a, #7aa5da);
    }

    .selector-alumnos h3 {
        color: #1e3a8a;
        margin-bottom: 20px;
        font-size: 1.4em;
        font-weight: 700;
    }

    .cantidad-selector {
        display: inline-flex;
        align-items: center;
        gap: 20px;
        background: white;
        padding: 18px 30px;
        border-radius: 60px;
        box-shadow: 0 6px 15px rgba(122, 165, 218, 0.25);
        border: 2px solid #7aa5da;
    }

    .cantidad-btn {
        width: 48px;
        height: 48px;
        border: none;
        background: #1e3a8a;
        color: white;
        border-radius: 50%;
        font-size: 1.8em;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
    }

    .cantidad-btn:hover {
        background: #7aa5da;
        transform: scale(1.15);
        box-shadow: 0 6px 15px rgba(122, 165, 218, 0.4);
    }

    .cantidad-btn:disabled {
        background: #94a3b8;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .cantidad-display {
        font-size: 2.4em;
        font-weight: 800;
        color: #1e3a8a;
        min-width: 60px;
        font-family: 'Arial', sans-serif;
    }

    .btn-generar {
        background: linear-gradient(135deg, #1e3a8a 0%, #7aa5da 100%);
        color: white;
        border: none;
        padding: 14px 40px;
        border-radius: 55px;
        font-size: 1.2em;
        font-weight: 700;
        cursor: pointer;
        margin-top: 20px;
        transition: all 0.35s ease;
        box-shadow: 0 6px 18px rgba(30, 58, 138, 0.4);
        letter-spacing: 0.5px;
    }

    .btn-generar:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 22px rgba(30, 58, 138, 0.55);
        background: linear-gradient(135deg, #7aa5da 0%, #1e3a8a 100%);
    }

    .btn-generar:active {
        transform: translateY(1px);
    }

    /* Rango de fechas general - AMARILLO DORADO */
    .rango-fechas-general {
        background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
        padding: 25px;
        border-radius: 18px;
        border: 2px solid #fdc12b;
        margin-bottom: 30px;
        position: relative;
        overflow: hidden;
    }

    .rango-fechas-general::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, #d4a017, #fdc12b);
    }

    .rango-fechas-general h3 {
        color: #854d0e;
        margin-bottom: 20px;
        font-size: 1.4em;
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 700;
    }

    .fecha-rango-general {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .alumno-container {
        background: #f8fafc;
        border-radius: 15px;
        padding: 25px;
        margin-bottom: 20px;
        border: 2px solid #e2e8f0;
        position: relative;
        transition: all 0.35s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .alumno-container:hover {
        box-shadow: 0 8px 20px rgba(122, 165, 218, 0.2);
        border-color: #7aa5da;
        transform: translateY(-2px);
    }

    .alumno-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid #7aa5da;
    }

    .alumno-header h3 {
        color: #1e3a8a;
        font-size: 1.35em;
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 700;
    }

    .btn-eliminar-alumno {
        background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 10px;
        font-size: 0.95em;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
    }

    .btn-eliminar-alumno:hover {
        transform: scale(1.05);
        box-shadow: 0 5px 12px rgba(239, 68, 68, 0.45);
        background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    }

    .info-alumno-display {
        background: white;
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 20px;
        border-left: 5px solid #7aa5da;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }

    .info-alumno-display p {
        margin: 10px 0;
        color: #1e293b;
        font-size: 1.05em;
        line-height: 1.5;
    }

    .info-alumno-display strong {
        color: #1e3a8a;
        display: inline-block;
        min-width: 140px;
        font-weight: 700;
    }

    /* Botón BUSCAR - AZUL INSTITUCIONAL */
    .rne-search-container {
        display: flex;
        gap: 15px;
        align-items: center;
    }

    .rne-search-container .form-control {
        flex: 1;
        margin-bottom: 0;
        border-radius: 10px 0 0 10px;
    }

    .btn-buscar {
        background: linear-gradient(135deg, #1e3a8a 0%, #7aa5da 100%);
        color: white;
        border: none;
        padding: 14px 25px;
        border-radius: 0 10px 10px 0;
        font-size: 1.05em;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(30, 58, 138, 0.35);
        min-width: 120px;
    }

    .btn-buscar:hover {
        background: linear-gradient(135deg, #7aa5da 0%, #1e3a8a 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(30, 58, 138, 0.5);
    }

    .btn-buscar:active {
        transform: translateY(0);
    }

    .btn-buscar i {
        margin-right: 6px;
        font-size: 1.1em;
    }

    /* Botón GUARDAR - AMARILLO DORADO (destacado) */
    .btn-guardar {
        background: linear-gradient(135deg, #d4a017 0%, #fdc12b 100%);
        color: #1e3a8a;
        border: 2px solid #1e3a8a;
        padding: 18px 45px;
        border-radius: 15px;
        font-size: 1.35em;
        font-weight: 800;
        cursor: pointer;
        width: 100%;
        margin-top: 25px;
        transition: all 0.4s ease;
        box-shadow: 0 8px 25px rgba(253, 193, 43, 0.5);
        letter-spacing: 1px;
        position: relative;
        overflow: hidden;
    }

    .btn-guardar:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(253, 193, 43, 0.7);
        background: linear-gradient(135deg, #fdc12b 0%, #e6a700 100%);
    }

    .btn-guardar:active {
        transform: translateY(1px);
    }

    .btn-guardar i {
        margin-right: 10px;
        font-size: 1.3em;
    }

    /* Documentos adjuntos */
    .file-upload {
        border: 2px dashed #7aa5da;
        border-radius: 15px;
        padding: 30px;
        text-align: center;
        background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
        cursor: pointer;
        transition: all 0.35s ease;
        position: relative;
        overflow: hidden;
    }

    .file-upload:hover {
        background: linear-gradient(135deg, #e0f0ff 0%, #d0e8ff 100%);
        border-color: #1e3a8a;
        transform: scale(1.03);
        box-shadow: 0 8px 20px rgba(122, 165, 218, 0.25);
    }

    .file-upload i {
        font-size: 3.5em;
        color: #7aa5da;
        margin-bottom: 15px;
        text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    }

    .file-upload p {
        color: #1e3a8a;
        margin: 12px 0;
        font-weight: 600;
        font-size: 1.1em;
    }

    .file-upload small {
        color: #b91c1c;
        font-size: 0.9em;
        font-weight: 600;
    }

    #file-name-display {
        margin-top: 15px;
        min-height: 25px;
    }

    #file-name-display span {
        display: inline-block;
        background: linear-gradient(135deg, #1e3a8a 0%, #7aa5da 100%);
        color: white;
        padding: 8px 15px;
        border-radius: 20px;
        margin-right: 8px;
        margin-bottom: 8px;
        font-size: 0.95em;
        font-weight: 600;
        box-shadow: 0 3px 8px rgba(30, 58, 138, 0.3);
    }

    /* Mensajes */
    .mensaje {
        padding: 20px 25px;
        border-radius: 15px;
        margin-bottom: 25px;
        font-weight: 700;
        font-size: 1.1em;
        display: none;
        position: relative;
        border-left: 5px solid;
    }

    .mensaje.exito {
        background: #d1fae5;
        color: #065f46;
        border: 1px solid #6ee7b7;
        border-left-color: #10b981;
        display: block;
    }

    .mensaje.error {
        background: #fee2e2;
        color: #991b1b;
        border: 1px solid #fca5a5;
        border-left-color: #ef4444;
        display: block;
    }

    .loading {
        display: none;
        text-align: center;
        padding: 25px;
    }

    .loading-spinner {
        border: 5px solid rgba(255, 255, 255, 0.3);
        border-top: 5px solid #7aa5da;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        animation: spin 1s linear infinite;
        margin: 0 auto 15px;
        box-shadow: 0 0 15px rgba(122, 165, 218, 0.4);
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* Datos del solicitante */
    .datos-solicitante {
        background: linear-gradient(135deg, #f8f9fa 0%, #e8f4ff 100%);
        padding: 30px;
        border-radius: 18px;
        border: 2px solid #7aa5da;
        margin-top: 25px;
        margin-bottom: 25px;
    }

    .datos-solicitante .form-title {
        margin-top: 0;
        margin-bottom: 25px;
        color: #1e3a8a;
        font-size: 1.6em;
    }

    @media (max-width: 768px) {
        .header h1 {
            font-size: 2.1em;
        }

        .form-container {
            padding: 25px;
        }

        .fecha-rango-general {
            grid-template-columns: 1fr;
        }

        .btn-guardar {
            font-size: 1.15em;
            padding: 16px 35px;
        }

        .cantidad-selector {
            flex-direction: column;
            gap: 15px;
        }

        .cantidad-display {
            font-size: 2em;
        }
        
        .rne-search-container {
            flex-direction: column;
            gap: 10px;
        }
        
        .btn-buscar {
            width: 100%;
            border-radius: 10px;
        }
    }
    
    @media (max-width: 480px) {
        .header img {
            max-width: 180px;
        }
        
        .header h1 {
            font-size: 1.9em;
        }
        
        .form-title {
            font-size: 1.7em;
        }
        
        .btn-guardar {
            font-size: 1.1em;
            padding: 15px 30px;
        }
    }
    /* === Modal de Búsqueda por Nombre === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.busqueda-nombre-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.busqueda-nombre-container .form-control {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.busqueda-nombre-container .form-control:focus {
    outline: none;
    border-color: #667eea;
}

.btn-buscar-nombre {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-buscar-nombre:hover {
    background: #5568d3;
}

.loading-busqueda {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.95rem;
}

.loading-busqueda i {
    margin-right: 8px;
    color: #667eea;
}

.resultados-busqueda {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.resultados-busqueda table {
    width: 100%;
    border-collapse: collapse;
}

.resultados-busqueda th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.9rem;
}

.resultados-busqueda td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.resultados-busqueda tr:hover {
    background: #f8f9ff;
}

.resultados-busqueda tr:last-child td {
    border-bottom: none;
}

.btn-seleccionar-alumno {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-seleccionar-alumno:hover {
    background: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.4);
}

.btn-seleccionar-alumno i {
    font-size: 0.9rem;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    border-radius: 0 0 12px 12px;
}

.btn-cancelar {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-cancelar:hover {
    background: #5a6268;
}

.sin-resultados {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.sin-resultados i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

/* === Botón Amarillo para Buscar por Nombre === */
.btn-buscar-nombre-amarillo {
    background: #ffc107 !important;
    color: #212529 !important;
    border: 2px solid #e0a800 !important;
}

.btn-buscar-nombre-amarillo:hover {
    background: #e0a800 !important;
    border-color: #d39e00 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5) !important;
}

.btn-buscar-nombre-amarillo i {
    margin-right: 5px;
}

/* Responsive para móvil */
@media (max-width: 600px) {
    .busqueda-nombre-container {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .resultados-busqueda table {
        font-size: 0.85rem;
    }
    
    .resultados-busqueda th,
    .resultados-busqueda td {
        padding: 10px 12px;
    }
}
/* Grupo de botones de búsqueda */
.rne-search-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.rne-search-container .form-control {
    flex: 1;
    min-width: 200px;
}

.btn-group-buscar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
}

.btn-buscar {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-buscar:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-buscar:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-buscar i {
    font-size: 0.95rem;
}

/* Responsive para los botones */
@media (max-width: 768px) {
    .rne-search-container {
        flex-direction: column;
    }
    
    .btn-group-buscar {
        flex-direction: row;
        width: 100%;
    }
    
    .btn-group-buscar .btn-buscar {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}