/* Clean Medical System Navbar - Professional & Minimal */

.navbar-nav-modern {
    align-items: center;
}

/* Clean Button Base */
.btn-modern {
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    background: white;
    color: #5a5c69;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    cursor: pointer;
}

.btn-modern:hover {
    background: #f8f9fc;
    border-color: #d1d3e2;
    color: #5a5c69;
    text-decoration: none;
}

.btn-modern:focus,
.btn-modern:active {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(78, 115, 223, 0.25) !important;
}

.btn-modern .btn-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Teleconsulta Button - Modern Clock Style */
.btn-teleconsulta {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.95));
    color: #221C46;
    border: none;
    border-radius: 10px;
    padding: 6px 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-teleconsulta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 28, 70, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-teleconsulta:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(249, 250, 251, 1));
    box-shadow: 0 3px 10px rgba(34, 28, 70, 0.15);
    transform: translateY(-1px);
    color: #1a1538;
}

.btn-teleconsulta:hover::before {
    opacity: 1;
}

.btn-teleconsulta .btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-teleconsulta .btn-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #221C46;
}

.btn-teleconsulta:hover .btn-icon {
    color: #1a1538;
}

.btn-teleconsulta .btn-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Unit Selector - Clean Style */
.btn-unit-selector {
    background: white;
    border-color: #d1d3e2;
    color: #5a5c69;
    min-width: 140px;
    justify-content: space-between;
}

.btn-unit-selector:hover {
    background: #f8f9fc;
    border-color: #c3c6d4;
}

.btn-unit-selector .btn-icon {
    font-size: 16px;
    color: #858796;
}

.btn-unit-selector .btn-text {
    font-size: 13px;
    flex: 1;
    text-align: left;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-unit-selector .btn-arrow {
    font-size: 14px;
    color: #858796;
    transition: transform 0.2s ease;
}

.btn-unit-selector[aria-expanded="true"] .btn-arrow {
    transform: rotate(180deg);
}

/* Clean Medical Avatar Styling */
.btn-profile .btn-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.btn-profile:hover .btn-avatar {
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

/* Other avatars keep original styling */
.btn-modern .btn-avatar:not(.btn-profile .btn-avatar) {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e3e6f0;
    transition: all 0.2s ease;
}

.btn-modern:hover .btn-avatar:not(.btn-profile .btn-avatar) {
    border-color: #d1d3e2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Clean SaaS Medical Profile Button */
.btn-profile {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    transition: all 0.2s ease;
    height: auto;
    min-width: auto;
}

.btn-profile .btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-profile:hover {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
    transform: none;
    box-shadow: none;
}

.btn-profile .btn-text {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    line-height: 1.4;
}

.btn-profile:hover .btn-text {
    color: #1e293b;
}

.btn-profile .btn-arrow {
    display: none;
}

/* Modern Profile Dropdown Header - Apple Style */
.dropdown-menu-modern .dropdown-header-profile {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: none;
    margin: 0;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-menu-modern .dropdown-header-profile img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    object-fit: cover;
    background: white;
    flex-shrink: 0;
}

.dropdown-menu-modern .dropdown-header-profile .profile-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.dropdown-menu-modern .dropdown-header-profile .profile-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-menu-modern .dropdown-header-profile .profile-role {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Align profile trigger like a clean select */
.navbar .nav-link.btn-unit-selector {
    display: flex;
    align-items: center;
    padding: 6px 12px;
}

/* Clean Minimal Dropdown Menu */
.dropdown-menu-modern {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 0;
    margin-top: 8px;
    background: white;
    min-width: 260px;
    overflow: hidden;
}

.dropdown-menu-modern .dropdown-header {
    padding: 8px 16px 4px;
    color: #858796;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu-modern .dropdown-header i {
    font-size: 14px;
}

.dropdown-menu-modern .dropdown-divider {
    margin: 6px 0;
    border-color: #e3e6f0;
}

/* Clean Minimal Dropdown Items */
.dropdown-item-modern {
    padding: 0;
    margin: 0 8px 8px 8px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.dropdown-item-modern:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.dropdown-item-modern.active {
    background: #f0f9ff;
    color: #0284c7;
}

.dropdown-item-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.dropdown-item-icon {
    font-size: 18px;
    width: 18px;
    color: #64748b;
    display: flex;
    justify-content: center;
}

.dropdown-item-modern.active .dropdown-item-icon {
    color: #0284c7;
}

.dropdown-item-text {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.dropdown-item-modern:hover .dropdown-item-text {
    color: #1e293b;
}

.dropdown-item-modern.active .dropdown-item-text {
    color: #0284c7;
}

/* Profile Details Section - Modern Apple Style */
.profile-details {
    padding: 12px 16px;
    background: #f8fafc;
    margin: 0;
}

.profile-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.profile-detail-item:first-child {
    padding-top: 0;
}

.profile-detail-item:last-child {
    padding-bottom: 0;
}

.profile-detail-item .detail-icon {
    font-size: 20px;
    color: #64748b;
    flex-shrink: 0;
}

.profile-detail-item .detail-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.profile-detail-item .detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-detail-item .detail-value {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Logout Item Styling */
.logout-item {
    margin: 8px !important;
}

.logout-item:hover {
    background: #fef2f2 !important;
}

.logout-item .dropdown-item-icon {
    color: #ef4444 !important;
}

.logout-item:hover .dropdown-item-icon {
    color: #dc2626 !important;
}

.logout-item .dropdown-item-text {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

.logout-item:hover .dropdown-item-text {
    color: #dc2626 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-modern .btn-text {
        display: none;
    }
    
    .btn-modern {
        padding: 8px 12px;
        min-width: auto;
    }
    
    .btn-unit-selector .btn-arrow {
        display: none;
    }
    
    .btn-profile .btn-text {
        display: none;
    }
    
    .btn-profile .btn-arrow {
        display: none;
    }
    
    .btn-profile {
        min-width: 44px;
        padding: 6px 8px;
        justify-content: center;
    }
    
    .dropdown-menu-modern {
        min-width: 180px;
    }
    
    .dropdown-menu-modern .dropdown-header-profile .profile-info {
        flex: 1;
    }
    
    .dropdown-menu-modern .dropdown-header-profile .profile-name {
        font-size: 13px;
    }
    
    .dropdown-menu-modern .dropdown-header-profile .profile-role {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .btn-modern {
        height: 32px;
        padding: 6px 10px;
    }
    
    .btn-modern .btn-icon {
        font-size: 14px;
    }
}