/* public/assets/css/style.css - Diseño responsive mobile-first */

/* Variables CSS - Paleta médica moderna y amigable */
:root {
    --primary: #4A90E2;
    --primary-dark: #357ABD;
    --secondary: #7B68EE;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --info: #3498DB;
    --light: #ECF0F1;
    --dark: #2C3E50;
    --gray: #95A5A6;
    --white: #FFFFFF;

    /* Gradientes modernos */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-orange: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    --radius: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Topbar moderna con glassmorphism */
.topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.topbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.topbar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.topbar-nav a {
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.topbar-nav a:hover {
    background: rgba(103, 126, 234, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Badges de notificación mejorados */
.notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-badge {
    display: inline-block;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 11px;
    text-align: center;
    line-height: 22px;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

.notification-badge.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 4px 16px rgba(245, 87, 108, 0.6);
    }
}

/* Alerta de notificación con diseño moderno */
.notification-alert {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: slideInDown 0.5s ease;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.notification-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.notification-alert:hover::before {
    left: 100%;
}

.notification-alert:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.notification-alert .icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-alert .content {
    flex: 1;
}

.notification-alert .content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.notification-alert .content p {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
}

.notification-alert .btn-notification {
    background: white;
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-alert .btn-notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Container principal mejorado */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem 2rem;
}

/* Cards modernos con diseño elevado */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
}

.card-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.card-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.95;
    font-size: 1rem;
}

.card:not(.card-header) {
    padding: 2rem;
}

/* Stats cards con gradientes */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card.success::before {
    background: var(--gradient-success);
}

.stat-card.warning::before {
    background: var(--gradient-warning);
}

.stat-card.info::before {
    background: var(--gradient-info);
}

.stat-card h2 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.stat-card p {
    margin: 0;
    color: var(--gray);
    font-size: 1rem;
    font-weight: 500;
}

/* Botones modernos con efectos */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(103, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(103, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(103, 126, 234, 0.3);
}

.btn-success {
    background: var(--gradient-success);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-warning {
    background: var(--gradient-warning);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.btn-secondary {
    background: var(--gray);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Form groups mejorados */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 2px solid #E8ECEF;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(103, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-row {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.form-row.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-row.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Tablas modernas */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

thead th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

thead th:first-child {
    border-top-left-radius: var(--radius);
}

thead th:last-child {
    border-top-right-radius: var(--radius);
}

tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid #f0f0f0;
}

tbody tr:hover {
    background: rgba(103, 126, 234, 0.05);
    transform: scale(1.01);
}

tbody td {
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
}

/* Badges mejorados */
.badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.badge-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.badge-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

/* Flex utilities */
.flex {
    display: flex;
}

.gap-2 {
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Toast notifications mejoradas */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    animation: slideInUp 0.4s ease;
    border-left: 4px solid var(--success);
    max-width: 400px;
}

.toast.error {
    border-left-color: var(--danger);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner moderno */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(103, 126, 234, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .topbar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .topbar-nav {
        width: 100%;
        justify-content: center;
    }

    .container {
        padding: 0 1rem 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .form-row.cols-2,
    .form-row.cols-3 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

/* Loading spinner */
.spinner {
    border: 3px solid var(--gray-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    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: 9998;
}

/* Modal responsive */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
}

/* Chat de preguntas */
.chat-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    max-width: 80%;
}

.chat-message.paciente {
    background: #e3f2fd;
    margin-left: 0;
    margin-right: auto;
}

.chat-message.especialista {
    background: #e8f5e9;
    margin-left: auto;
    margin-right: 0;
}

.chat-message-header {
    font-weight: bold;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.chat-message-time {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Grid de fotos */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.photo-item:hover img {
    transform: scale(1.1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--white);
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
}

.badge-info {
    background: var(--info);
    color: var(--white);
}

/* Footer */
footer {
    background: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 3rem;
    color: var(--gray);
}

/* Login page específico */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .topbar-content {
        flex-direction: column;
    }

    .topbar-nav {
        width: 100%;
        justify-content: center;
    }

    .container {
        margin: 1rem auto;
    }

    .card {
        padding: 1rem;
    }

    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .toast-container {
        left: 10px;
        right: 10px;
        top: 70px;
    }

    .toast {
        min-width: auto;
    }

    .chat-message {
        max-width: 90%;
    }
}

/* Responsive - Desktop grande */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}

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

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

/* ========================================
   MEDIDAS ANTROPOMÉTRICAS - BIOIMPEDANCIA
   ======================================== */

/* Sección principal de medidas */
.medidas-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.medidas-section h3 {
    margin-bottom: 2rem;
    color: var(--dark);
    font-size: 1.3rem;
}

/* Secciones del formulario con colores diferenciados */
.medidas-form-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.medidas-form-section:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.medidas-form-section h4 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sección de Datos Personales - Azul */
.medidas-form-section.personal {
    border-left-color: #3498db;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.medidas-form-section.personal h4 {
    color: #3498db;
}

/* Sección de Composición Corporal - Verde */
.medidas-form-section.corporal {
    border-left-color: #27ae60;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.medidas-form-section.corporal h4 {
    color: #27ae60;
}

/* Sección de Metabolismo - Naranja */
.medidas-form-section.metabolismo {
    border-left-color: #e67e22;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.medidas-form-section.metabolismo h4 {
    color: #e67e22;
}

/* Resultado de IMC */
.imc-result {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    border: 2px solid #e8ecef;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.imc-result .imc-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Badges de clasificación */
.badge-imc {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Comparador de cambios */
.cambios-comparador {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e8ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.cambios-comparador h3 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.tabla-cambios {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tabla-cambios thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tabla-cambios thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
}

.tabla-cambios tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.tabla-cambios tbody tr:last-child td {
    border-bottom: none;
}

.tabla-cambios tbody tr:hover {
    background: rgba(103, 126, 234, 0.05);
}

/* Indicadores de cambio */
.cambio-positivo {
    color: #27ae60;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, transparent 100%);
    padding: 0.5rem;
    border-radius: 6px;
}

.cambio-negativo {
    color: #e74c3c;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, transparent 100%);
    padding: 0.5rem;
    border-radius: 6px;
}

.cambio-neutral {
    color: #95a5a6;
    font-weight: 600;
    padding: 0.5rem;
}

/* Tabla de medidas (historial) */
.tabla-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tabla-medidas {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: 0.95rem;
}

.tabla-medidas thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tabla-medidas thead th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tabla-medidas thead th:first-child {
    border-top-left-radius: 12px;
}

.tabla-medidas thead th:last-child {
    border-top-right-radius: 12px;
}

.tabla-medidas tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.tabla-medidas tbody tr:hover {
    background: rgba(103, 126, 234, 0.05);
    transform: scale(1.005);
}

.tabla-medidas tbody tr:last-child {
    border-bottom: none;
}

.tabla-medidas tbody td {
    padding: 1.25rem 1rem;
    white-space: nowrap;
}

/* Mensajes de alerta */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
    border-left-color: #27ae60;
    color: #1e7e34;
}

.alert-error {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
    border-left-color: #e74c3c;
    color: #c0392b;
}

.alert-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
    border-left-color: #3498db;
    color: #2980b9;
}

/* Animaciones de entrada */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #95a5a6;
}

.text-danger {
    color: #e74c3c;
}

.mb-2 {
    margin-bottom: 2rem;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Detalles expandibles */
details {
    background: rgba(0, 0, 0, 0.02);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e8ecef;
}

details summary {
    color: var(--primary);
    font-weight: 600;
    transition: color 0.2s ease;
}

details summary:hover {
    color: var(--primary-dark);
}

details[open] {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

details[open] summary {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8ecef;
}

/* Responsive para medidas */
@media (max-width: 768px) {
    .medidas-section {
        padding: 1rem;
    }

    .medidas-form-section {
        padding: 1rem;
    }

    .imc-result {
        flex-direction: column;
        text-align: center;
    }

    .tabla-responsive {
        margin: 0 -1rem;
    }

    .tabla-medidas {
        font-size: 0.85rem;
    }

    .tabla-medidas thead th,
    .tabla-medidas tbody td {
        padding: 0.75rem 0.5rem;
    }
}