/*!
 * Nuso Giya Login UI — stylesheet (v1.2.0)
 * Responsive, mobile-first e-commerce design system.
 * Breakpoints: base (<600) · 600 tablet · 1024 desktop · 1440 wide.
 */

/* ---------- Design tokens ---------- */
:root {
	--ngl-navy: #0a2a5e;
	--ngl-green-900: #064e2b;
	--ngl-green-800: #0a6b38;
	--ngl-green-700: #0e8a43;
	--ngl-green-600: #16a34a;
	--ngl-green-500: #2ec14e;
	--ngl-green-200: #cfeed7;
	--ngl-green-100: #e6f6ea;
	--ngl-green-50: #f3fbf5;
	--ngl-red: #d6342c;
	--ngl-red-50: #fdeceb;
	--ngl-ink: #16211f;
	--ngl-gray-600: #5d6b73;
	--ngl-gray-400: #8b97a1;
	--ngl-gray-300: #d6dde3;
	--ngl-gray-200: #e8edf1;
	--ngl-white: #fff;

	--ngl-radius-pill: 999px;
	--ngl-radius-card: 22px;
	--ngl-shadow-card: 0 6px 22px rgba(16, 70, 40, 0.07);
	--ngl-shadow-btn: 0 12px 24px rgba(22, 163, 74, 0.32);

	--ngl-touch: 3.25rem; /* >=48px touch target */
	--ngl-font: "Poppins", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ngl-script: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive;

	/* fluid type scale */
	--ngl-fs-title: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
	--ngl-fs-body: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
	--ngl-fs-label: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
}

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

/* ---------- Root / background ---------- */
.ngl-root {
	position: relative;
	font-family: var(--ngl-font);
	font-size: var(--ngl-fs-body);
	color: var(--ngl-ink);
	background: linear-gradient(180deg, #f6fcf8 0%, #fff 40%);
	min-height: 100vh;
	min-height: 100dvh;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
	overflow-x: hidden;
}

.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; color: inherit; }
.ngl-root svg { display: block; }

