:root {
    --primary: #4e73df;
    --primary-grad: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    --bg-light: #f8f9fc;
    --text-dark: #3a3b45;
}

body {
    background-color: var(--bg-light);
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

.bg-gradient-primary { background: var(--primary-grad); }

/* Transiciones de Vistas */
.animate-fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chat Interface */
.chat-card {
    height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    background-color: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai {
    align-self: flex-start;
    background-color: white;
    color: #444;
    border: 1px solid #e3e6f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Estilos para Markdown dentro del chat */
.message.ai strong { font-weight: 700; color: #2c3e50; }
.message.ai ul { padding-left: 20px; margin-bottom: 0; }
.message.ai p { margin-bottom: 0.5rem; }
.message.ai p:last-child { margin-bottom: 0; }

.icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Indicador de escribiendo */
.typing {
    font-style: italic;
    font-size: 0.8rem;
    color: #aaa;
    margin-left: 10px;
    display: none;
}

/* Estilos del Calendario */
.calendar-header {
    background-color: #4e73df;
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 días de la semana */
    gap: 2px;
    background-color: #ddd;
    border: 1px solid #ddd;
}
.calendar-day-name {
    background-color: #f8f9fa;
    text-align: center;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 10px 0;
    color: #555;
}
.calendar-day {
    background-color: white;
    min-height: 100px; /* Altura de cada celda */
    padding: 5px;
    position: relative;
}
.calendar-day:hover {
    background-color: #fcfcfc;
}
.calendar-day.today {
    background-color: #e8f0fe;
    border: 1px solid #4e73df;
}
.day-number {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 5px;
    display: block;
}
.appt-badge {
    display: block;
    background-color: #e74a3b; /* Rojo para resaltar */
    color: white;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

/* Estilos para las Fotos de Mascotas */
.pet-avatar {
    width: 60px;
    height: 60px;
    object-fit: cover; /* Recorta la imagen para que no se deforme */
    border-radius: 50%; /* La hace redonda */
    border: 2px solid #4e73df;
}

/* Ajuste para cuando no hay foto (Icono) */
.pet-icon-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #4e73df;
    border: 1px solid #ddd;
}

/* Foto pequeña en el modal de historial */
.history-avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}