/* Alpha Federations — branded sign-in pages (standalone, no theme). */
:root {
	--afed-primary: #0B7A43;
	--afed-primary-dark: #075C32;
	--afed-dark: #111827;
	--afed-font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
	--afed-line: #E5E7EB;
	--afed-muted: #6B7280;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.afed-auth-body { font-family: var(--afed-font); color: var(--afed-dark); background: #F6F7F5; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.afed-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.afed-auth--single { grid-template-columns: 1fr; }

/* Brand panel */
.afed-auth__brand {
	position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
	padding: 48px clamp(28px, 5vw, 72px);
	background: linear-gradient(150deg, var(--afed-primary-dark) 0%, var(--afed-dark) 70%);
}
.afed-auth__brand::before {
	content: ""; position: absolute; inset: 0; background-image: var(--afed-auth-img, none); background-size: cover; background-position: center; opacity: .22; mix-blend-mode: luminosity;
}
.afed-auth__brand::after {
	content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; inset-inline-end: -180px; bottom: -220px;
	border: 70px solid rgba(255, 255, 255, .05);
}
.afed-auth__brand-in, .afed-auth__foot { position: relative; z-index: 1; }
.afed-auth__logo { display: inline-flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; }
.afed-auth__logo img { width: 64px; height: 64px; border-radius: 16px; background: #fff; object-fit: contain; padding: 6px; }
.afed-auth__mono { width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-weight: 700; font-size: 18px; letter-spacing: .04em; border: 1px solid rgba(255,255,255,.25); }
.afed-auth__tagline { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.35; margin: 56px 0 22px; max-width: 520px; }
.afed-auth__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: rgba(255,255,255,.85); }
.afed-auth__points li { display: flex; align-items: center; gap: 10px; }
.afed-auth__points li::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; background: rgba(255,255,255,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat; }
.afed-auth__foot { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: rgba(255,255,255,.65); }

/* Form side */
.afed-auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 18px; }
.afed-auth__card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--afed-line); border-radius: 20px; padding: 34px 30px; box-shadow: 0 20px 50px -30px rgba(17, 24, 39, .35); }
.afed-auth__title { font-size: 24px; line-height: 1.3; margin: 0 0 6px; font-weight: 700; }
.afed-auth__sub { color: var(--afed-muted); margin: 0 0 22px; }
.afed-auth__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: #ECFDF5; color: var(--afed-primary); }
.afed-auth__icon.is-warn { background: #FEF3C7; color: #B45309; }
.afed-auth__form { display: flex; flex-direction: column; gap: 8px; }
.afed-auth__form label { font-size: 13px; font-weight: 600; color: #374151; }
.afed-auth__form input[type="text"], .afed-auth__form input[type="email"], .afed-auth__form input[type="password"], .afed-auth__form input:not([type]) {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #D1D5DB; border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: inherit; margin-bottom: 8px; transition: border-color .15s, box-shadow .15s;
}
.afed-auth__form input:focus { outline: none; border-color: var(--afed-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--afed-primary) 18%, transparent); }
.afed-auth__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.afed-auth__row a, .afed-auth__links a, .afed-auth__home { color: var(--afed-primary); text-decoration: none; font-size: 13px; font-weight: 600; }
.afed-auth__row a:hover, .afed-auth__links a:hover, .afed-auth__home:hover { text-decoration: underline; }
.afed-auth__pw { position: relative; }
.afed-auth__pw input { padding-inline-end: 48px !important; }
.afed-auth__eye { position: absolute; inset-inline-end: 6px; top: 6px; width: 36px; height: 36px; border: 0; background: none; color: var(--afed-muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.afed-auth__eye[aria-pressed="true"] { color: var(--afed-primary); }
.afed-auth__check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; margin: 4px 0 10px; }
.afed-auth__check input { width: 18px; height: 18px; accent-color: var(--afed-primary); }
.afed-auth__btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border: 0; border-radius: 12px; background: var(--afed-primary); color: #fff; font: 600 16px var(--afed-font); cursor: pointer; text-decoration: none; margin-top: 6px; transition: background .15s, transform .05s; }
.afed-auth__btn:hover { background: var(--afed-primary-dark); }
.afed-auth__btn:active { transform: translateY(1px); }
.afed-auth__btn:disabled { opacity: .7; cursor: progress; }
.afed-auth__note { font-size: 13px; color: var(--afed-muted); margin: 18px 0 0; }
.afed-auth__links { margin: 16px 0 0; text-align: center; }
.afed-auth__hint { font-size: 12px; color: var(--afed-muted); margin: 0 0 8px; }
.afed-auth__code { text-align: center; font-size: 26px !important; letter-spacing: .35em; font-weight: 600; }
.afed-auth__alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin: 0 0 16px; background: #EFF6FF; color: #1E40AF; }
.afed-auth__alert.is-error { background: #FEF2F2; color: #991B1B; }
.afed-auth__alert.is-success { background: #ECFDF5; color: #065F46; }
.afed-auth__alert.is-warning { background: #FFFBEB; color: #92400E; }
.afed-auth__meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 6px; align-items: center; margin: -2px 0 4px; }
.afed-auth__meter i { height: 5px; border-radius: 3px; background: #E5E7EB; }
.afed-auth__meter span { font-size: 12px; color: var(--afed-muted); min-width: 52px; text-align: end; }
.afed-auth__meter[data-score="1"] i:nth-child(-n+1) { background: #DC2626; }
.afed-auth__meter[data-score="2"] i:nth-child(-n+2) { background: #F59E0B; }
.afed-auth__meter[data-score="3"] i:nth-child(-n+3) { background: #10B981; }
.afed-auth__meter[data-score="4"] i { background: var(--afed-primary); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 900px) {
	.afed-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
	.afed-auth__brand { padding: 22px 20px; }
	.afed-auth__brand::after, .afed-auth__points, .afed-auth__foot { display: none; }
	.afed-auth__tagline { font-size: 16px; font-weight: 500; margin: 10px 0 0; color: rgba(255,255,255,.8); }
	.afed-auth__logo { font-size: 17px; }
	.afed-auth__logo img, .afed-auth__mono { width: 48px; height: 48px; }
	.afed-auth__main { justify-content: flex-start; padding-top: 24px; }
	.afed-auth__card { padding: 26px 20px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.afed-auth__title + .afed-auth__form, .afed-auth__title + .afed-auth__alert { margin-top: 22px; }
.afed-auth__foot a { color: inherit; text-decoration: underline; }
