/* ===== RESET Y BASE ===== */
* {
    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;
    color: #333;
    line-height: 1.6;
}

/* ===== LAYOUT PRINCIPAL ===== */
.contenedor {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar h2 {
    text-align: center;
    color: #4f46e5;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eef2ff;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav li {
    margin-bottom: 8px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar nav a:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    transform: translateX(5px);
}

.sidebar nav a.activo {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.contenido-principal {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    background: #f8fafc;
    min-height: 100vh;
}

.contenido-principal header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.contenido-principal h1 {
    color: #1e293b;
    font-size: 32px;
    font-weight: 700;
}

/* ===== BOTONES ===== */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #64748b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-edit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    /*margin-right: 8px;*/
    transition: all 0.3s ease;
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ===== FORMULARIOS ===== */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.form-container h2 {
    color: #1e293b;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

/* ===== LISTA DE CLIENTES ===== */
.lista-clientes h2 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.cliente-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #4f46e5;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cliente-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.cliente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.cliente-nombre {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.cliente-actions {
    display: flex;
    gap: 8px;
}

.cliente-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cliente-email,
.cliente-telefono,
.cliente-direccion {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.cliente-email::before {
    content: '📧';
}

.cliente-telefono::before {
    content: '📞';
}

.cliente-direccion::before {
    content: '📍';
}

/* ===== MENSAJES ===== */
.mensaje {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    border: 2px solid transparent;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.mensaje.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* ===== TARJETAS DE ESTADÍSTICAS ===== */
.tarjetas-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tarjeta-stat {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.tarjeta-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.tarjeta-stat h3 {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tarjeta-stat .numero {
    color: #1e293b;
    font-size: 32px;
    font-weight: 700;
}

/* ===== ACTIVIDAD RECIENTE ===== */
.actividad-reciente {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.actividad-reciente h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }
    
    .contenedor {
        flex-direction: column;
    }
    
    .contenido-principal {
        margin-left: 0;
        padding: 20px;
    }
    
    .contenido-principal header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .clientes-grid {
        grid-template-columns: 1fr;
    }
    
    .cliente-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .cliente-actions {
        align-self: flex-end;
    }
    
    .form-buttons {
        flex-direction: column;
    }
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== ESTADOS DE CARGA ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4f46e5;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para mensajes de la nueva versión */
.mensaje-temporario {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    color: white !important;
    z-index: 10000 !important;
    animation: slideIn 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Info labels en tarjetas */
.info-label {
    font-weight: 600;
    color: #4f46e5;
    display: inline-block;
    min-width: 100px;
}

.cliente-info p {
    margin: 8px 0;
    color: #64748b;
    font-size: 14px;
}

.text-center {
    text-align: center;
}


/* ===== ESTILOS PARA CITAS ===== */

.citas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

/* Ajustes para formulario de citas */
#mascota_id_cita:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Badges de estado para citas */
.estado-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.estado-programada {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.estado-confirmada {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.estado-completada {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #d8b4fe;
}

.estado-cancelada {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Mejoras para tarjetas de citas */
.cliente-card.cita-card {
    border-left: 5px solid #8b5cf6;
}

.cliente-card.cita-card .cliente-nombre {
    color: #7c3aed;
}

/* Filtros para citas (opcional, para futuras mejoras) */
.filtros-citas {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filtros-citas label {
    font-weight: 600;
    color: #4b5563;
    font-size: 14px;
}

.filtros-citas select,
.filtros-citas input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

/* Responsive para citas */
@media (max-width: 768px) {
    .citas-grid {
        grid-template-columns: 1fr;
    }
    
    .filtros-citas {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== ESTILOS PARA INVENTARIO ===== */

.tarjetas-stats-inventario {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.tarjetas-stats-inventario .tarjeta-stat {
    padding: 20px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Estados de stock */
.stock-bajo {
    color: #dc2626;
    font-weight: 600;
    background-color: #fee2e2;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.stock-normal {
    color: #059669;
    font-weight: 500;
}

/* Formulario con filas */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Badges de categoría */
.categoria-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
}

.categoria-medicamento {
    background-color: #dbeafe;
    color: #1e40af;
}

.categoria-alimento {
    background-color: #d1fae5;
    color: #065f46;
}

.categoria-accesorio {
    background-color: #fef3c7;
    color: #92400e;
}

.categoria-higiene {
    background-color: #f3e8ff;
    color: #6b21a8;
}

.categoria-suplemento {
    background-color: #fce7f3;
    color: #9d174d;
}

/* Mejoras para tarjetas de productos */
.producto-card .cliente-nombre {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive para inventario */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .productos-grid {
        grid-template-columns: 1fr;
    }
    
    .tarjetas-stats-inventario {
        grid-template-columns: 1fr;
    }
}

/* Estilos para tratamientos */
.tratamiento-card {
    border-left: 5px solid #10b981;
    margin-bottom: 15px;
}

.tratamiento-card .cliente-nombre {
    color: #059669;
    font-size: 16px;
}

.historial-tratamientos-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Botón específico para tratamientos */
.btn-tratamiento {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

.btn-tratamiento:hover {
    background-color: #059669;
}

/* Estilos para formulario de tratamiento */
#tratamientos-container .form-group textarea {
    min-height: 60px;
}

/* Badge para tipo de tratamiento */
.tratamiento-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
}

.tratamiento-badge.medicamento {
    background-color: #dbeafe;
    color: #1e40af;
}

.tratamiento-badge.vacuna {
    background-color: #d1fae5;
    color: #065f46;
}

.tratamiento-badge.control {
    background-color: #fef3c7;
    color: #92400e;
}
/* Botón específico para tratamientos en tarjetas */
.btn-tratamiento {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    transition: all 0.3s ease;
}

.btn-tratamiento:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Estilos para el header del historial */
.historial-tratamientos .cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.historial-tratamientos h2 {
    margin: 0;
    color: #1e293b;
}


.btn-info {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    transition: all 0.3s ease;
}

.btn-info:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

/* Estilos para tarjetas de tratamiento en historial */
.tratamiento-card .cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.tratamiento-card .cliente-actions {
    display: flex;
    gap: 5px;
}

/* Botón para abrir historial desde mascota */
.btn-historial {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

.btn-historial:hover {
    background-color: #2563eb;
}

.buscador-productos {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.producto-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.2s;
}

.producto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.producto-acciones {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.cantidad-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-cantidad {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
}

.carrito-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.tabla-carrito {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.tabla-carrito th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.tabla-carrito td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.totales-venta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

.total-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
}

.total-final {
    font-size: 1.2em;
    font-weight: bold;
    border-top: 2px solid #dee2e6;
    padding-top: 10px;
    margin-top: 10px;
}

.pago-acciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.botones-venta {
    grid-column: span 2;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Estilos para historial de ventas */
.venta-card {
    border-left: 4px solid #4CAF50;
}

.venta-card.cancelada {
    border-left-color: #f44336;
}

.venta-card.pendiente {
    border-left-color: #ff9800;
}

.filtros-ventas {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.filtros-ventas input,
.filtros-ventas select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-contenido {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.btn-cerrar-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Estilos para categorías en inventario */
.filtros-categorias {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filtros-categorias h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.categorias-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.categoria-filtro-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.categoria-filtro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.categoria-filtro-btn.active {
    border-color: #4CAF50;
    background: #f0f9f0;
    font-weight: bold;
}

.categoria-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.contador {
    background: #e0e0e0;
    color: #666;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.categoria-filtro-btn.active .contador {
    background: #4CAF50;
    color: white;
}

.categoria-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

/* Estilos para productos según categoría */
.producto-card {
    border-left: 4px solid #8A8A8A; /* Color por defecto */
}

.producto-card[data-categoria-id="1"] {
    border-left-color: #FF6B6B; /* Medicamentos */
}

.producto-card[data-categoria-id="2"] {
    border-left-color: #4ECDC4; /* Alimentos */
}

.producto-card[data-categoria-id="3"] {
    border-left-color: #FFD166; /* Juguetes */
}

.producto-card[data-categoria-id="4"] {
    border-left-color: #06D6A0; /* Accesorios */
}

.producto-card[data-categoria-id="5"] {
    border-left-color: #118AB2; /* Higiene */
}

.producto-card[data-categoria-id="6"] {
    border-left-color: #EF476F; /* Suplementos */
}

.producto-card[data-categoria-id="7"] {
    border-left-color: #8A8A8A; /* General */
}

/* Estilos para el select de categoría en formulario */
#categoria_id {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: white;
}

#categoria_id:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

#categoria_id option {
    padding: 10px;
}

/* ===== ESTILOS ESPECÍFICOS PARA TARJETAS DE MASCOTAS ===== */
.mascota-card {
    padding: 20px;
    border-left: 5px solid #10b981;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mascota-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.mascota-card-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.mascota-foto-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mascota-foto-container:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

.mascota-foto-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mascota-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.mascota-info-principal {
    flex: 1;
}

.mascota-nombre {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.mascota-dueno {
    font-size: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mascota-dueno .info-label {
    color: #64748b;
    font-weight: 600;
    min-width: auto;
}

.mascota-acciones {
    display: flex;
    flex-wrap: wrap;      
    gap: 5px;              
    align-items: center;
    justify-content: flex-start; 
    margin-top: 5px;
}

.mascota-acciones button {
    width: 34px;              /* Reducido ligeramente de 36px a 34px */
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
}

.mascota-acciones button:hover {
    transform: translateY(-2px);
}

.mascota-detalles {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas para los 4 campos */
    gap: 12px;
    padding-top: 15px;
    border-top: 2px solid #eef2ff;
    background: #f8fafc;
    margin: 0 -20px -20px -20px;
    padding: 15px 20px;
    border-radius: 0 0 16px 16px;
}

.detalle-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detalle-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detalle-valor {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 768px) {
    .mascota-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .mascota-foto-container {
        margin: 0 auto;
    }
    
    .mascota-info-principal {
        text-align: center;
    }
    
    .mascota-dueno {
        justify-content: center;
    }
    
    .mascota-acciones {
        justify-content: center;
        margin-top: 10px;
    }
    
    .mascota-detalles {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media (max-width: 480px) {
    .mascota-detalles {
        grid-template-columns: 1fr; /* 1 columna en móviles */
    }
    
    .detalle-item {
        align-items: center;
        text-align: center;
    }
}

/* Asegurar que las tarjetas de clientes NO se vean afectadas */
.cliente-card:not(.mascota-card) {
    border-left: 5px solid #4f46e5;
}

.cliente-card:not(.mascota-card) .cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.cliente-card:not(.mascota-card) .cliente-nombre {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* ===== ESTILOS PARA CITAS DEL DÍA EN DASHBOARD ===== */
.citas-dia-container {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.citas-dia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eef2ff;
}

.citas-dia-header h2 {
    color: #1e293b;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fecha-actual {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.citas-dia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.cita-dia-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    border-left: 5px solid #4f46e5;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cita-dia-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.cita-dia-card.programada {
    border-left-color: #f59e0b;
}

.cita-dia-card.confirmada {
    border-left-color: #10b981;
}

.cita-dia-card.completada {
    border-left-color: #6b7280;
    opacity: 0.8;
}

.cita-dia-card.cancelada {
    border-left-color: #ef4444;
    opacity: 0.7;
}

.cita-dia-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cita-hora {
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cita-estado {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.estado-programada {
    background: #fef3c7;
    color: #92400e;
}

.estado-confirmada {
    background: #d1fae5;
    color: #065f46;
}

.estado-completada {
    background: #e5e7eb;
    color: #374151;
}

.estado-cancelada {
    background: #fee2e2;
    color: #991b1b;
}

.cita-cliente {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
    font-size: 16px;
}

.cita-mascota {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.cita-mascota::before {
    content: "🐾";
    font-size: 12px;
}

.cita-motivo {
    background: white;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    margin: 10px 0 5px;
    border: 1px solid #e2e8f0;
    font-style: italic;
}

.sin-citas {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    color: #94a3b8;
}

.sin-citas p {
    margin: 5px 0;
    font-size: 16px;
}

.sin-citas .icono {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.cargando-citas {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #64748b;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .citas-dia-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .citas-dia-grid {
        grid-template-columns: 1fr;
    }
    
    .fecha-actual {
        align-self: flex-start;
    }
}



/* Estilos para botón de ingreso */
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Modal para ingreso de stock */
#modal-ingreso-stock .modal-contenido {
    max-width: 400px;
}

#modal-ingreso-stock .modal-body {
    padding: 20px 25px;
}

#modal-ingreso-stock .modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}




.producto-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.producto-card .cliente-nombre {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #eef2ff;
    padding-bottom: 10px;
}

.producto-card .cliente-info {
    flex: 1;
}

.producto-card .cliente-info p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.producto-card .cliente-info .info-label {
    min-width: 100px;
    color: #64748b;
}

.producto-card .cliente-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #eef2ff;
    padding-top: 15px;
}

.producto-card .cliente-actions button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    padding: 8px 12px;
}

/* Estilo para botón de ingreso */
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .producto-card .cliente-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .producto-card .cliente-info .info-label {
        min-width: auto;
    }
    
    .producto-card .cliente-actions {
        flex-wrap: wrap;
    }
}


/* Estilo para botones deshabilitados */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Indicador de cita pasada */
.cliente-nombre small {
    font-size: 12px;
    color: #f59e0b;
    margin-left: 10px;
}


.bano-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 20px;
    padding: 4px 10px;        /* Ajuste de padding */
    font-size: 0.85rem;
    color: #1e293b;
    white-space: nowrap;      /* Evita que el texto se rompa */
    cursor: pointer;
    transition: background 0.2s;
    height: 34px;             /* Misma altura que los botones para alineación */
    line-height: 1;
}

.mascota-acciones .bano-count {
    margin-left: auto;        /* Se empuja a la derecha si hay espacio */
}

.bano-count:hover {
    background: #cbd5e1;
}