/* ===== LOGIN OVERLAY ===== */
.login-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	background:
		linear-gradient(160deg, #071a10 0%, #0d3320 40%, #0a2318 70%, #071510 100%);
	background-size: cover;
}

.login-overlay::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpath d='M50 5 L95 27.5 L95 72.5 L50 95 L5 72.5 L5 27.5 Z' fill='none' stroke='%2322c55e' stroke-width='0.6' opacity='0.12'/%3E%3Cpath d='M50 20 L80 35 L80 65 L50 80 L20 65 L20 35 Z' fill='none' stroke='%23d4a829' stroke-width='0.5' opacity='0.1'/%3E%3Ccircle cx='50' cy='50' r='12' fill='none' stroke='%2322c55e' stroke-width='0.5' opacity='0.1'/%3E%3Cpath d='M50 5 L50 20 M95 27.5 L80 35 M95 72.5 L80 65 M50 95 L50 80 M5 72.5 L20 65 M5 27.5 L20 35' stroke='%23d4a829' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
	pointer-events: none;
}

.login-overlay.active { display: flex; }

.login-box {
	background: #0f2318;
	border-radius: 20px;
	padding: 44px 40px 38px;
	width: 100%;
	max-width: 400px;
	box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,168,41,0.25);
	position: relative;
	z-index: 1;
	border: 1px solid rgba(212,168,41,0.2);
}

.login-box::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, #d4a829, #3db870, #d4a829, transparent);
	border-radius: 20px 20px 0 0;
}

.login-logo { text-align: center; margin-bottom: 28px; }

.login-logo .bell-icon {
	font-size: 52px;
	display: block;
	margin-bottom: 12px;
	filter: drop-shadow(0 4px 12px rgba(212,168,41,0.5));
	animation: pulse-bell 2.5s ease-in-out infinite;
}

@keyframes pulse-bell {
	0%, 100% { transform: scale(1) rotate(0deg); }
	50% { transform: scale(1.06) rotate(3deg); }
}

.login-logo h2 {
	font-size: 22px;
	font-weight: 800;
	font-family: 'Cairo', sans-serif;
	color: #e8e3d5;
	margin-bottom: 4px;
}

.login-logo .bismillah {
	font-family: 'Amiri', serif;
	font-size: 18px;
	color: var(--clr-gold-lt);
	display: block;
	margin-bottom: 8px;
	letter-spacing: 1px;
}

.login-logo p { color: #7a9a82; font-size: 13px; }

.login-field { margin-bottom: 16px; }

.login-field label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #9ec9a8;
	margin-bottom: 7px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-family: 'Cairo', sans-serif;
}

.login-field input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #1f4030;
	border-radius: 10px;
	font-size: 14px;
	font-family: 'Cairo', sans-serif;
	background: #071510;
	color: #e8e3d5;
	transition: border-color 0.2s, box-shadow 0.2s;
	outline: none;
}

.login-field input:focus {
	border-color: var(--clr-gold);
	box-shadow: 0 0 0 3px rgba(212,168,41,0.15);
}

.login-btn {
	width: 100%;
	padding: 13px;
	background: linear-gradient(135deg, #1a6b3c, #0d3320);
	color: white;
	border: 1px solid rgba(212,168,41,0.35);
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	font-family: 'Cairo', sans-serif;
	cursor: pointer;
	transition: all 0.25s;
	margin-top: 8px;
	letter-spacing: 0.3px;
}

.login-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #22863e, #145228);
	box-shadow: 0 6px 24px rgba(26,107,60,0.4);
	transform: translateY(-1px);
}

.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-error {
	background: rgba(220,38,38,0.15);
	color: #fca5a5;
	border: 1px solid rgba(220,38,38,0.4);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 14px;
	display: none;
}

.login-error.show { display: block; }

/* ===== USER BADGE ===== */
.user-badge {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(255,255,255,0.12);
	border-radius: 10px;
	padding: 7px 12px;
	color: white;
	font-size: 13px;
	border: 1px solid rgba(255,255,255,0.15);
}

.user-badge .avatar {
	width: 30px; height: 30px;
	background: rgba(212,168,41,0.3);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 13px;
	border: 1px solid rgba(212,168,41,0.5);
}

.user-badge .btn-logout {
	background: rgba(255,255,255,0.15);
	border: none;
	border-radius: 6px;
	color: white;
	padding: 4px 10px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	font-family: 'Cairo', sans-serif;
	transition: background 0.2s;
}

.user-badge .btn-logout:hover { background: rgba(255,255,255,0.3); }

/* ===== ROLE BADGES ===== */
.role-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 9px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.3px;
}

.role-admin    { background: #fce7f3; color: #9d174d; }
.role-operator { background: #dcfce7; color: #14532d; }
.role-viewer   { background: var(--bg-card); color: var(--clr-text-muted); }

html.dark .role-admin    { background: #500724; color: #fbcfe8; }
html.dark .role-operator { background: #14532d; color: #86efac; }

