/* ========== ESTILOS GENERALES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Barra lateral */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1f2e 0%, #2d3349 100%);
    color: #fff;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    overflow-y: auto;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.user-profile {
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    position: relative;
}

.user-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: white;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    overflow: hidden;
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-avatar:hover { transform: scale(1.05); }
.user-name { font-size: 20px; font-weight: 700; margin-bottom: 5px; letter-spacing: 0.5px; }
.user-role { font-size: 14px; color: #a0aec0; background: rgba(255,255,255,0.1); display: inline-block; padding: 4px 12px; border-radius: 20px; }

/* Botón flotante de notificaciones */
.floating-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s;
    border: 3px solid white;
}
.floating-notification:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.floating-notification .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: #ff6b6b;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid #ff6b6b;
}
.notification-panel {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    display: none;
    animation: slideIn 0.3s;
}
.notification-panel.active {
    display: block;
}
.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notification-header h3 {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
}
.notification-header span {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
}
.notification-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}
.notification-item {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s;
    cursor: pointer;
}
.notification-item:hover {
    background: #f8fafc;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item.critical {
    border-left: 4px solid #ff6b6b;
}
.notification-item.warning {
    border-left: 4px solid #f39c12;
}
.notification-item .empresa {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}
.notification-item .deuda {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 14px;
}
.notification-item .fecha {
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}
.notification-footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}
.notification-footer button {
    background: none;
    border: none;
    color: #4ecdc4;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}
.notification-footer button:hover {
    text-decoration: underline;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-menu { padding: 20px 0; }
.nav-item { list-style: none; margin: 4px 0; }
.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: #a0aec0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), transparent);
    transition: width 0.3s;
}
.nav-link:hover::before { width: 100%; }
.nav-link:hover {
    color: white;
    border-left-color: #ff6b6b;
    background: rgba(255,255,255,0.05);
}
.nav-link.active {
    background: linear-gradient(90deg, rgba(255,107,107,0.2), transparent);
    color: white;
    border-left-color: #ff6b6b;
}
.nav-icon { margin-right: 15px; font-size: 22px; width: 24px; text-align: center; }

.submenu {
    background: rgba(0,0,0,0.2);
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}
.submenu.expanded { max-height: 300px; }
.submenu-item {
    padding: 12px 25px 12px 64px;
    font-size: 14px;
    color: #a0aec0;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.submenu-item:hover {
    color: white;
    background: rgba(255,255,255,0.05);
    padding-left: 70px;
}
.submenu-item::before {
    content: "▹";
    position: absolute;
    left: 45px;
    color: #ff6b6b;
    opacity: 0.8;
}
.dropdown-icon {
    margin-left: auto;
    transition: transform 0.4s;
    font-size: 12px;
    color: #a0aec0;
}
.rotated { transform: rotate(90deg); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); margin: 15px 25px; }

/* Contenido principal */
.main-content {
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}
.content-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    min-height: calc(100vh - 60px);
    border: 1px solid rgba(255,255,255,0.2);
}
h1 {
    background: linear-gradient(135deg, #1a1f2e, #2d3349);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Cabeceras y botones */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.stats-badge {
    background: linear-gradient(135deg, #4ecdc4, #45b7af);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(78,205,196,0.2);
}
.header-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-agregar {
    background: linear-gradient(135deg, #4ecdc4, #45b7af);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 15px rgba(78,205,196,0.3);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-agregar:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(78,205,196,0.4);
}
.btn-exportar {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(52,152,219,0.3);
}
.btn-exportar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(52,152,219,0.4);
}
.btn-pdf {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(231,76,60,0.3);
}
.btn-pdf:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(231,76,60,0.4);
}
.btn-importar {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(243,156,18,0.3);
}
.btn-importar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(243,156,18,0.4);
}
.btn-pagar {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(16,185,129,0.3);
}
.btn-pagar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(16,185,129,0.4);
}

