    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            padding: 40px;
            max-width: 1400px;
            margin: 0 auto;
            animation: slideIn 0.6s ease-out;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
        }

        .header h1 {
            color: #2c3e50;
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .header p {
            color: #7f8c8d;
            font-size: 1.1rem;
        }

        .login-form {
            background: white;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
            max-width: 500px;
            margin: 0 auto 20px auto;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #000000;
            font-weight: 600;
        }

        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #ddd;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: white;
            color: #000000;
        }

        .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 5px;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .btn-success {
            background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
        }

        .btn-warning {
            background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
        }

        .btn-danger {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
        }

        .btn-download {
            background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
            padding: 6px 12px;    /* ← CAMBIO: de 8px 16px a 6px 12px */
            font-size: 13px;      /* ← CAMBIO: de 14px a 13px */
        }

        .books-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-top: 30px;
        }

         .book-card {
                background: white;
                padding: 15px;  /* ← CAMBIO AQUÍ: de 20px a 15px */
                border-radius: 15px;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
                transition: all 0.3s ease;
                border-left: 5px solid #667eea;
            }

        .book-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        }

        .book-cover {
            width: 100%;
            height: 180px;     /* ← CAMBIO: de 200px a 180px */
            background: #f8f9fa;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 15px;
            font-size: 2.5rem;  /* ← CAMBIO: de 3rem a 2.5rem */
            color: #667eea;
        }
         .book-title {
            font-size: 1.2rem;    /* ← CAMBIO: de 1.3rem a 1.2rem */
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 10px;
            line-height: 1.3;     /* ← AÑADIR esta línea */
        }

        .book-author {
            color: #7f8c8d;
            margin-bottom: 10px;
        }

        .book-description {
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 15px;
            line-height: 1.4;
        }

        .book-category {
            background: #667eea;
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            display: inline-block;
            margin-bottom: 15px;
        }

        .book-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .user-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: rgba(102, 126, 234, 0.1);
            border-radius: 10px;
            margin-bottom: 20px;
        }

        .search-bar {
            background: white;
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
        }

        .search-filters {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            align-items: end;
        }

        .hidden {
            display: none;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: #666;
            font-size: 1.2rem;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: white;
            padding: 20px;
            border-radius: 15px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .stat-number {
            font-size: 2rem;
            font-weight: bold;
            color: #667eea;
        }

        .stat-label {
            color: #666;
            margin-top: 5px;
        }

        /* TOAST NOTIFICATIONS - ZONA DE CONTENIDO PRINCIPAL */
        .toast-container {
            position: relative;
            z-index: 1000;
            max-width: 100%;
            width: 100%;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 20px 0;
        }

        .toast {
            background: white;
            border-radius: 15px;
            padding: 20px 24px;
            margin-bottom: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
            border-left: 6px solid;
            display: flex;
            align-items: center;
            gap: 16px;
            min-width: 350px;
            max-width: 600px;
            opacity: 0;
            transform: translateY(-20px);
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            pointer-events: auto;
            position: relative;
            overflow: hidden;
            width: 100%;
        }

        .toast.show {
            opacity: 1;
            transform: translateY(0);
        }

        .toast.hide {
            opacity: 0;
            transform: translateY(-20px);
            margin-bottom: 0;
            padding-top: 0;
            padding-bottom: 0;
            max-height: 0;
        }

        .toast-success {
            border-left-color: #4caf50;
            background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
            box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
        }

        .toast-error {
            border-left-color: #f44336;
            background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
            box-shadow: 0 8px 32px rgba(244, 67, 54, 0.2);
        }

        .toast-warning {
            border-left-color: #ff9800;
            background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
            box-shadow: 0 8px 32px rgba(255, 152, 0, 0.2);
        }

        .toast-info {
            border-left-color: #2196f3;
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            box-shadow: 0 8px 32px rgba(33, 150, 243, 0.2);
        }

        .toast-icon {
            font-size: 22px;
            flex-shrink: 0;
            animation: bounce 0.6s ease-out 0.2s both;
        }

        @keyframes bounce {
            0% { transform: scale(0) rotate(-180deg); }
            50% { transform: scale(1.3) rotate(-90deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        .toast-success .toast-icon { color: #4caf50; }
        .toast-error .toast-icon { color: #f44336; }
        .toast-warning .toast-icon { color: #ff9800; }
        .toast-info .toast-icon { color: #2196f3; }

        .toast-content {
            flex: 1;
            font-weight: 600;
            font-size: 15px;
            line-height: 1.3;
            color: #2c3e50;
            font-family: 'Inter', sans-serif;
        }

        .toast-close {
            background: rgba(255, 255, 255, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.4);
            font-size: 14px;
            color: #666;
            cursor: pointer;
            padding: 6px;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }

        .toast-close:hover {
            background: rgba(255, 255, 255, 0.4);
            color: #333;
            transform: scale(1.1) rotate(90deg);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .toast-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 6px;
            background: rgba(255, 255, 255, 0.4);
            border-radius: 0 0 20px 20px;
            transition: width linear;
        }

        .toast-success .toast-progress { background: #4caf50; }
        .toast-error .toast-progress { background: #f44336; }
        .toast-warning .toast-progress { background: #ff9800; }
        .toast-info .toast-progress { background: #2196f3; }

        /* EFECTO DE PULSACIÓN MEJORADO */
        .toast-error {
            animation: pulse-error 2.5s infinite;
        }

        .toast-warning {
            animation: pulse-warning 3.5s infinite;
        }

        @keyframes pulse-error {
            0%, 100% { 
                box-shadow: 0 20px 60px rgba(244, 67, 54, 0.4);
                transform: scale(1) translateY(0);
            }
            50% { 
                box-shadow: 0 25px 80px rgba(244, 67, 54, 0.6), 0 0 30px rgba(244, 67, 54, 0.5);
                transform: scale(1.02) translateY(-2px);
            }
        }

        @keyframes pulse-warning {
            0%, 100% { 
                box-shadow: 0 20px 60px rgba(255, 152, 0, 0.4);
            }
            50% { 
                box-shadow: 0 25px 80px rgba(255, 152, 0, 0.5);
            }
        }

        /* OVERLAY MEJORADO PARA ZONA CENTRAL */
        .toast-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.15);
            backdrop-filter: blur(2px);
            z-index: 9998;
            pointer-events: none;
            opacity: 0;
            transition: all 0.4s ease;
        }

        .toast-overlay.show {
            opacity: 1;
        }

        /* ALERTAS BÁSICAS PARA LOGIN */
        .alert {
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            font-weight: 600;
            animation: slideInDown 0.3s ease-out;
        }

        @keyframes slideInDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .alert-success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .alert-error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .alert-warning {
            background: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }

        /* RESPONSIVE */
        /* RESPONSIVE */
@media (max-width: 1400px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
        .container {
            padding: 20px;
        }
        
        .header h1 {
            font-size: 2rem;
        }
        
        .books-grid {
            grid-template-columns: 1fr;
        }
        /* ... mantén todo el resto del código igual ... */
    }
         /* ===== DROPDOWN MODAL STYLES ===== */
    .dropdown-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .dropdown-modal-overlay.show {
        opacity: 1;
        pointer-events: all;
    }

.dropdown-modal {
    position: absolute;
    background: white;
    border-radius: 15px;
    width: 420px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(-10px);
    transition: transform 0.2s ease;
    border: 1px solid #e1e8ed;
    
    /* Posicionamiento inicial - se ajustará con JavaScript */
    top: 80px;
    right: 20px;
}

.dropdown-modal-overlay.show .dropdown-modal {
    transform: scale(1) translateY(0);
}

/* Flecha que apunta al botón */
.modal-arrow {
    position: absolute;
    top: -8px;
    right: 60px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid #e1e8ed;
    border-top: 1px solid #e1e8ed;
    z-index: 1001;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1002;
}

.modal-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.3em;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

/* ===== CAMPOS DE CONTRASEÑA CON BOTONES ===== */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
}

.password-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #8899a6;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: color 0.3s ease, background-color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* ===== VALIDACIONES DE CONTRASEÑA ===== */
.password-requirements {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    transition: all 0.3s ease;
}

.requirement.invalid .requirement-icon {
    background: #ffebee;
    color: #f44336;
}

.requirement.valid .requirement-icon {
    background: #e8f5e8;
    color: #4caf50;
}

.requirement.valid span {
    color: #4caf50;
    font-weight: 500;
}

.requirement.invalid span {
    color: #666;
}

/* ===== INDICADOR DE COINCIDENCIA DE CONTRASEÑAS ===== */
.password-match-indicator {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: none;
    transition: all 0.3s ease;
}

.password-match-indicator.match {
    display: block;
    background: #e8f5e8;
    color: #4caf50;
    border: 1px solid #c8e6c9;
}

.password-match-indicator.no-match {
    display: block;
    background: #ffebee;
    color: #f44336;
    border: 1px solid #ffcdd2;
}

/* ===== BOTONES DEL MODAL ===== */
.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: center;
}

.modal-buttons .btn {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-success:disabled {
    background: #cccccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* ===== ALERTS DENTRO DEL MODAL ===== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.4;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert i {
    margin-right: 10px;
    font-size: 14px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* ===== FORM GROUPS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

/* ===== POSICIONAMIENTO RESPONSIVE ===== */
@media (max-width: 768px) {
    .dropdown-modal {
        width: 95vw;
        max-width: 95vw;
        left: 2.5vw !important;
        right: auto !important;
        top: 60px !important;
    }
    
    .modal-arrow {
        right: 30px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-title {
        font-size: 1em;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .btn {
        flex: none;
    }
    
    .password-input-group input {
        padding: 10px 40px 10px 10px;
        font-size: 13px;
    }
    
    .password-toggle {
        right: 10px;
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .dropdown-modal {
        width: 100vw;
        left: 0 !important;
        top: 50px !important;
        border-radius: 15px 15px 0 0;
        max-height: calc(100vh - 50px);
    }
    
    .modal-arrow {
        display: none;
    }
}

/* ===== AJUSTES PARA EL BOTÓN PRINCIPAL ===== */
.user-info {
    position: relative;
}

/* Asegurar que el botón de cambiar contraseña tenga posición relativa */
.user-info .btn-info {
    position: relative;
}
    </style>