/* Ocultar botão antigo de overlay dentro de modais de perfil */
.auth-modal .btn-change-avatar {
	display: none !important;
}

/* Painel de Usuário Compacto na Sidebar - refinado */
.user-profile-compact {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 10px; /* reduz ligeiramente para caber avatar maior */
	width: 100%;
	box-sizing: border-box;
	min-height: 64px; /* acompanha avatar */
	max-height: 76px; /* não fica alto demais */
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	backdrop-filter: blur(6px);
	box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.user-avatar-compact {
	position: relative;
	width: 72px;
	height: 72px;
	flex-shrink: 0;
	display: flex;           /* centraliza a imagem no container */
	align-items: center;
	justify-content: center;
}

.user-avatar-compact img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	object-position: center;
	border: 3px solid rgba(255, 255, 255, 0.35);
}

.user-avatar-compact .admin-badge {
	position: absolute;
	bottom: -1px;
	right: -1px;
	background: #f59e0b;
	color: white;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	border: 2px solid white;
}

.user-info-compact {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 2px;
	min-width: 0; /* permite truncar */
}

.user-name-compact {
	color: white;
	font-weight: 700;
	font-size: 13px;
	margin: 0;
	line-height: 1.15;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.user-type-badge {
	display: inline-block;
	background: rgba(255,255,255,0.10);
	color: rgba(255,255,255,0.85);
	border: 1px solid rgba(255,255,255,0.18);
	border-radius: 9999px;
	padding: 2px 8px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.user-actions-compact {
	display: flex;
	gap: 4px;
	justify-content: flex-end;
}

.user-actions-compact button {
	width: 26px;
	height: 26px;
	border: none;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.12);
	color: white;
	transition: all 0.25s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
}

.user-actions-compact button:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: translateY(-1px);
}

/* Botões específicos mantêm a identidade, mas compactos */
.btn-admin-sidebar { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.btn-profile-sidebar { background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important; }
.btn-logout-sidebar { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }

/* Modal de Perfil Melhorado */
.profile-modal-content {
    max-width: 500px;
    width: 90vw;
}

.profile-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border: none;
}

.admin-badge-large {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
}

.btn-change-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-change-avatar:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

.profile-header {
    margin-bottom: 15px;
}

.profile-header h4 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.user-type-badge.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.user-type-badge.user {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.profile-info-grid {
    display: grid;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.info-item label i {
    width: 16px;
    color: #3b82f6;
}

.info-item span {
    color: white;
    font-weight: 600;
    padding-left: 24px;
}

.status-active {
    color: #10b981 !important;
    font-weight: 600;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.profile-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-save-profile {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-change-password {
    background: linear-gradient(90deg, #3b82f6 0%, #7c3aed 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.6);
}

.btn-admin-access {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.profile-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsividade: ainda menor em telas pequenas */
@media (max-width: 640px) {
	.user-profile-compact { padding: 6px 8px; gap: 8px; min-height: 60px; max-height: 70px; }
	.user-avatar-compact { width: 64px; height: 64px; }
	.user-name-compact { font-size: 12px; }
	.user-actions-compact button { width: 24px; height: 24px; font-size: 10px; }
}
