/* ==========================================================================
   NH Login – standalone screen, same tokens as the dashboard (nh-app.css).
   ========================================================================== */

:root {
	--nh-bg: #f4f6fb;
	--nh-surface: #ffffff;
	--nh-surface-2: #f8fafc;
	--nh-border: #e5e9f2;
	--nh-text: #0f172a;
	--nh-muted: #64748b;
	--nh-primary: #0f766e;
	--nh-primary-strong: #0b5f59;
	--nh-primary-soft: rgba(15, 118, 110, .10);
	--nh-red: #dc2626;
	--nh-green: #16a34a;
	--nh-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
	--nh-radius: 16px;
	--nh-radius-sm: 10px;
	--nh-ease: cubic-bezier(.22, .61, .36, 1);
	--nh-font: Inter, "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
	color-scheme: light;
}
:root[data-nh-theme="dark"] {
	--nh-bg: #0a0f1c;
	--nh-surface: #111827;
	--nh-surface-2: #172033;
	--nh-border: #1f2a3d;
	--nh-text: #e6ebf5;
	--nh-muted: #94a3b8;
	--nh-primary: #2dd4bf;
	--nh-primary-strong: #5eead4;
	--nh-primary-soft: rgba(45, 212, 191, .12);
	--nh-red: #f87171;
	--nh-green: #4ade80;
	--nh-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
	color-scheme: dark;
}

body.nh-login-page {
	margin: 0;
	background: var(--nh-bg);
	color: var(--nh-text);
	font-family: var(--nh-font);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	transition: background .3s var(--nh-ease), color .3s var(--nh-ease);
}
body.nh-login-page *, body.nh-login-page *::before, body.nh-login-page *::after { box-sizing: border-box; }

.nhl { display: grid; grid-template-columns: minmax(360px, 44%) 1fr; min-height: 100vh; }

