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

.tnt .tnt-top {
	position: relative; overflow: hidden; color: #fff;
	background:
		radial-gradient(700px 260px at 12% -30%, rgba(var(--tnt-gold-rgb), .30), transparent 60%),
		radial-gradient(500px 240px at 95% 120%, rgba(255, 255, 255, .06), transparent 60%),
		linear-gradient(135deg, var(--tnt-navy-900) 0%, var(--tnt-navy-700) 100%);
	padding: 26px 32px 100px;
}
/* نقش زخرفي خفيف */
.tnt .tnt-top::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px;
	mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.tnt .tnt-top__bar { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; max-width: 1256px; margin: 0 auto; }
.tnt .tnt-top__titles { min-width: 0; }
.tnt .tnt-top__eyebrow { color: var(--tnt-gold); font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.tnt .tnt-top__title { color: #fff; font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; line-height: 1.35; }
.tnt .tnt-top__sub { color: rgba(255, 255, 255, .72); margin-top: 6px; font-size: 14px; }
.tnt .tnt-top__back {
	display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 12px 4px 10px; border-radius: 99px;
	background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .8); font-size: 12.5px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s;
}
.tnt .tnt-top__back:hover { background: rgba(255, 255, 255, .16); color: var(--tnt-gold); }

/* الأزرار: الإشعارات والحساب */
.tnt .tnt-top__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tnt .tnt-top__icon {
	position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; text-decoration: none;
	background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; transition: background .15s, color .15s, transform .15s;
}
.tnt .tnt-top__icon:hover, .tnt .tnt-top__icon.is-active { background: rgba(255, 255, 255, .16); color: var(--tnt-gold); transform: translateY(-1px); }
.tnt .tnt-top__dot {
	position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px;
	background: var(--tnt-gold); color: var(--tnt-navy-900); font-size: 11px; font-weight: 800; display: grid; place-items: center;
	box-shadow: 0 0 0 3px var(--tnt-navy-800); animation: tnt-pop .4s var(--tnt-ease);
}
@keyframes tnt-pop { from { transform: scale(0); } to { transform: scale(1); } }
.tnt .tnt-top__me { text-decoration: none; border-radius: 14px; }
.tnt .tnt-top__avatar {
	width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 17px;
	background: linear-gradient(135deg, var(--tnt-gold-400), var(--tnt-gold-600)); color: var(--tnt-navy-900); box-shadow: 0 8px 18px -8px rgba(var(--tnt-gold-rgb), .9);
	transition: transform .15s;
}
.tnt .tnt-top__me:hover .tnt-top__avatar { transform: translateY(-1px) rotate(-4deg); }

@media (max-width: 960px) {
	.tnt .tnt-top { padding: 18px 16px 84px; }
	.tnt .tnt-top__icon, .tnt .tnt-top__avatar { width: 40px; height: 40px; border-radius: 12px; }
}

/* جرس الإشعارات: قائمة منسدلة بآخر الإشعارات (templates/layouts/portal/bell.php) */
.tnt .tnt-bell { position: relative; }
.tnt .tnt-bell .tnt-top__icon { cursor: pointer; font: inherit; }
.tnt .tnt-bell.is-open .tnt-top__icon { background: rgba(255, 255, 255, .18); color: var(--tnt-gold); }
.tnt .tnt-bell__ring { transform-origin: 50% 4px; animation: tnt-bell-ring 1.4s ease-in-out 1s 2; }
@keyframes tnt-bell-ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-12deg); } }
.tnt .tnt-bell__panel {
	position: fixed; z-index: 1000; width: 360px; max-width: calc(100vw - 32px);
	background: var(--tnt-surface); border: 1px solid var(--tnt-border); border-radius: 16px; box-shadow: var(--tnt-shadow-lg); overflow: hidden;
	animation: tnt-bell-in .18s var(--tnt-ease);
}
.tnt .tnt-bell__panel[hidden] { display: none; }
@keyframes tnt-bell-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tnt .tnt-bell__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--tnt-border); }
.tnt .tnt-bell__head strong { font-size: 15px; color: var(--tnt-navy-900); }
.tnt .tnt-bell__count { padding: 3px 10px; border-radius: 99px; background: var(--tnt-gold-50); color: var(--tnt-gold-600); font-size: 12px; font-weight: 700; }
.tnt .tnt-bell__list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.tnt .tnt-bell__item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; color: var(--tnt-text); text-decoration: none; transition: background .15s; }
.tnt .tnt-bell__item:hover { background: var(--tnt-surface-2); }
.tnt .tnt-bell__item.is-unread { background: var(--tnt-primary-50); }
.tnt .tnt-bell__icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--tnt-surface-2); color: var(--tnt-navy-700); border: 1px solid var(--tnt-border); }
.tnt .tnt-bell__item.is-unread .tnt-bell__icon { background: linear-gradient(135deg, var(--tnt-gold-400), var(--tnt-gold-600)); color: var(--tnt-navy-900); border-color: transparent; }
.tnt .tnt-bell__text { display: grid; gap: 3px; min-width: 0; font-size: 13.5px; line-height: 1.6; text-align: right; }
.tnt .tnt-bell__item.is-unread .tnt-bell__text > span { font-weight: 700; }
.tnt .tnt-bell__text small { font-size: 11.5px; color: var(--tnt-muted); }
.tnt .tnt-bell__empty { display: grid; justify-items: center; gap: 8px; padding: 30px 16px; color: var(--tnt-muted); font-size: 13.5px; }
.tnt .tnt-bell__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--tnt-border); background: var(--tnt-surface-2); }
.tnt .tnt-bell__foot > a { font-size: 13px; font-weight: 700; color: var(--tnt-navy-800); }
.tnt .tnt-bell__foot > a:hover { color: var(--tnt-gold-600); }
@media (prefers-reduced-motion: reduce) { .tnt .tnt-bell__ring { animation: none; } }
