/*!
 * Nuso Giya Login UI — stylesheet
 * Mobile-first, green & white, matches the supplied login reference.
 */

:root {
	--ngl-green-900: #0b2e3e;
	--ngl-green-700: #0e7c4a;
	--ngl-green-600: #128a53;
	--ngl-green-500: #17b26a;
	--ngl-green-100: #e6f7ee;
	--ngl-green-50: #f2fbf6;
	--ngl-red: #d6342c;
	--ngl-red-50: #fdeceb;
	--ngl-ink: #16211f;
	--ngl-gray-600: #667085;
	--ngl-gray-400: #98a2b3;
	--ngl-gray-300: #d0d5dd;
	--ngl-gray-200: #eaecef;
	--ngl-gray-100: #f4f6f5;
	--ngl-white: #ffffff;
	--ngl-radius-sm: 10px;
	--ngl-radius-md: 14px;
	--ngl-radius-lg: 26px;
	--ngl-shadow-sm: 0 2px 8px rgba(16, 40, 34, 0.06);
	--ngl-shadow-md: 0 8px 24px rgba(16, 40, 34, 0.10);
	--ngl-shadow-btn: 0 10px 22px rgba(14, 124, 74, 0.28);
	--ngl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html.ngl-login-body,
body.ngl-login-body {
	margin: 0;
	padding: 0;
	background: var(--ngl-white);
}

.ngl-root {
	font-family: var(--ngl-font);
	color: var(--ngl-ink);
	background: var(--ngl-white);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	display: flex;
	justify-content: center;
}

.ngl-root *,
.ngl-root *::before,
.ngl-root *::after {
	box-sizing: border-box;
}

.ngl-root button {
	font-family: inherit;
	cursor: pointer;
}

.ngl-root a {
	text-decoration: none;
}

/* ==========================================================================
   Shell
   ========================================================================== */

.ngl-shell {
	width: 100%;
	max-width: 480px;
	min-height: 100vh;
	background: var(--ngl-white);
	display: flex;
	flex-direction: column;
}

/* ==========================================================================
   Header
   ========================================================================== */

.ngl-header {
	background: linear-gradient(180deg, var(--ngl-green-600) 0%, var(--ngl-green-700) 100%);
	padding: max(18px, env(safe-area-inset-top)) 16px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	box-shadow: var(--ngl-shadow-sm);
}

.ngl-back {
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ngl-white);
	flex-shrink: 0;
	border-radius: 50%;
	transition: background 0.15s ease;
}

.ngl-back:hover,
.ngl-back:focus-visible {
	background: rgba(255, 255, 255, 0.15);
}

.ngl-back svg {
	width: 22px;
	height: 22px;
}

.ngl-header-title {
	flex: 1;
	text-align: center;
	margin: 0;
	color: var(--ngl-white);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.2px;
}

.ngl-header-spacer {
	width: 30px;
	flex-shrink: 0;
}

/* ==========================================================================
   Content
   ========================================================================== */

.ngl-content {
	flex: 1;
	padding: 28px 22px 40px;
	display: flex;
	flex-direction: column;
}

.ngl-logo-block {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 6px 0 30px;
}

.ngl-logo-mark {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

.ngl-logo-mark svg {
	width: 100%;
	height: 100%;
}

.ngl-logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.ngl-logo-title {
	font-size: 24px;
	font-weight: 800;
	color: var(--ngl-green-900);
	letter-spacing: -0.2px;
}

.ngl-logo-tagline {
	font-size: 12px;
	font-weight: 600;
	color: var(--ngl-green-600);
}

.ngl-welcome {
	margin: 0 0 6px;
	text-align: center;
	font-size: 24px;
	font-weight: 800;
	color: var(--ngl-green-900);
}

.ngl-subtitle {
	margin: 0 0 22px;
	text-align: center;
	font-size: 14px;
	color: var(--ngl-gray-600);
}

/* ==========================================================================
   Alert
   ========================================================================== */

.ngl-alert {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	background: var(--ngl-red-50);
	color: var(--ngl-red);
	border: 1px solid rgba(214, 52, 44, 0.18);
	border-radius: var(--ngl-radius-sm);
	padding: 12px 14px;
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 18px;
	animation: ngl-alert-in 0.25s ease;
}

.ngl-alert[hidden] {
	display: none;
}

.ngl-alert svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 1px;
}

@keyframes ngl-alert-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   Form
   ========================================================================== */

.ngl-form {
	display: flex;
	flex-direction: column;
}

.ngl-field-group {
	margin-bottom: 18px;
}

.ngl-field-group label {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--ngl-green-900);
	margin-bottom: 8px;
}

