.role-details-page {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
	width: 100%;
	max-width: 60vw;
	margin: 0 auto;

	.role-details-header {
		display: flex;
		flex-direction: column;
		gap: 0;
	}

	.role-details-title {
		color: var(--l1-foreground);
		font-family: Inter;
		font-size: 18px;
		font-weight: 500;
		line-height: 28px;
		letter-spacing: -0.09px;
	}

	.role-details-permission-item--readonly {
		cursor: default !important;
		pointer-events: none;
		opacity: 0.55;
	}

	.role-details-nav {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.role-details-tab {
		gap: 4px;
		padding: 0 16px;
		height: 32px;
		border-radius: 0;
		font-size: 12px;
		overflow: hidden;
		font-weight: 400;
		line-height: 18px;
		letter-spacing: -0.06px;

		&[data-state='on'] {
			border-radius: 2px 0 0 2px;
		}
	}

	.role-details-tab-count {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		padding: 0 6px;
		border-radius: 50px;
		background: var(--secondary);
		font-size: 12px;
		font-weight: 400;
		line-height: 20px;
		color: var(--foreground);
		letter-spacing: -0.06px;
		text-transform: uppercase;
	}

	.role-details-actions {
		display: flex;
		align-items: center;
		gap: 12px;
	}

	.role-details-overview {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.role-details-meta {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.role-details-section-label {
		font-family: Inter;
		font-size: 12px;
		font-weight: 500;
		line-height: 20px;
		letter-spacing: 0.48px;
		text-transform: uppercase;
		color: var(--foreground);
	}

	.role-details-description-text {
		font-family: Inter;
		font-size: 13px;
		font-weight: 500;
		line-height: 20px;
		letter-spacing: -0.07px;
		color: var(--foreground);
	}

	.role-details-info-row {
		display: flex;
		gap: 16px;
		align-items: flex-start;
	}

	.role-details-info-col {
		flex: 1;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.role-details-info-value {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.role-details-info-name {
		font-family: Inter;
		font-size: 14px;
		font-weight: 500;
		line-height: 20px;
		letter-spacing: -0.07px;
		color: var(--foreground);
	}

	.role-details-permissions {
		display: flex;
		flex-direction: column;
		gap: 16px;
		padding-top: 8px;
	}

	.role-details-permissions-header {
		display: flex;
		align-items: center;
		gap: 16px;
		height: 20px;
	}

	.role-details-permissions-divider {
		flex: 1;
		border: none;
		border-top: 2px dotted var(--l1-border);
		border-bottom: 2px dotted var(--l1-border);
		height: 7px;
		margin: 0;
	}

	.role-details-permission-list {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.role-details-permission-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 44px;
		padding: 0 12px;
		background: color-mix(in srgb, var(--bg-robin-200) 8%, transparent);
		border: 1px solid var(--secondary);
		border-radius: 4px;
		cursor: pointer;
		transition: background 0.15s ease;

		&:hover {
			background: color-mix(in srgb, var(--bg-robin-200) 12%, transparent);
		}
	}

	.role-details-permission-item-left {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.role-details-permission-item-label {
		font-family: Inter;
		font-size: 14px;
		font-weight: 400;
		line-height: 20px;
		letter-spacing: -0.07px;
		color: var(--l1-foreground);
	}

	.role-details-members {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.role-details-members-search {
		display: flex;
		align-items: center;
		gap: 6px;
		height: 32px;
		padding: 6px 6px 6px 8px;
		background: var(--l2-background);
		border: 1px solid var(--secondary);
		border-radius: 2px;

		.role-details-members-search-icon {
			flex-shrink: 0;
			color: var(--foreground);
			opacity: 0.5;
		}

		.role-details-members-search-input {
			flex: 1;
			height: 100%;
			background: transparent;
			border: none;
			outline: none;
			font-family: Inter;
			font-size: 14px;
			font-weight: 400;
			line-height: 18px;
			letter-spacing: -0.07px;
			color: var(--foreground);

			&::placeholder {
				color: var(--foreground);
				opacity: 0.4;
			}
		}
	}

	.role-details-members-content {
		display: flex;
		flex-direction: column;
		min-height: 420px;
		border: 1px dashed var(--secondary);
		border-radius: 3px;
		margin-top: -1px;
	}

	.role-details-members-empty-state {
		display: flex;
		flex: 1;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		padding: 48px 0;
		flex-grow: 1;

		.role-details-members-empty-emoji {
			font-size: 32px;
			line-height: 1;
		}

		.role-details-members-empty-text {
			font-family: Inter;
			font-size: 14px;
			line-height: 18px;
			letter-spacing: -0.07px;

			&--bold {
				font-weight: 500;
				color: var(--l1-foreground);
			}

			&--muted {
				font-weight: 400;
				color: var(--foreground);
			}
		}
	}

	.role-details-skeleton {
		padding: 16px 0;
	}
}

.role-details-delete-action-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	min-width: 32px;
	border: none;
	border-radius: 2px;
	background: transparent;
	color: var(--destructive);
	opacity: 0.6;
	padding: 0;
	transition:
		background-color 0.2s,
		opacity 0.2s;
	box-shadow: none;

	&:hover {
		background: color-mix(in srgb, var(--danger-background) 10%, transparent);
		opacity: 0.9;
	}
}

.role-details-delete-modal {
	width: calc(100% - 30px) !important;
	max-width: 384px;

	.ant-modal-content {
		padding: 0;
		border-radius: 4px;
		border: 1px solid var(--secondary);
		background: var(--l2-background);
		box-shadow: 0px -4px 16px 2px rgba(0, 0, 0, 0.2);

		.ant-modal-header {
			padding: 16px;
			background: var(--l2-background);
			margin-bottom: 0;
		}

		.ant-modal-body {
			padding: 0 16px 28px 16px;
		}

		.ant-modal-footer {
			display: flex;
			justify-content: flex-end;
			padding: 16px;
			margin: 0;

			.cancel-btn {
				display: flex;
				align-items: center;
				border: none;
				border-radius: 2px;
			}

			.delete-btn {
				display: flex;
				align-items: center;
				border: none;
				border-radius: 2px;
				margin-left: 12px;
			}
		}
	}

	.title {
		color: var(--l1-foreground);
		font-family: Inter;
		font-size: 13px;
		font-weight: 400;
		line-height: 1;
		letter-spacing: -0.065px;
	}

	.delete-text {
		color: var(--foreground);
		font-family: Inter;
		font-size: 14px;
		font-weight: 400;
		line-height: 20px;
		letter-spacing: -0.07px;

		strong {
			font-weight: 600;
			color: var(--l1-foreground);
		}
	}
}
