body { font-family: 'Inter', sans-serif; background-color: #f3f4f6; }
.view-section { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Modales ──────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 50;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.2s;
    padding: 12px;
    box-sizing: border-box;
}
.modal-content {
    background-color: #fefefe;
    margin: 20px auto;
    padding: 24px;
    border: 1px solid #e5e7eb;
    width: 100%;
    max-width: 600px;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
    position: relative;
}
@media (max-width: 640px) {
    .modal { padding: 8px; }
    .modal-content { padding: 16px; margin: 8px auto; border-radius: 0.5rem; }
}

/* ── Tablas responsive ────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Paleta Teams ─────────────────────────────────────────── */
.bg-teams { background-color: #5B5FC7; }
.text-teams { color: #5B5FC7; }
.border-teams { border-color: #5B5FC7; }
.hover-bg-teams-dark:hover { background-color: #4b4e9f; }
.time-slot.selected { background-color: #5B5FC7; color: white; border-color: #5B5FC7; }

/* ── Paleta de marca TeleConsulta ────────────────────────── */
.bg-brand { background-color: #0d9488; }
.text-brand { color: #0d9488; }
.border-brand { border-color: #0d9488; }
.hover-bg-brand-dark:hover { background-color: #0f766e; }
.bg-brand-light { background-color: #f0fdfa; }
.bg-brand-soft { background-color: #ccfbf1; }
.focus\:ring-brand:focus { --tw-ring-color: #0d9488; }
.focus\:border-brand:focus { border-color: #0d9488; }

.hero-bienvenida { background: linear-gradient(135deg, #0d9488 0%, #0e7490 100%); }

.profile-card { cursor: pointer; transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-color 0.15s ease-in-out; }
.profile-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px -4px rgba(0,0,0,0.12); }
.profile-card.selected { border-color: #0d9488; background-color: #f0fdfa; box-shadow: 0 0 0 2px rgba(13,148,136,0.25); }

/* ── Responsividad general ───────────────────────────────── */

/* Contenedores con overflow en pantallas pequeñas */
.overflow-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Texto largo que no debe romper layouts */
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Botones en móvil: ancho completo cuando están solos */
@media (max-width: 480px) {
    .btn-full-mobile { width: 100%; justify-content: center; }
}

/* Header nav: ocultar tabs en móvil (se reemplaza por el <select>) */
@media (max-width: 768px) {
    header .hidden.md\:flex { display: none !important; }
}

/* Tarjetas de cita en paciente: botón de unirse full en móvil */
@media (max-width: 480px) {
    #lista-citas-paciente button,
    #lista-citas-paciente a.inline-flex {
        width: 100%;
        justify-content: center;
    }
}

/* Panel Jitsi: altura reducida en móvil */
@media (max-width: 640px) {
    #jitsi-embed-paciente { height: 300px !important; }
}

/* Grid de horarios: header sticky en horizontal scroll */
#grid-horario-admin thead th,
#grid-horario-semanal thead th { position: sticky; top: 0; background: #f9fafb; z-index: 1; }

/* ── Impresión ───────────────────────────────────────────── */
@media print {
    header, nav, .no-print, #alert-container { display: none !important; }
    body { background: white; }
    #receta-imprimible { box-shadow: none; border: 1px solid #ddd; }
}