/* Tablas */
.table-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}
th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}
td {
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
    font-size: 14px;
}
tr { transition: all 0.3s; }
tbody tr:hover {
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider {
    background: linear-gradient(135deg, #4ecdc4, #45b7af);
}
input:checked + .slider:before { transform: translateX(26px); }
.estado-badge { display: inline-flex; align-items: center; gap: 8px; }
.estado-texto { font-size: 13px; font-weight: 600; color: #4a5568; }

/* Acciones */
.acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-editar {
    background: linear-gradient(135deg, #f6c445, #f5b041);
    color: white; border: none; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.3s; box-shadow: 0 2px 4px rgba(246,196,69,0.2);
}
.btn-editar:hover {
    background: linear-gradient(135deg, #f5b041, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(246,196,69,0.3);
}
.btn-ver {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white; border: none; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.3s; box-shadow: 0 2px 4px rgba(52,152,219,0.2);
}
.btn-ver:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52,152,219,0.3);
}
.btn-devolucion {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white; border: none; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.3s; box-shadow: 0 2px 4px rgba(243,156,18,0.2);
}
.btn-devolucion:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(243,156,18,0.3);
}
.btn-eliminar {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white; border: none; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.3s; box-shadow: 0 2px 4px rgba(255,107,107,0.2);
}
.btn-eliminar:hover {
    background: linear-gradient(135deg, #ee5a5a, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255,107,107,0.3);
}
.btn-trabajadores {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white; border: none; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.3s; box-shadow: 0 2px 4px rgba(155,89,182,0.2);
}
.btn-trabajadores:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(155,89,182,0.3);
}
.btn-pagar-empresa {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white; border: none; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.3s; box-shadow: 0 2px 4px rgba(16,185,129,0.2);
}
.btn-pagar-empresa:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16,185,129,0.3);
}
.btn-pdf-empresa {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white; border: none; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.3s; box-shadow: 0 2px 4px rgba(231,76,60,0.2);
}
.btn-pdf-empresa:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231,76,60,0.3);
}

/* Estilos para ventas */
.ventas-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.ventas-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.ventas-col {
    flex: 1 1 300px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}
.ventas-col h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}
.form-group-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}
.radio-group {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}
.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4a5568;
    font-weight: 500;
}
.select-group {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}
.select-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4a5568;
    font-weight: 500;
}
.producto-buscar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}
.producto-buscar input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
}
.empresa-buscar {
    position: relative;
    width: 100%;
}
.empresa-buscar input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
}
.sugerencias {
    position: absolute;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.sugerencias div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
}
.sugerencias div:hover {
    background: #f1f5f9;
}
.tabla-detalle {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}
.tabla-detalle th, .tabla-detalle td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.tabla-detalle th {
    background: #edf2f7;
    font-weight: 600;
    color: #4a5568;
}
.tabla-detalle td input {
    width: 90px;
    padding: 5px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
}
.total-venta {
    font-size: 24px;
    font-weight: 700;
    color: #ff6b6b;
    text-align: right;
    margin: 20px 0;
}
.btn-registrar {
    background: linear-gradient(135deg, #4ecdc4, #45b7af);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(78,205,196,0.3);
}
.btn-registrar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(78,205,196,0.4);
}