.ngl-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.ngl-blob { position: absolute; border-radius: 50%; background: var(--ngl-green-100); }
.ngl-blob--tl { width: 60vw; height: 40vw; max-width: 520px; max-height: 360px; left: -22vw; top: -12vw; background: #dff5e8; opacity: .8; }
.ngl-blob--tr { width: 52vw; height: 52vw; max-width: 480px; max-height: 480px; right: -22vw; top: -16vw; background: #e8f7e6; }
.ngl-leaf { position: absolute; width: clamp(70px, 20vw, 150px); right: 0; top: 0; }
.ngl-hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(90px, 16vh, 170px); }

/* ---------- Shell (mobile first: single column) ---------- */
.ngl-shell {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	min-height: 100vh;
	min-height: 100dvh;
	padding: max(1rem, env(safe-area-inset-top)) clamp(1rem, 4.5vw, 1.5rem) calc(8.5rem + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
}

.ngl-back {
	position: absolute;
	top: max(1rem, env(safe-area-inset-top));
	left: clamp(1rem, 4.5vw, 1.5rem);
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--ngl-green-100);
	color: var(--ngl-green-800);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, transform .15s;
	z-index: 3;
}
.ngl-back svg { width: 1.4rem; height: 1.4rem; }
.ngl-back:hover { background: var(--ngl-green-200); }
.ngl-back:active { transform: scale(.94); }

/* ---------- Brand ---------- */
.ngl-brand { text-align: center; padding-top: 0.5rem; }

.ngl-logo-block { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: .25rem auto 1.5rem; padding-left: 1.5rem; }
.ngl-logo-mark { width: clamp(3.4rem, 15vw, 4.6rem); flex: none; }
.ngl-logo-mark svg { width: 100%; height: auto; }
.ngl-logo-text { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ngl-logo-title {
	font-size: clamp(2rem, 8.5vw, 2.9rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.5px;
	white-space: nowrap;
}
.ngl-logo-nuso { color: var(--ngl-navy); }
.ngl-logo-giya { color: var(--ngl-green-600); position: relative; margin-left: .15em; }
.ngl-logo-y { position: relative; }
.ngl-logo-y::before {
	content: "";
	position: absolute;
	width: .34em; height: .2em;
	left: .2em; top: -.16em;
	background: var(--ngl-green-500);
	border-radius: 100% 0 100% 0;
	transform: rotate(-10deg);
}
.ngl-logo-tagline {
	display: flex; align-items: center; gap: .35rem;
	margin-top: .35rem;
	font-size: clamp(.7rem, 3.2vw, .98rem);
	font-weight: 600;
	color: var(--ngl-green-700);
	white-space: nowrap;
}
.ngl-logo-tagline::before,
.ngl-logo-tagline::after { content: ""; width: 1rem; height: 2px; background: var(--ngl-green-700); border-radius: 2px; }

.ngl-welcome-wrap { margin: 0 0 .9rem; }
.ngl-welcome {
	display: inline-block;
	padding: .35rem 1.6rem;
	background: var(--ngl-green-100);
	border-radius: var(--ngl-radius-card);
	font-size: var(--ngl-fs-title);
	font-weight: 800;
	line-height: 1.25;
	color: var(--ngl-green-900);
}
.ngl-subtitle {
	margin: 0 auto 1.4rem;
	max-width: 22rem;
	font-size: var(--ngl-fs-body);
	line-height: 1.55;
	color: var(--ngl-gray-600);
}

.ngl-brand-art { display: none; }

/* ---------- Alert ---------- */
.ngl-alert {
	display: flex; align-items: flex-start; gap: .6rem;
	margin: 0 0 1rem;
	padding: .8rem 1rem;
	background: var(--ngl-red-50);
	color: var(--ngl-red);
	border: 1px solid #f6c9c6;
	border-radius: 16px;
	font-size: .9rem; font-weight: 500; line-height: 1.4;
	animation: ngl-alert-in .25s ease;
}
.ngl-alert[hidden] { display: none; }
.ngl-alert svg { width: 1.2rem; height: 1.2rem; flex: none; margin-top: .05rem; }
@keyframes ngl-alert-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Form cards ---------- */
.ngl-form { display: flex; flex-direction: column; gap: .9rem; }

.ngl-card {
	background: rgba(255, 255, 255, .92);
	border-radius: var(--ngl-radius-card);
	padding: .85rem clamp(.75rem, 3vw, 1.25rem) 1rem;
	box-shadow: var(--ngl-shadow-card);
	border: 1px solid rgba(207, 238, 215, .5);
}
.ngl-card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.ngl-card-head label { font-size: var(--ngl-fs-label); font-weight: 700; color: var(--ngl-navy); }

.ngl-chip {
	width: 2.5rem; height: 2.5rem; border-radius: 12px;
	background: var(--ngl-green-100); color: var(--ngl-green-800);
	display: flex; align-items: center; justify-content: center; flex: none;
}
.ngl-chip svg { width: 1.3rem; height: 1.3rem; }

.ngl-input-wrap {
	position: relative;
	display: flex; align-items: center;
	min-height: var(--ngl-touch);
	background: #fff;
	border: 1.5px solid var(--ngl-gray-200);
	border-radius: var(--ngl-radius-pill);
	padding: 0 .4rem;
	transition: border-color .2s, box-shadow .2s;
}
.ngl-input-wrap:focus-within { border-color: var(--ngl-green-600); box-shadow: 0 0 0 4px rgba(22, 163, 74, .15); }
.ngl-input-wrap.is-invalid { border-color: var(--ngl-red); box-shadow: 0 0 0 4px rgba(214, 52, 44, .1); }

.ngl-input-icon {
	width: 2.4rem; height: 2.4rem; border-radius: 50%;
	background: var(--ngl-green-100); color: var(--ngl-green-800);
	display: flex; align-items: center; justify-content: center; flex: none;
}
.ngl-input-icon svg { width: 1.15rem; height: 1.15rem; }

.ngl-input {
	flex: 1; min-width: 0;
	height: 100%; min-height: calc(var(--ngl-touch) - 4px);
	padding: 0 .9rem;
	border: 0; outline: 0; background: transparent;
	font: inherit; font-size: max(16px, var(--ngl-fs-label)); /* 16px min avoids iOS zoom */
	color: var(--ngl-ink);
	text-overflow: ellipsis;
}
.ngl-input::placeholder { color: var(--ngl-gray-400); }
.ngl-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; }

.ngl-toggle-password {
	width: 2.75rem; height: 2.75rem; flex: none;
	border: 0; background: transparent; border-radius: 50%;
	color: var(--ngl-gray-600);
	display: flex; align-items: center; justify-content: center;
}
.ngl-toggle-password svg { width: 1.4rem; height: 1.4rem; }
.ngl-toggle-password svg[hidden] { display: none; }
.ngl-toggle-password:hover { color: var(--ngl-green-700); }

.ngl-field-error { display: block; min-height: 0; margin: .35rem .9rem 0; font-size: .82rem; color: var(--ngl-red); }
.ngl-field-error:empty { display: none; }

/* ---------- Remember / forgot ---------- */
.ngl-row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .25rem .25rem 0; }

.ngl-checkbox { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; min-height: 2.75rem; position: relative; }
.ngl-checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ngl-checkbox-box {
	width: 1.75rem; height: 1.75rem; border-radius: 7px;
	background: #fff; border: 2px solid var(--ngl-gray-300);
	display: flex; align-items: center; justify-content: center;
	transition: background .15s, border-color .15s;
}
.ngl-checkbox-box svg { width: .85rem; height: .75rem; opacity: 0; transform: scale(.6); transition: .15s; }
.ngl-checkbox input:checked + .ngl-checkbox-box { background: var(--ngl-green-700); border-color: var(--ngl-green-700); }
.ngl-checkbox input:checked + .ngl-checkbox-box svg { opacity: 1; transform: none; }
.ngl-checkbox input:focus-visible + .ngl-checkbox-box { box-shadow: 0 0 0 4px rgba(22, 163, 74, .25); }
.ngl-checkbox-label { font-weight: 500; color: var(--ngl-navy); }

.ngl-link-muted { display: inline-flex; align-items: center; gap: .15rem; min-height: 2.75rem; font-weight: 600; color: var(--ngl-green-700); }
.ngl-link-muted svg, .ngl-link svg { width: 1rem; height: 1rem; }
.ngl-link-muted:hover, .ngl-link:hover { color: var(--ngl-green-900); }

/* ---------- Primary button ---------- */
.ngl-btn-primary {
	position: relative;
	display: flex; align-items: center; justify-content: center; gap: .75rem;
	width: 100%;
	min-height: clamp(3.4rem, 15vw, 4.25rem);
	margin-top: .35rem;
	padding: 0 4rem;
	border: 0;
	border-radius: var(--ngl-radius-pill);
	background: linear-gradient(90deg, #22b84a 0%, #0e9a43 55%, #0b8a3d 100%);
	color: #fff;
	font-size: clamp(1.25rem, 1rem + 1.2vw, 1.6rem);
	font-weight: 700;
	box-shadow: var(--ngl-shadow-btn);
	transition: transform .15s, box-shadow .2s, filter .2s;
}
.ngl-btn-primary:hover { filter: brightness(1.05); }
.ngl-btn-primary:active { transform: scale(.985); }
.ngl-btn-primary:focus-visible { outline: 3px solid var(--ngl-navy); outline-offset: 3px; }
.ngl-btn-icon { width: 1.75rem; height: 1.75rem; }
.ngl-btn-arrow {
	position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
	width: 2.75rem; height: 2.75rem; border-radius: 50%;
	background: rgba(255, 255, 255, .2);
	display: flex; align-items: center; justify-content: center;
}
.ngl-btn-arrow svg { width: 1.4rem; height: 1.4rem; }
.ngl-btn-spinner {
	display: none; width: 1.4rem; height: 1.4rem;
	border: 3px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%;
	animation: ngl-spin .7s linear infinite;
}
.ngl-btn-primary.is-loading .ngl-btn-spinner { display: block; }
.ngl-btn-primary.is-loading .ngl-btn-icon,
.ngl-btn-primary.is-loading .ngl-btn-arrow { display: none; }
.ngl-btn-primary:disabled { cursor: progress; opacity: .92; }
@keyframes ngl-spin { to { transform: rotate(360deg); } }

/* ---------- Register ---------- */
.ngl-register-row {
	display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem;
	margin: .5rem auto 0;
	padding: .8rem 1.5rem;
	background: rgba(230, 246, 234, .8);
	border-radius: var(--ngl-radius-pill);
	font-size: var(--ngl-fs-body);
	color: var(--ngl-navy);
	width: 100%;
}
.ngl-link { display: inline-flex; align-items: center; gap: .1rem; min-height: 2.5rem; font-size: 1.15em; font-weight: 700; color: var(--ngl-green-700); }

/* ---------- Footer art ---------- */
.ngl-footer {
	position: absolute; left: 0; right: 0; bottom: 0;
	display: flex; align-items: flex-end; justify-content: space-between;
	padding: 0 clamp(1rem, 5vw, 1.5rem) calc(.75rem + env(safe-area-inset-bottom));
	pointer-events: none;
}
.ngl-slogan {
	font-family: var(--ngl-script);
	font-size: clamp(.95rem, 4vw, 1.2rem);
	font-weight: 700; font-style: italic;
	line-height: 1.15;
	color: var(--ngl-green-800);
	transform: rotate(-6deg);
	margin-bottom: 1.5rem;
	text-align: left;
}
.ngl-bags { width: clamp(95px, 26vw, 140px); height: auto; }

/* ---------- Toast ---------- */
.ngl-toast {
	position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom));
	transform: translate(-50%, 12px);
	max-width: calc(100% - 2rem);
	padding: .7rem 1.2rem;
	background: var(--ngl-navy); color: #fff;
	border-radius: var(--ngl-radius-pill);
	font-size: .9rem; opacity: 0; transition: .2s; z-index: 10;
}
.ngl-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ngl-toast[hidden] { display: none; }