/* Brand panel */
.nhl-brand {
	position: relative; overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	padding: 48px;
	color: #fff;
	background:
		radial-gradient(1200px 600px at -10% -10%, rgba(255, 255, 255, .14), transparent 60%),
		linear-gradient(150deg, #0f766e 0%, #0b5f59 45%, #134e4a 100%);
}
:root[data-nh-theme="dark"] .nhl-brand { background: radial-gradient(1000px 600px at -10% -10%, rgba(45, 212, 191, .18), transparent 60%), linear-gradient(150deg, #0b3b38 0%, #0a2a2c 50%, #0a0f1c 100%); }
.nhl-brand__inner { position: relative; z-index: 1; max-width: 460px; animation: nhlRise .6s var(--nh-ease) both; }
.nhl-brand__logo {
	display: inline-flex; align-items: center; justify-content: center; height: 84px; padding: 14px 22px; border-radius: 20px; margin-bottom: 26px;
	background: rgba(255, 255, 255, .95); box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.nhl-brand__logo img { display: block; height: 56px; width: auto; max-width: 240px; object-fit: contain; }
.nhl-brand__name { margin: 0 0 8px; font-size: clamp(26px, 2.6vw, 34px); font-weight: 780; letter-spacing: -.02em; line-height: 1.15; color: #fff; }
.nhl-brand__tag { margin: 0 0 30px; font-size: 16px; color: rgba(255, 255, 255, .78); }
.nhl-brand__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nhl-brand__list li {
	display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14.5px;
	padding: 12px 14px; border-radius: 14px;
	background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
	backdrop-filter: blur(4px);
}
.nhl-brand__list li span { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); font-size: 15px; }
.nhl-brand__glow { position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.nhl-brand__glow::after { content: ""; position: absolute; inset: 90px; border-radius: 50%; background: rgba(255, 255, 255, .05); }

/* Form side */
.nhl-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 28px; }
.nhl-card {
	width: 100%; max-width: 420px;
	background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: calc(var(--nh-radius) + 4px);
	padding: 36px 34px 30px; box-shadow: var(--nh-shadow);
	animation: nhlRise .55s var(--nh-ease) .05s both;
}
.nhl-card__mobile-logo { display: none; }
.nhl-eyebrow { margin: 0 0 4px; color: var(--nh-primary); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nhl-title { margin: 0 0 6px; font-size: 26px; font-weight: 760; letter-spacing: -.02em; color: var(--nh-text); line-height: 1.2; }
.nhl-sub { margin: 0 0 24px; color: var(--nh-muted); font-size: 14.5px; }

.nhl-alert { margin: 0 0 18px; padding: 11px 14px; border-radius: var(--nh-radius-sm); font-size: 14px; font-weight: 600; animation: nhlFade .3s var(--nh-ease) both; }
.nhl-alert--err { color: var(--nh-red); background: color-mix(in srgb, var(--nh-red) 10%, transparent); border: 1px solid color-mix(in srgb, var(--nh-red) 28%, transparent); }
.nhl-alert--ok { color: var(--nh-green); background: color-mix(in srgb, var(--nh-green) 10%, transparent); border: 1px solid color-mix(in srgb, var(--nh-green) 28%, transparent); }

.nhl-card .nhl-form { position: static; width: auto; height: auto; max-width: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.nhl-field { margin-bottom: 16px; }
.nhl-field > label { display: block; margin: 0 0 7px; font-size: 13.5px; font-weight: 650; color: var(--nh-text); }
.nhl-input { position: relative; display: flex; align-items: center; }
.nhl-input__icon { position: absolute; left: 13px; font-size: 15px; opacity: .65; pointer-events: none; }
.nhl-input input {
	width: 100%; height: 48px; margin: 0;
	padding: 0 46px 0 42px;
	font: inherit; font-size: 15px; color: var(--nh-text);
	background: var(--nh-surface-2); border: 1px solid var(--nh-border); border-radius: 12px;
	outline: none; box-shadow: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.nhl-input input:hover { border-color: color-mix(in srgb, var(--nh-primary) 30%, var(--nh-border)); }
.nhl-input input:focus { background: var(--nh-surface); border-color: var(--nh-primary); box-shadow: 0 0 0 4px var(--nh-primary-soft); }
.nhl-input input:-webkit-autofill { -webkit-text-fill-color: var(--nh-text); -webkit-box-shadow: 0 0 0 40px var(--nh-surface-2) inset; caret-color: var(--nh-text); }
.nhl-input__eye {
	position: absolute; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 9px;
	background: transparent; cursor: pointer; font-size: 15px; opacity: .6; transition: opacity .15s, background .15s;
}
.nhl-input__eye:hover, .nhl-input__eye[aria-pressed="true"] { opacity: 1; background: var(--nh-primary-soft); }
.nhl-input__eye:focus-visible, .nhl-theme:focus-visible, .nhl-submit:focus-visible { outline: 2px solid var(--nh-primary); outline-offset: 2px; }
.nhl-caps { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: #d97706; }

.nhl-check { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; font-size: 14px; color: var(--nh-muted); cursor: pointer; user-select: none; }
.nhl-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--nh-primary); cursor: pointer; }

.nhl-submit {
	position: relative; width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer;
	font: inherit; font-size: 15.5px; font-weight: 700; color: #fff;
	background: linear-gradient(135deg, #0f766e, #0d9488);
	box-shadow: 0 6px 18px rgba(15, 118, 110, .28);
	transition: transform .15s var(--nh-ease), box-shadow .15s var(--nh-ease), filter .15s;
}
:root[data-nh-theme="dark"] .nhl-submit { color: #04201d; background: linear-gradient(135deg, #2dd4bf, #5eead4); box-shadow: 0 6px 18px rgba(45, 212, 191, .2); }
.nhl-submit:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 24px rgba(15, 118, 110, .32); }
.nhl-submit:active { transform: none; }
.nhl-submit__spin { display: none; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: nhlSpin .7s linear infinite; }
.nhl-form.is-busy .nhl-submit { pointer-events: none; }
.nhl-form.is-busy .nhl-submit__label { visibility: hidden; }
.nhl-form.is-busy .nhl-submit__spin { display: block; }
.nhl-form.is-shake { animation: nhlShake .35s var(--nh-ease); }

.nhl-foot { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--nh-muted); }
.nhl-copy { margin: 22px 0 0; font-size: 12.5px; color: var(--nh-muted); }

.nhl-theme {
	position: absolute; top: 20px; right: 20px; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
	background: var(--nh-surface); border: 1px solid var(--nh-border); box-shadow: var(--nh-shadow); font-size: 17px;
	display: grid; place-items: center;
}
.nhl-theme__moon, :root[data-nh-theme="dark"] .nhl-theme__sun { display: none; }
:root[data-nh-theme="dark"] .nhl-theme__moon { display: inline; }

@keyframes nhlRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes nhlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nhlSpin { to { transform: rotate(360deg); } }
@keyframes nhlShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { body.nh-login-page *, body.nh-login-page *::before, body.nh-login-page *::after { animation: none !important; transition: none !important; } }

/* Tablet / phone: brand panel collapses, logo moves into the card */
@media (max-width: 900px) {
	.nhl { grid-template-columns: 1fr; }
	.nhl-brand { display: none; }
	.nhl-main { min-height: 100vh; padding: 72px 16px 24px; background: radial-gradient(700px 360px at 50% -80px, var(--nh-primary-soft), transparent 70%); }
	.nhl-card { padding: 30px 22px 24px; }
	.nhl-card__mobile-logo { display: inline-flex; align-items: center; height: 60px; padding: 8px 14px; margin: 0 0 18px; border-radius: 16px; background: #fff; border: 1px solid var(--nh-border); box-shadow: var(--nh-shadow); }
	.nhl-card__mobile-logo img { display: block; height: 42px; width: auto; max-width: 180px; object-fit: contain; }
	.nhl-theme { top: 16px; right: 16px; }
}

/* Icons (Tabler sprite) */
.nhl-brand__list li span { color: #fff; }
.nhl-brand__list li span .nh-i { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
.nhl-input__icon { display: flex; color: var(--nh-muted); opacity: 1; }
.nhl-input input:focus ~ .nhl-input__icon, .nhl-input:focus-within .nhl-input__icon { color: var(--nh-primary); }
.nhl-input__icon .nh-i { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
.nhl-input__eye { display: grid; place-items: center; color: var(--nh-muted); opacity: 1; }
.nhl-input__eye:hover, .nhl-input__eye[aria-pressed="true"] { color: var(--nh-primary); }
.nhl-input__eye .nh-i { width: 19px; height: 19px; margin: 0; }
.nhl-theme { color: var(--nh-text); }
.nhl-theme .nhl-theme__sun { display: flex; }
.nhl-theme .nhl-theme__moon { display: none; }
:root[data-nh-theme="dark"] .nhl-theme .nhl-theme__sun { display: none; }
.nhl-theme .nh-i { width: 19px; height: 19px; margin: 0; }
:root[data-nh-theme="dark"] .nhl-theme .nhl-theme__moon { display: flex; }
