/**
 * RayanHost — داشبورد کاربری (حساب کاربری).
 * هماهنگ با متغیرهای رنگ و فونت main.css؛ RTL-first و کاملاً ریسپانسیو.
 */

/* ============ قالب کلی ============ */
.rh-account {
	max-width: 100%;
	margin-top: 6px;
}

.rh-account-title-sr { display: none; }

/* ============ نوار خوش‌آمد ============ */
.rh-account-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 18px;
	background: var(--rh-grad-dark, linear-gradient(160deg, #0a1832, #122350 60%, #1a3170));
	border-radius: var(--rh-radius, 18px);
	padding: 26px 28px;
	color: #fff;
	box-shadow: var(--rh-shadow-md, 0 10px 30px rgba(16, 26, 51, 0.10));
	overflow: hidden;
}

.rh-account-hero::before {
	content: "";
	position: absolute;
	width: 320px; height: 320px;
	border-radius: 50%;
	inset-inline-end: -110px; top: -160px;
	background: radial-gradient(circle, rgba(46, 91, 255, 0.45), transparent 70%);
	pointer-events: none;
}

.rh-account-hero::after {
	content: "";
	position: absolute;
	width: 260px; height: 260px;
	border-radius: 50%;
	inset-inline-start: -90px; bottom: -150px;
	background: radial-gradient(circle, rgba(0, 196, 140, 0.28), transparent 70%);
	pointer-events: none;
}

.rh-account-id {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
	position: relative;
	z-index: 1;
	flex: 1 1 320px;
}

.rh-account-avatar {
	flex-shrink: 0;
	width: 76px; height: 76px;
	border-radius: 50%;
	padding: 3px;
	background: linear-gradient(135deg, var(--rh-primary, #2e5bff), var(--rh-accent, #00c48c));
	display: inline-flex;
	box-shadow: 0 8px 24px rgba(46, 91, 255, 0.35);
}

.rh-account-avatar-img {
	width: 100%; height: 100%;
	border-radius: 50%;
	border: 3px solid #fff;
	object-fit: cover;
}

.rh-account-welcome {
	color: #fff;
	font-size: 1.35rem;
	margin: 0 0 4px;
}

.rh-account-welcome-sub {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9rem;
	margin: 0;
}

.rh-chip-role {
	flex-shrink: 0;
	background: rgba(0, 196, 140, 0.16);
	border: 1px solid rgba(0, 196, 140, 0.45);
	color: #7fe9c8;
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 0.82rem;
	font-weight: 700;
	position: relative;
	z-index: 1;
}

.rh-account-hero-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	position: relative;
	z-index: 1;
}

.rh-account-hero .rh-btn-ghost {
	padding: 9px 18px;
}

.rh-account-hero .rh-btn-ghost:hover {
	color: #fff;
}

/* دکمه ویرایش پروفایل روی پس‌زمینه تیره */
.rh-account-hero .rh-btn-outline {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.35);
	padding: 9px 18px;
}

.rh-account-hero .rh-btn-outline:hover {
	color: #fff;
	border-color: var(--rh-accent, #00c48c);
	background: rgba(0, 196, 140, 0.14);
	transform: translateY(-3px);
}

/* ============ کارت‌های آمار ============ */
.rh-account-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-top: 18px;
}

.rh-stat-card {
	background: var(--rh-card, #fff);
	border: 1px solid var(--rh-line, #e6eaf5);
	border-radius: var(--rh-radius-sm, 12px);
	padding: 18px 16px;
	text-align: center;
	box-shadow: var(--rh-shadow-sm, 0 2px 10px rgba(16, 26, 51, 0.06));
	transition: var(--rh-transition, all 0.28s cubic-bezier(0.4, 0, 0.2, 1));
	position: relative;
	overflow: hidden;
}

.rh-stat-card::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0; bottom: 0;
	width: 4px;
	background: var(--rh-primary, #2e5bff);
	opacity: 0.85;
}

.rh-stat-open::after { background: var(--rh-gold, #ffb13c); }
.rh-stat-answered::after { background: var(--rh-accent, #00c48c); }
.rh-stat-closed::after { background: var(--rh-muted, #8590ad); }

.rh-stat-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--rh-shadow-md, 0 10px 30px rgba(16, 26, 51, 0.10));
}

.rh-stat-number {
	display: block;
	font-size: 1.7rem;
	font-weight: 800;
	color: var(--rh-ink, #101a33);
	line-height: 1.4;
}

.rh-stat-label {
	color: var(--rh-body, #46516e);
	font-size: 0.86rem;
}

/* ============ تب‌ها ============ */
.rh-account-tabs {
	display: flex;
	gap: 8px;
	margin-top: 22px;
	flex-wrap: wrap;
}

.rh-account-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--rh-card, #fff);
	border: 1.6px solid var(--rh-line, #e6eaf5);
	color: var(--rh-body, #46516e);
	border-radius: 999px;
	padding: 10px 22px;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
	transition: var(--rh-transition, all 0.28s cubic-bezier(0.4, 0, 0.2, 1));
}

.rh-account-tab:hover {
	border-color: var(--rh-primary, #2e5bff);
	color: var(--rh-primary, #2e5bff);
	transform: translateY(-2px);
}

.rh-account-tab.is-active {
	background: var(--rh-grad-primary, linear-gradient(135deg, #2e5bff, #7a3bff));
	border-color: transparent;
	color: #fff;
	box-shadow: var(--rh-glow-primary, 0 10px 30px rgba(46, 91, 255, 0.35));
}

.rh-account-tab.is-active:hover {
	color: #fff;
}

/* ============ پنل‌ها ============ */
.rh-account-panels {
	margin-top: 18px;
}

.rh-account-panel {
	display: none;
	background: var(--rh-card, #fff);
	border: 1px solid var(--rh-line, #e6eaf5);
	border-radius: var(--rh-radius, 18px);
	padding: 22px;
	box-shadow: var(--rh-shadow-sm, 0 2px 10px rgba(16, 26, 51, 0.06));
}

.rh-account-panel.is-active {
	display: block;
	animation: rhPanelIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes rhPanelIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* پنل تیکت‌ها از استایل افزونه استفاده می‌کند؛ فاصله‌گذاری هارمونیک */
.rh-account-panel .rt-wrap { padding: 0; }
.rh-account-panel .rt-panel-wrap { background: transparent; border: 0; box-shadow: none; }

/* ============ اعلان نبود افزونه ============ */
.rh-account-notice {
	margin-top: 18px;
	background: #fff8ec;
	border: 1px solid #ffd9a0;
	border-radius: var(--rh-radius, 18px);
	padding: 26px;
	text-align: center;
	color: #7a4d0b;
}

.rh-account-notice .rh-icon-md { color: var(--rh-gold, #ffb13c); }
.rh-account-notice h3 { color: #7a4d0b; margin-bottom: 6px; }
.rh-account-notice p { margin: 0; font-size: 0.92rem; }

/* ============ کارت مهمان ============ */
.rh-guest-card {
	background: var(--rh-card, #fff);
	border: 1px solid var(--rh-line, #e6eaf5);
	border-radius: var(--rh-radius, 18px);
	box-shadow: var(--rh-shadow-md, 0 10px 30px rgba(16, 26, 51, 0.10));
	padding: 46px 30px;
	text-align: center;
	max-width: 520px;
	margin: 20px auto;
}

.rh-guest-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 84px; height: 84px;
	border-radius: 50%;
	background: var(--rh-grad-primary, linear-gradient(135deg, #2e5bff, #7a3bff));
	color: #fff;
	box-shadow: var(--rh-glow-primary, 0 10px 30px rgba(46, 91, 255, 0.35));
	margin-bottom: 18px;
}

.rh-guest-title {
	font-size: 1.3rem;
	margin-bottom: 8px;
}

.rh-guest-sub {
	color: var(--rh-body, #46516e);
	margin-bottom: 22px;
}

.rh-guest-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.rh-guest-hint {
	margin: 18px 0 0;
	font-size: 0.88rem;
	color: var(--rh-muted, #8590ad);
}

/* ============ کارت پروفایل ============ */
.rh-profile-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 16px;
	border-bottom: 1px dashed var(--rh-line, #e6eaf5);
	margin-bottom: 18px;
}

.rh-profile-head .rh-account-avatar {
	width: 62px; height: 62px;
}

.rh-profile-name { margin: 0 0 4px; font-size: 1.1rem; }
.rh-profile-role { margin: 0; font-size: 0.86rem; color: var(--rh-muted, #8590ad); }

.rh-profile-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin: 0 0 18px;
}

.rh-profile-item {
	background: var(--rh-bg, #f6f8fe);
	border-radius: var(--rh-radius-sm, 12px);
	padding: 12px 16px;
}

.rh-profile-item-wide { grid-column: 1 / -1; }

.rh-profile-item dt {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--rh-muted, #8590ad);
	margin-bottom: 2px;
}

.rh-profile-item dd {
	margin: 0;
	color: var(--rh-ink, #101a33);
	font-size: 0.95rem;
	overflow-wrap: anywhere;
}

.rh-profile-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* ============ ریسپانسیو ============ */
@media (max-width: 860px) {
	.rh-account-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.rh-account-hero { padding: 22px 18px; }
	.rh-account-id { flex-direction: column; text-align: center; }
	.rh-chip-role { display: none; }
	.rh-account-hero-actions { width: 100%; justify-content: center; }
	.rh-profile-grid { grid-template-columns: 1fr; }
	.rh-account-tab { flex: 1 1 auto; justify-content: center; padding: 10px 14px; }
	.rh-account-panel { padding: 16px; }
}
