/**
 * القائمة الجانبية للبوابة (templates/layouts/portal/sidebar.php)
 * بنفس هوية قائمة لوحة التحكم: كحلي متدرج بتوهج ذهبي، والعنصر النشط بلمسة ذهبية
 * في الجوال تصبح قائمة منزلقة تُفتح من زر "المزيد" في الشريط السفلي
 */

.tnt .tnt-side {
	--side-bg:
		radial-gradient(420px 280px at 50% -60px, rgba(var(--tnt-gold-rgb), .22), transparent 70%),
		radial-gradient(360px 300px at 50% 105%, rgba(var(--tnt-gold-rgb), .10), transparent 70%),
		linear-gradient(180deg, var(--tnt-navy-900) 0%, var(--tnt-navy-800) 55%, var(--tnt-navy-700) 100%);
	position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none;
	display: flex; flex-direction: column; gap: 18px; padding: 20px 14px;
	background: var(--side-bg); color: #fff; z-index: 100;
}
.tnt .tnt-side::-webkit-scrollbar { display: none; }

/* الشعار والاسم */
.tnt .tnt-side__top { display: flex; align-items: center; gap: 8px; padding: 2px 6px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tnt .tnt-side__brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: #fff; text-decoration: none; }
.tnt .tnt-side__logo { width: 46px; height: 46px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex-shrink: 0; padding: 5px; color: var(--tnt-navy-900); box-shadow: 0 0 0 3px rgba(var(--tnt-gold-rgb), .35); }
.tnt .tnt-side__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tnt .tnt-side__name { display: grid; min-width: 0; }
.tnt .tnt-side__name strong { font-size: 14.5px; font-weight: 800; line-height: 1.4; color: #fff; }
.tnt .tnt-side__name small { font-size: 12px; color: var(--tnt-gold); font-weight: 600; }
.tnt .tnt-side__close { display: none; background: rgba(255, 255, 255, .08); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; place-items: center; }

/* العناصر */
.tnt .tnt-side__nav { display: grid; gap: 4px; }
.tnt .tnt-side__nav a {
	position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px;
	color: var(--tnt-menu-text); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background .18s, color .18s;
}
.tnt .tnt-side__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--tnt-menu-icon); transition: background .18s, color .18s, transform .18s; flex-shrink: 0; }
.tnt .tnt-side__nav a:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.tnt .tnt-side__nav a:hover .tnt-side__icon { transform: scale(1.06); color: var(--tnt-gold); }
.tnt .tnt-side__nav a.is-active { background: linear-gradient(90deg, rgba(var(--tnt-gold-rgb), .24), rgba(var(--tnt-gold-rgb), .06)); color: #fff; box-shadow: inset 0 0 0 1px rgba(var(--tnt-gold-rgb), .28); }
.tnt .tnt-side__nav a.is-active .tnt-side__icon { background: linear-gradient(135deg, var(--tnt-gold-400), var(--tnt-gold-600)); color: var(--tnt-navy-900); box-shadow: 0 6px 14px -6px rgba(var(--tnt-gold-rgb), .8); }
.tnt .tnt-side__nav a.is-active::before { content: ""; position: absolute; inset-inline-start: -14px; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--tnt-gold); }
.tnt .tnt-side__nav a:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(var(--tnt-gold-rgb), .75); }
.tnt .tnt-side__count { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--tnt-gold); color: var(--tnt-navy-900); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }

/* بطاقة المستخدم */
.tnt .tnt-side__user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.tnt .tnt-side__avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--tnt-gold-400), var(--tnt-gold-600)); color: var(--tnt-navy-900); font-weight: 800; flex-shrink: 0; }
.tnt .tnt-side__who { display: grid; min-width: 0; flex: 1; }
.tnt .tnt-side__who strong { font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnt .tnt-side__who small { font-size: 12px; color: rgba(255, 255, 255, .55); }
.tnt .tnt-side__logout { width: 36px; height: 36px; border-radius: 10px; border: 0; cursor: pointer; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--tnt-menu-icon); transition: background .15s, color .15s; }
.tnt .tnt-side__logout:hover { background: rgba(var(--tnt-danger-rgb), .9); color: #fff; }

/* الجوال: قائمة منزلقة من جهة البداية */
@media (max-width: 960px) {
	.tnt .tnt-side {
		position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); height: 100%;
		transform: translateX(105%); transition: transform .28s var(--tnt-ease); box-shadow: none;
		padding-bottom: calc(20px + env(safe-area-inset-bottom));
	}
	.tnt .tnt-side.is-open { transform: none; box-shadow: var(--tnt-shadow-lg); }
	.tnt .tnt-side__close { display: grid; }
}

/* التبديل بين الحسابات (حساب متعدد الأدوار: مدرب / متدرب / إدارة) */
.tnt .tnt-side__switch { margin-top: auto; margin-bottom: 10px; display: grid; gap: 4px; padding: 10px; border-radius: 14px; background: rgba(var(--tnt-gold-rgb), .07); border: 1px dashed rgba(var(--tnt-gold-rgb), .3); }
.tnt .tnt-side__switch-title { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--tnt-gold); padding: 0 4px 4px; }
.tnt .tnt-side__switch a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .78); text-decoration: none; transition: background .15s, color .15s; }
.tnt .tnt-side__switch a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.tnt .tnt-side__switch a span { flex: 1; }
.tnt .tnt-side__switch a.is-active { background: rgba(var(--tnt-gold-rgb), .2); color: #fff; }
.tnt .tnt-side__switch a.is-active svg:last-child { color: var(--tnt-gold); }
.tnt .tnt-side__switch + .tnt-side__user { margin-top: 0; }
