/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 50%, #f5f5f5 100%);
    min-height: 100vh;
    color: #2c3e50;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(52, 73, 94, 0.1);
}

.header h1 {
    color: #1a365d;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    text-align: center;
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Navegación */
.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav a {
    background: linear-gradient(45deg, #2d3748, #1a202c);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 55, 72, 0.3);
}

.nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 55, 72, 0.4);
    background: linear-gradient(45deg, #4a5568, #2d3748);
}

.nav a.active {
    background: linear-gradient(45deg, #1a365d, #2c5282);
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

/* Tarjetas de resumen */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card.total-prestado .value {
    color: #1a365d;
}

.stat-card.total-recuperado .value {
    color: #2d5016;
}

.stat-card.total-pendiente .value {
    color: #c53030;
}

.stat-card.prestamos-activos .value {
    color: #2c5282;
}

/* Formularios */
.form-container {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.form-container h2 {
    color: #1a365d;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

/* Botones */
.btn {
    background: linear-gradient(45deg, #2d3748, #1a202c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(45, 55, 72, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 55, 72, 0.4);
    background: linear-gradient(45deg, #4a5568, #2d3748);
}

.btn-success {
    background: linear-gradient(45deg, #2d5016, #1a365d);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.4);
    background: linear-gradient(45deg, #38a169, #2d5016);
}

.btn-danger {
    background: linear-gradient(45deg, #c53030, #9c2626);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(197, 48, 48, 0.4);
    background: linear-gradient(45deg, #e53e3e, #c53030);
}

.btn-warning {
    background: linear-gradient(45deg, #2c5282, #1a365d);
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.4);
    background: linear-gradient(45deg, #3182ce, #2c5282);
}

/* Tablas */
.table-container {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.5);
    overflow-x: auto;
}

.table-container h2 {
    color: #1a365d;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

th {
    background: linear-gradient(135deg, #1a365d, #2c5282);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:hover {
    background-color: rgba(26, 54, 93, 0.05);
}

/* Estados */
.estado-activo {
    background: #e6fffa;
    color: #2d5016;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #38a169;
}

.estado-pagado {
    background: #ebf8ff;
    color: #1a365d;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #2c5282;
}

.estado-moroso {
    background: #fed7d7;
    color: #c53030;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #e53e3e;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #e6fffa;
    color: #2d5016;
    border: 1px solid #38a169;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #e53e3e;
}

.alert-info {
    background: #ebf8ff;
    color: #1a365d;
    border: 1px solid #2c5282;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 10px;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    margin: 2% auto;
    padding: 20px;
    border-radius: 12px;
    width: 95%;
    max-width: 450px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* Modales responsivos */
@media (max-width: 768px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        margin: 1% auto;
        padding: 15px;
        width: 98%;
        max-width: none;
        border-radius: 8px;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 12px;
        margin: 0.5% auto;
        border-radius: 6px;
        max-height: 98vh;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    /* Hacer grids responsivos en móviles */
    .modal-content div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    
    .modal-content div[style*="grid-template-columns: 1fr 1fr"] > div {
        margin-bottom: 8px !important;
    }
}

/* Estilos compactos para formularios en modales */
.modal .form-group {
    margin-bottom: 12px;
}

.modal .form-group label {
    font-size: 0.9rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
}

.modal .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin: 4px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    background: none;
    border: none;
    padding: 5px;
    border-radius: 50%;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #e53e3e;
    transform: scale(1.1);
    background: rgba(229, 62, 62, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav a {
        width: 100%;
        text-align: center;
        max-width: 300px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        padding: 15px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px 10px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* ========================================
   MENSAJES DE BIENVENIDA Y DESPEDIDA
======================================== */

/* Mensaje de Bienvenida */
.welcome-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease-out;
}

.welcome-content {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: scaleIn 0.5s ease-out 0.2s forwards;
    max-width: 400px;
    width: 90%;
}

.welcome-content i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.welcome-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.welcome-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Mensaje de Despedida */
.goodbye-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease-out;
}

.goodbye-content {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: scaleIn 0.5s ease-out 0.2s forwards;
    max-width: 400px;
    width: 90%;
}

.goodbye-content i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.goodbye-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.goodbye-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Animaciones */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive para mensajes */
@media (max-width: 480px) {
    .welcome-content,
    .goodbye-content {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .welcome-content i,
    .goodbye-content i {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .welcome-content h3,
    .goodbye-content h3 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .welcome-content p,
    .goodbye-content p {
        font-size: 1rem;
    }
}

/* ========================================
   ESTILOS PARA HEADER DE USUARIO
======================================== */

/* Contenedor principal del header */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.header-left {
    flex: 1;
}

.header-right {
    flex-shrink: 0;
}

/* Menú de usuario */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.user-role {
    color: #7f8c8d;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Botón de cerrar sesión */
.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

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

.logout-btn span {
    font-weight: 600;
}

/* ========================================
   ESTILOS PARA TABLAS RESPONSIVAS
======================================== */

/* Contenedor responsivo para tablas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tabla compacta */
.compact-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

.compact-table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    font-size: 0.9rem;
}

.compact-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ecf0f1;
    vertical-align: top;
}

.compact-table tr:hover {
    background-color: #f8f9fa;
}

/* Información del cliente compacta */
.client-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-info strong {
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.2;
}

.client-info small {
    color: #7f8c8d;
    font-size: 0.8rem;
    line-height: 1.1;
}

/* Clases para ocultar/mostrar en diferentes dispositivos */
.show-mobile {
    display: none;
}

.show-mobile-block {
    display: none;
}

.hide-mobile {
    display: table-cell;
}

.hide-tablet {
    display: table-cell;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */

/* Tablets (768px y menos) */
@media (max-width: 768px) {
    .hide-tablet {
        display: none !important;
    }
    
    /* Header responsivo en tablets */
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-left {
        width: 100%;
    }
    
    .header-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    
    .user-menu {
        padding: 6px 10px;
        gap: 12px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .user-name {
        font-size: 0.9rem;
    }
    
    .user-role {
        font-size: 0.75rem;
    }
    
    .logout-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .compact-table {
        font-size: 0.9rem;
    }
    
    .compact-table th,
    .compact-table td {
        padding: 8px 6px;
    }
    
    .client-info strong {
        font-size: 0.9rem;
    }
    
    .client-info small {
        font-size: 0.75rem;
    }
}

/* Móviles (480px y menos) */
@media (max-width: 480px) {
    .hide-mobile {
        display: none !important;
    }
    
    /* Header responsivo en móviles */
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .header-left h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .header-left p {
        font-size: 0.9rem;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        width: 100%;
        max-width: 280px;
    }
    
    .user-info {
        justify-content: center;
        gap: 8px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .user-details {
        align-items: center;
        text-align: center;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .user-role {
        font-size: 0.7rem;
    }
    
    .logout-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .show-mobile {
        display: block;
        margin-top: 3px;
    }
    
    .show-mobile-block {
        display: block;
        margin-top: 3px;
        color: #7f8c8d;
        font-size: 0.75rem;
    }
    
    .compact-table {
        font-size: 0.85rem;
    }
    
    .compact-table th,
    .compact-table td {
        padding: 10px 8px;
    }
    
    .compact-table th {
        font-size: 0.85rem;
    }
    
    .client-info {
        gap: 3px;
    }
    
    .client-info strong {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .client-info small {
        font-size: 0.7rem;
    }
    
    /* Hacer las tablas más compactas en móvil */
    .table-container {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .table-container h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
}

/* Móviles muy pequeños (320px y menos) */
@media (max-width: 320px) {
    .compact-table {
        font-size: 0.8rem;
    }
    
    .compact-table th,
    .compact-table td {
        padding: 8px 4px;
    }
    
    .client-info strong {
        font-size: 0.8rem;
    }
    
    .client-info small {
        font-size: 0.65rem;
    }
}

/* ============================================
   MENSAJES DE ÉXITO CON FONT AWESOME
   ============================================ */

.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(72, 187, 120, 0.3);
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    max-width: 350px;
    min-width: 280px;
}

.success-message.show {
    transform: translateX(0);
    opacity: 1;
}

.success-message-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-message-icon {
    font-size: 1.5rem;
    animation: bounce 0.6s ease-in-out;
}

.success-message-text {
    flex: 1;
}

.success-message-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
    line-height: 1.2;
}

.success-message-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.2;
}

.success-message-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    opacity: 0.8;
}

.success-message-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

/* Animación de rebote para el ícono */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Variantes de colores para diferentes tipos de mensajes */
.success-message.client {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    box-shadow: 0 8px 32px rgba(66, 153, 225, 0.3);
}

.success-message.payment {
    background: linear-gradient(135deg, #48bb78, #38a169);
    box-shadow: 0 8px 32px rgba(72, 187, 120, 0.3);
}

.success-message.loan {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    box-shadow: 0 8px 32px rgba(237, 137, 54, 0.3);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .success-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
        transform: translateY(-100px);
    }
    
    .success-message.show {
        transform: translateY(0);
    }
    
    .success-message-content {
        gap: 10px;
    }
    
    .success-message-icon {
        font-size: 1.3rem;
    }
    
    .success-message-title {
        font-size: 0.9rem;
    }
    
    .success-message-subtitle {
        font-size: 0.8rem;
    }
}

/* ============================================
   ESTILOS ESPECÍFICOS PARA TABLA DE PAGOS
   ============================================ */

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-info strong {
    color: #2c5282;
    font-size: 0.9rem;
}

.payment-info small {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.3;
}

.amount-info {
    text-align: center;
}

.amount-large {
    font-size: 1.1rem;
    color: #22543d;
    font-weight: 700;
}

.client-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-details strong {
    color: #2d3748;
    font-size: 0.9rem;
}

.client-details small {
    color: #6c757d;
    font-size: 0.8rem;
}

.date-info {
    color: #6c757d;
    font-size: 0.85rem;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-state p {
    margin: 10px 0 5px 0;
    font-weight: 500;
    color: #4a5568;
}

.empty-state small {
    color: #a0aec0;
}

/* Responsive para tabla de pagos */
@media (max-width: 768px) {
    .payment-info {
        gap: 6px;
    }
    
    .payment-info strong {
        font-size: 0.85rem;
    }
    
    .amount-large {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .btn-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    .payment-info small {
        font-size: 0.75rem;
    }
    
    .amount-large {
        font-size: 0.95rem;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .btn-text {
        display: none;
    }
    
    .empty-state {
        padding: 30px 15px;
    }
    
    .empty-state i {
        font-size: 1.5rem !important;
    }
}

/* ============================================
   MODAL DE CONFIRMACIÓN DE ELIMINACIÓN
   ============================================ */

.modal-header-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.modal-header-danger i {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.modal-header-danger h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-body {
    padding: 25px;
}

.confirmation-message {
    margin-bottom: 20px;
}

.confirmation-message p {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: center;
}

.payment-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #3498db;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.9rem;
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-item strong {
    color: #2c3e50;
    font-weight: 600;
}

.warning-message {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.warning-message i {
    color: #f39c12;
    font-size: 1.2rem;
}

.warning-message span {
    color: #856404;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 0 25px 25px 25px;
}

.modal-buttons .btn {
    flex: 1;
    max-width: 150px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-buttons .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.modal-buttons .btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.modal-buttons .btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.modal-buttons .btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Animación de pulso para el ícono de advertencia */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive para modal de eliminación */
@media (max-width: 768px) {
    .modal-header-danger {
        padding: 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-header-danger h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .modal-buttons {
        flex-direction: column;
        padding: 0 15px 20px 15px;
    }
    
    .modal-buttons .btn {
        max-width: none;
        width: 100%;
    }
    
    .payment-summary {
        padding: 12px;
    }
    
    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .warning-message {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}