.ngl-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
	border: 1.5px solid var(--ngl-gray-200);
	border-radius: var(--ngl-radius-md);
	background: var(--ngl-white);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ngl-input-wrap:focus-within {
	border-color: var(--ngl-green-600);
	box-shadow: 0 0 0 3px var(--ngl-green-100);
}

.ngl-input-wrap.is-invalid {
	border-color: var(--ngl-red);
}

.ngl-input-wrap.is-invalid:focus-within {
	box-shadow: 0 0 0 3px var(--ngl-red-50);
}

.ngl-input-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	flex-shrink: 0;
	color: var(--ngl-gray-400);
}

.ngl-input-icon svg {
	width: 18px;
	height: 18px;
}

.ngl-input {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	background: transparent;
	padding: 15px 14px 15px 0;
	font-size: 15px;
	color: var(--ngl-ink);
	font-family: inherit;
}

.ngl-input::placeholder {
	color: var(--ngl-gray-400);
}

.ngl-toggle-password {
	background: none;
	border: none;
	width: 44px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ngl-gray-400);
	padding: 0;
}

.ngl-toggle-password svg {
	width: 19px;
	height: 19px;
}

.ngl-toggle-password:hover,
.ngl-toggle-password:focus-visible {
	color: var(--ngl-green-600);
}

.ngl-field-error {
	display: block;
	min-height: 0;
	font-size: 12.5px;
	color: var(--ngl-red);
	font-weight: 600;
	margin-top: 6px;
}

.ngl-field-error:empty {
	display: none;
}

/* ==========================================================================
   Row: remember me / forgot password
   ========================================================================== */

.ngl-row-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 2px 0 26px;
	flex-wrap: wrap;
	gap: 10px;
}

.ngl-checkbox {
	display: flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	font-size: 13.5px;
	color: var(--ngl-ink);
	font-weight: 500;
	user-select: none;
}

.ngl-checkbox input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ngl-checkbox-box {
	width: 19px;
	height: 19px;
	border-radius: 5px;
	background: var(--ngl-gray-200);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s ease;
}

.ngl-checkbox-box svg {
	width: 11px;
	height: 9px;
	opacity: 0;
	transition: opacity 0.1s ease;
}

.ngl-checkbox input:checked + .ngl-checkbox-box {
	background: var(--ngl-green-600);
}

.ngl-checkbox input:checked + .ngl-checkbox-box svg {
	opacity: 1;
}

.ngl-checkbox input:focus-visible + .ngl-checkbox-box {
	box-shadow: 0 0 0 3px var(--ngl-green-100);
}

.ngl-link-muted {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--ngl-green-600);
}

.ngl-link-muted:hover {
	color: var(--ngl-green-700);
	text-decoration: underline;
}

/* ==========================================================================
   Button
   ========================================================================== */

.ngl-btn-primary {
	position: relative;
	border: none;
	background: linear-gradient(180deg, var(--ngl-green-600) 0%, var(--ngl-green-700) 100%);
	color: var(--ngl-white);
	font-size: 16px;
	font-weight: 700;
	padding: 16px;
	border-radius: var(--ngl-radius-lg);
	box-shadow: var(--ngl-shadow-btn);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.1s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ngl-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(14, 124, 74, 0.34);
}

.ngl-btn-primary:active {
	transform: translateY(0);
}

.ngl-btn-primary:disabled {
	opacity: 0.85;
	cursor: default;
	transform: none;
}

.ngl-btn-spinner {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: var(--ngl-white);
	margin-left: 10px;
	display: none;
	animation: ngl-spin 0.7s linear infinite;
}

.ngl-btn-primary.is-loading .ngl-btn-spinner {
	display: inline-block;
}

.ngl-btn-primary.is-loading .ngl-btn-text {
	opacity: 0.9;
}

@keyframes ngl-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   Register row / toast
   ========================================================================== */

.ngl-register-row {
	text-align: center;
	margin: 22px 0 0;
	font-size: 13.5px;
	color: var(--ngl-gray-600);
}

.ngl-link {
	color: var(--ngl-green-600);
	font-weight: 700;
}

.ngl-link:hover {
	color: var(--ngl-green-700);
	text-decoration: underline;
}

.ngl-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%) translateY(12px);
	background: var(--ngl-green-900);
	color: var(--ngl-white);
	font-size: 13.5px;
	font-weight: 600;
	padding: 12px 20px;
	border-radius: 999px;
	box-shadow: var(--ngl-shadow-md);
	opacity: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 999;
	pointer-events: none;
}

.ngl-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.ngl-toast[hidden] {
	display: none;
}

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 360px) {
	.ngl-content {
		padding: 24px 18px 32px;
	}

	.ngl-welcome {
		font-size: 21px;
	}
}