/* ---------- Small phones ---------- */
@media (max-width: 359px) {
	.ngl-logo-block { padding-left: 1.75rem; }
	.ngl-row-between { justify-content: flex-start; }
	.ngl-btn-primary { padding: 0 3.5rem; }
}

/* ---------- Short landscape phones ---------- */
@media (max-height: 560px) and (orientation: landscape) {
	.ngl-shell { padding-bottom: 2rem; }
	.ngl-footer, .ngl-hills { display: none; }
}

/* ---------- Tablet (>=600px): centered card ---------- */
@media (min-width: 600px) {
	.ngl-root { display: flex; align-items: center; justify-content: center; padding: 2rem 0; }
	.ngl-shell {
		min-height: 0;
		max-width: 540px;
		padding: 2.5rem 2.5rem 9rem;
		background: rgba(255, 255, 255, .78);
		backdrop-filter: blur(6px);
		border-radius: 32px;
		box-shadow: 0 24px 60px rgba(14, 90, 50, .14);
		overflow: hidden;
	}
	.ngl-back { top: 1.5rem; left: 1.5rem; }
	.ngl-footer { padding: 0 2rem 1rem; }
}

/* ---------- Desktop (>=1024px): two-column split ---------- */
@media (min-width: 1024px) {
	.ngl-shell {
		max-width: 1080px;
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 3.5rem;
		align-items: center;
		padding: 3.5rem 4rem;
	}
	.ngl-back { top: 1.75rem; left: 1.75rem; }
	.ngl-brand { padding-top: 1.5rem; }
	.ngl-subtitle { margin-bottom: 1.5rem; }
	.ngl-brand-art {
		display: flex; align-items: flex-end; justify-content: center; gap: 2rem;
		margin-top: 2rem;
	}
	.ngl-brand-art .ngl-slogan { font-size: 1.6rem; margin-bottom: .5rem; }
	.ngl-brand-art .ngl-bags { width: 190px; }
	.ngl-footer { display: none; }
	.ngl-logo-block { padding-left: 0; }
}

/* ---------- Wide (>=1440px) ---------- */
@media (min-width: 1440px) {
	.ngl-shell { max-width: 1180px; }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
	.ngl-root * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.ngl-root a:focus-visible, .ngl-root button:focus-visible { outline: 3px solid var(--ngl-green-600); outline-offset: 2px; }
