/* --- Paciente Profile Page --- */

.paciente-hero {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    position: relative;
}

.paciente-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.paciente-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.paciente-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.paciente-content {
    background: #f8f9fa;
    min-height: 50vh;
}

.paciente-content .card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.paciente-content .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.paciente-content .icon-box {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Forzar campos en una sola línea */
.paciente-content .list-unstyled .field,
.paciente-content .list-unstyled .field__item,
.paciente-content .list-unstyled .field__items {
    display: inline !important;
    white-space: nowrap;
}

.paciente-content .list-unstyled .fw-semibold {
    display: inline-block;
    white-space: nowrap;
}

.paciente-content .list-unstyled .fw-semibold * {
    display: inline !important;
    white-space: nowrap;
}

/* --- Placeholder para Vista de Lista --- */
.paciente-foto-placeholder {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.paciente-foto-placeholder:hover {
    transform: scale(1.05);
}

.avatar-placeholder-small {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Pestañas de Paciente --- */
.nav-tabs-paciente {
    border-bottom: 2px solid #e9ecef;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-tabs-paciente::-webkit-scrollbar {
    display: none;
}

.nav-tabs-paciente .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 1rem 1.5rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-tabs-paciente .nav-link:hover:not(.disabled) {
    border-color: transparent;
    border-bottom-color: var(--bs-secondary);
    color: var(--bs-primary);
}

.nav-tabs-paciente .nav-link.active {
    border-color: transparent;
    border-bottom-color: var(--bs-primary);
    color: var(--bs-primary);
    background-color: transparent;
}

.nav-tabs-paciente .nav-link.disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

.nav-tabs-paciente .nav-link .badge {
    font-size: 0.65rem;
    vertical-align: middle;
}

/* Tab Content */
.tab-content>.tab-pane {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Historial de revisiones table */
#revision-history td {
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    .paciente-hero .row {
        text-align: center;
    }

    .paciente-avatar {
        margin: 0 auto 1rem;
        width: 80px;
        height: 80px;
    }

    .paciente-avatar .avatar-placeholder {
        font-size: 2.5rem;
    }

    .paciente-hero .col {
        text-align: center;
    }

    .paciente-hero .col-auto:last-child {
        width: 100%;
        margin-top: 1rem;
        justify-content: center;
    }

    .nav-tabs-paciente .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .nav-tabs-paciente .nav-link i {
        display: none;
    }
}