/* Paginación y búsqueda */
.pagination-section {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; background: white; padding: 20px; border-radius: 16px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid #e2e8f0;
}
.rows-per-page {
    display: flex; align-items: center; gap: 12px; background: #f8fafc; padding: 8px 16px; border-radius: 30px;
}
.rows-per-page label { font-size: 13px; font-weight: 600; color: #4a5568; }
.rows-select {
    padding: 8px 16px; border: 2px solid #e2e8f0; border-radius: 20px; font-size: 13px; font-weight: 600; background: white; cursor: pointer; transition: all 0.3s;
}
.rows-select:hover { border-color: #ff6b6b; }
.pagination-controls { display: flex; gap: 6px; align-items: center; }
.page-btn {
    min-width: 40px; height: 40px; border: 2px solid #e2e8f0; background: white; border-radius: 10px; cursor: pointer; font-weight: 600; color: #4a5568; transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
.page-btn:hover:not(:disabled) {
    background: #ff6b6b; border-color: #ff6b6b; color: white; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(255,107,107,0.3);
}
.page-btn.active { background: #ff6b6b; border-color: #ff6b6b; color: white; }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-info { font-size: 14px; color: #4a5568; font-weight: 500; margin: 0 10px; }

/* Barra de búsqueda mejorada */
.search-enhanced {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}
.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.search-field label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-field input, .search-field select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}
.search-field input:focus, .search-field select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 4px rgba(255,107,107,0.1);
}
.search-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}
.btn-search {
    background: linear-gradient(135deg, #4ecdc4, #45b7af);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(78,205,196,0.3);
}
.btn-clear {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.btn-clear:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}
.search-stats {
    background: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    color: #4a5568;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #e2e8f0;
}
.search-stats span {
    font-weight: 700;
    color: #ff6b6b;
}

/* Estilos para pagos */
.pagos-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.pagos-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}
.pagos-card h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.empresa-pago-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
    cursor: pointer;
}
.empresa-pago-item:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16,185,129,0.1);
}
.empresa-pago-item.selected {
    border-color: #10b981;
    background: #f0fdf4;
}
.empresa-pago-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.empresa-pago-nombre {
    font-size: 18px;
    font-weight: 700;
    color: #1a1f2e;
}
.empresa-pago-ruc {
    font-size: 14px;
    color: #718096;
    background: #e2e8f0;
    padding: 4px 12px;
    border-radius: 20px;
}
.empresa-pago-detalles {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.empresa-pago-saldo {
    text-align: center;
    flex: 1;
}
.empresa-pago-saldo label {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}
.empresa-pago-saldo .monto {
    font-size: 20px;
    font-weight: 700;
}
.empresa-pago-saldo .adeudado {
    color: #ff6b6b;
}
.empresa-pago-saldo .disponible {
    color: #10b981;
}
.empresa-pago-saldo .limite {
    color: #3498db;
}
.pago-form {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}
.pago-monto-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin: 20px 0;
}
.pago-monto-input {
    flex: 1;
}
.pago-monto-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}
.pago-monto-input input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}
.pago-monto-input input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.1);
}
.pago-metodos {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}
.pago-metodo-option {
    flex: 1;
    min-width: 100px;
}
.pago-metodo-option input[type="radio"] {
    display: none;
}
.pago-metodo-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
}
.pago-metodo-option input[type="radio"]:checked + label {
    background: #10b981;
    border-color: #10b981;
    color: white;
}
.pago-metodo-option label:hover {
    border-color: #10b981;
}
.pago-info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
}
.pago-info p {
    margin: 5px 0;
    color: #0066cc;
    font-size: 14px;
}
.pago-info .monto-destacado {
    font-size: 18px;
    font-weight: 700;
    color: #0066cc;
}
.btn-procesar-pago {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(16,185,129,0.3);
}
.btn-procesar-pago:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(16,185,129,0.4);
}
.btn-procesar-pago:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modales */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 1000; justify-content: center; align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: white; border-radius: 24px; width: 90%; max-width: 700px; box-shadow: 0 30px 60px rgba(0,0,0,0.3); animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid rgba(255,255,255,0.2);
}
.modal-content.large { max-width: 900px; }
.modal-content.small { max-width: 500px; }
@keyframes modalSlideIn {
    from { transform: translateY(-30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-header {
    padding: 25px 30px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #f8fafc, #f1f5f9); border-radius: 24px 24px 0 0;
}
.modal-header h2 {
    background: linear-gradient(135deg, #1a1f2e, #2d3349); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-size: 22px; font-weight: 700;
}
.modal-close {
    background: none; border: none; font-size: 28px; cursor: pointer; color: #a0aec0; transition: all 0.3s; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.modal-close:hover { background: #ff6b6b; color: white; transform: rotate(90deg); }
.modal-body { padding: 30px; max-height: 70vh; overflow-y: auto; }
.form-group { margin-bottom: 25px; }
.form-group label {
    display: block; margin-bottom: 10px; color: #4a5568; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 16px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 15px; transition: all 0.3s; background: #f8fafc;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #ff6b6b; box-shadow: 0 0 0 4px rgba(255,107,107,0.1); background: white;
}
.modal-footer {
    padding: 20px 30px 30px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid #e2e8f0;
}
.btn-cancelar {
    background: #e2e8f0; color: #4a5568; border: none; padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.btn-cancelar:hover { background: #cbd5e0; transform: translateY(-2px); }
.btn-agregar-modal {
    background: linear-gradient(135deg, #4ecdc4, #45b7af); color: white; border: none; padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 6px rgba(78,205,196,0.2);
}
.btn-agregar-modal:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(78,205,196,0.3); }
.btn-guardar-modal {
    background: linear-gradient(135deg, #f6c445, #f5b041); color: white; border: none; padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 6px rgba(246,196,69,0.2);
}
.btn-guardar-modal:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(246,196,69,0.3); }

/* Mini modales */
.mini-modal {
    display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 20px; padding: 30px; box-shadow: 0 30px 60px rgba(0,0,0,0.3); z-index: 1100; width: 90%; max-width: 450px; animation: modalSlideIn 0.3s;
}
.mini-modal.active { display: block; }
.mini-modal h3 { color: #1a1f2e; margin-bottom: 20px; font-size: 20px; font-weight: 700; }
.mini-modal p { color: #4a5568; margin-bottom: 25px; line-height: 1.6; }
.mini-modal input { width: 100%; padding: 14px; border: 2px solid #e2e8f0; border-radius: 10px; margin-bottom: 20px; font-size: 15px; }
.mini-modal input:focus { outline: none; border-color: #ff6b6b; }
.mini-modal-buttons { display: flex; justify-content: flex-end; gap: 12px; }

/* Listas dentro de modales */
.productos-lista { max-height: 400px; overflow-y: auto; }
.producto-item {
    display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #e2e8f0; transition: all 0.3s;
}
.producto-item:hover { background: #f8fafc; }
.producto-info h4 { color: #2d3748; margin-bottom: 5px; font-size: 16px; }
.producto-info p { color: #718096; font-size: 14px; }
.producto-precio { font-weight: 700; color: #ff6b6b; font-size: 16px; }
.producto-precio::before { content: "S/ "; font-weight: 600; color: #a0aec0; }
.badge-cantidad { background: #4ecdc4; color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.empty-state { text-align: center; padding: 40px; color: #a0aec0; }
.empty-state::before { content: "📦"; font-size: 48px; display: block; margin-bottom: 15px; opacity: 0.5; }
.producto-destacado { font-weight: 700; color: #ff6b6b; background: #fff5f5; padding: 4px 10px; border-radius: 20px; display: inline-block; }

/* Scroll personalizado */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.sidebar::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #ff6b6b, #4ecdc4); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #ff8787, #6cd4cc); }

.toast {
    position: fixed; bottom: 30px; right: 30px; background: white; border-radius: 12px; padding: 16px 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 12px; animation: slideIn 0.3s; z-index: 2000;
}
.toast.success { border-left: 4px solid #4ecdc4; }
.toast.error { border-left: 4px solid #ff6b6b; }
.toast.warning { border-left: 4px solid #f39c12; }

/* Badge de hora */
.hora-badge {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

/* Estados de deuda */
.deuda-al-dia {
    color: #10b981;
    font-weight: 600;
}
.deuda-vencida {
    color: #ff6b6b;
    font-weight: 600;
}
.deuda-por-vencer {
    color: #f39c12;
    font-weight: 600;
}
.deuda-critica {
    color: #b91c1c;
    font-weight: 700;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 20px;
}
.deuda-moderada {
    color: #854d0e;
    font-weight: 600;
    background: #fef9c3;
    padding: 2px 8px;
    border-radius: 20px;
}
.deuda-baja {
    color: #1e40af;
    font-weight: 600;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Estilos para la configuración */
.config-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}
.config-form .form-group {
    margin-bottom: 0;
}
.config-form .full-width {
    grid-column: span 2;
}
.logo-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    margin: 0 auto 20px;
}
.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.btn-subir-logo {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}
.btn-subir-logo:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
}