/* ============================================================
   NexenOne Login Page — Premium Styles
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
	--nx-navy-dark: #0a1128;
	--nx-navy: #0f1b3d;
	--nx-navy-mid: #1a2d5e;
	--nx-navy-light: #1e3a6e;
	--nx-blue: #2563eb;
	--nx-blue-dark: #1d4ed8;
	--nx-blue-deep: #1e40af;
	--nx-blue-light: #60a5fa;
	--nx-blue-glow: rgba(37, 99, 235, 0.15);
	--nx-green: #22c55e;
	--nx-green-glow: rgba(34, 197, 94, 0.5);
	--nx-red: #dc2626;
	--nx-slate-900: #0f172a;
	--nx-slate-700: #334155;
	--nx-slate-600: #475569;
	--nx-slate-500: #64748b;
	--nx-slate-400: #94a3b8;
	--nx-slate-300: #cbd5e1;
	--nx-slate-200: #e2e8f0;
	--nx-slate-100: #f1f5f9;
	--nx-bg-panel: #f8f9fb;
	--nx-white: #ffffff;
	--nx-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
	--nx-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
	--nx-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
	--nx-shadow-blue: 0 4px 16px rgba(37, 99, 235, 0.35);
	--nx-radius: 8px;
	--nx-radius-lg: 10px;
	--nx-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	--nx-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Full-Screen Container Override --- */
.nexenone-login-container {
	position: fixed;
	inset: 0;
	display: flex;
	z-index: 9999;
	font-family: var(--nx-font);
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Hide Frappe default page chrome on login */
body:has(.nexenone-login-container) .main-section,
body:has(.nexenone-login-container) .web-footer,
body:has(.nexenone-login-container) .page-header,
body:has(.nexenone-login-container)>.container {
	display: none !important;
}

/* --- Noscript --- */
.nexenone-noscript {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: var(--nx-white);
	z-index: 10000;
	text-align: center;
	padding: 40px;
}

.nexenone-noscript h4 {
	font-family: var(--nx-font);
	color: var(--nx-slate-900);
	margin-bottom: 8px;
}

.nexenone-noscript p {
	color: var(--nx-slate-500);
}

/* ============================================================
   LEFT HERO PANEL
   ============================================================ */
.nexenone-login-hero {
	flex: 1.2;
	background: linear-gradient(145deg, var(--nx-navy-dark) 0%, var(--nx-navy-mid) 55%, var(--nx-navy-light) 100%);
	color: var(--nx-white);
	display: flex;
	flex-direction: column;
	padding: 48px 64px;
	position: relative;
	overflow: hidden;
	min-height: 100vh;
}

/* Subtle radial glow */
.nexenone-login-hero::before {
	content: '';
	position: absolute;
	top: -40%;
	right: -25%;
	width: 75%;
	height: 180%;
	background: radial-gradient(ellipse at center, var(--nx-blue-glow) 0%, transparent 65%);
	pointer-events: none;
	animation: nexenone-hero-glow 8s ease-in-out infinite alternate;
}

/* Secondary glow bottom-left */
.nexenone-login-hero::after {
	content: '';
	position: absolute;
	bottom: -30%;
	left: -15%;
	width: 50%;
	height: 120%;
	background: radial-gradient(ellipse at center, rgba(30, 58, 110, 0.3) 0%, transparent 60%);
	pointer-events: none;
}

@keyframes nexenone-hero-glow {
	0% {
		opacity: 0.6;
		transform: translateY(0);
	}

	100% {
		opacity: 1;
		transform: translateY(-20px);
	}
}

/* Hero Header (Logo) */
.nexenone-hero-header {
	position: relative;
	z-index: 2;
}

.nexenone-logo-white {
	width: 140px;
	height: auto;
}

/* Hero Content (centered) */
.nexenone-hero-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	z-index: 2;
	max-width: 520px;
}

.nexenone-tagline {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 3.5px;
	text-transform: uppercase;
	color: var(--nx-blue-light);
	margin: 0 0 28px 0;
}

.nexenone-welcome {
	font-size: 48px;
	font-weight: 800;
	line-height: 1.12;
	color: var(--nx-white);
	margin: 0 0 28px 0;
	letter-spacing: -0.5px;
}

.nexenone-brand-text {
	color: var(--nx-blue);
	background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.nexenone-hero-desc {
	font-size: 16px;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.68);
	max-width: 440px;
	margin: 0;
}

/* Hero Footer */
.nexenone-hero-footer {
	position: relative;
	z-index: 2;
}

.nexenone-status-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.nexenone-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--nx-green);
	box-shadow: 0 0 8px var(--nx-green-glow);
	animation: nexenone-pulse 2.5s ease-in-out infinite;
	flex-shrink: 0;
}

@keyframes nexenone-pulse {

	0%,
	100% {
		opacity: 1;
		box-shadow: 0 0 8px var(--nx-green-glow);
	}

	50% {
		opacity: 0.65;
		box-shadow: 0 0 18px rgba(34, 197, 94, 0.7);
	}
}

.nexenone-status-text {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	font-weight: 400;
}

.nexenone-copyright {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.3);
	margin: 0;
}

/* ============================================================
   RIGHT LOGIN PANEL
   ============================================================ */
.nexenone-login-panel {
	flex: 0.8;
	background: var(--nx-bg-panel);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 40px;
	overflow-y: auto;
	min-height: 100vh;
}

.nexenone-login-card {
	width: 100%;
	max-width: 400px;
}

/* --- Card Header --- */
.nexenone-card-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 36px;
}

.nexenone-n1-badge {
	width: 42px;
	height: 42px;
	flex-shrink: 0;
}

.nexenone-n1-badge svg {
	width: 100%;
	height: 100%;
}

.nexenone-card-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--nx-slate-900);
	margin: 0;
	line-height: 1.3;
}

.nexenone-card-subtitle {
	font-size: 13px;
	color: var(--nx-slate-500);
	margin: 2px 0 0 0;
	font-weight: 400;
}

/* --- Form Heading --- */
.nexenone-form-heading {
	font-size: 24px;
	font-weight: 700;
	color: var(--nx-slate-900);
	margin: 0 0 8px 0;
	letter-spacing: -0.3px;
}

.nexenone-form-subheading {
	font-size: 14px;
	color: var(--nx-slate-500);
	margin: 0 0 28px 0;
	line-height: 1.5;
}

/* --- Form Elements --- */
.nexenone-form-group {
	margin-bottom: 20px;
}

.nexenone-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--nx-slate-600);
	margin-bottom: 8px;
}

.nexenone-input {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid var(--nx-slate-200);
	border-radius: var(--nx-radius);
	font-size: 15px;
	font-family: var(--nx-font);
	color: var(--nx-slate-900);
	background: var(--nx-white);
	transition: var(--nx-transition);
	outline: none;
	box-sizing: border-box;
}

.nexenone-input:focus {
	border-color: var(--nx-blue);
	box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.1);
}

.nexenone-input::placeholder {
	color: var(--nx-slate-400);
}

.nexenone-input.nexenone-input-error {
	border-color: var(--nx-red);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* --- Password Wrapper --- */
.nexenone-password-wrapper {
	position: relative;
}

.nexenone-password-wrapper .nexenone-input {
	padding-right: 48px;
}

.nexenone-toggle-pwd {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--nx-slate-400);
	padding: 4px;
	border-radius: 4px;
	transition: color 0.15s ease;
	display: flex;
	align-items: center;
}

.nexenone-toggle-pwd:hover {
	color: var(--nx-slate-600);
}

.nexenone-forgot-link {
	display: inline-block;
	font-size: 13px;
	color: var(--nx-blue);
	text-decoration: none;
	margin-top: 8px;
	font-weight: 500;
	transition: color 0.15s ease;
}

.nexenone-forgot-link:hover {
	color: var(--nx-blue-deep);
	text-decoration: underline;
}

/* --- Error Banner --- */
.nexenone-error-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--nx-radius);
	margin-bottom: 18px;
	animation: nexenone-shake 0.4s ease;
}

@keyframes nexenone-shake {

	0%,
	100% {
		transform: translateX(0);
	}

	15% {
		transform: translateX(-6px);
	}

	30% {
		transform: translateX(5px);
	}

	45% {
		transform: translateX(-4px);
	}

	60% {
		transform: translateX(3px);
	}

	75% {
		transform: translateX(-2px);
	}
}

.nexenone-error-banner svg {
	flex-shrink: 0;
}

.nexenone-error-text {
	font-size: 13px;
	color: var(--nx-red);
	font-weight: 500;
	line-height: 1.4;
}

/* --- Continue Button --- */
.nexenone-btn-continue {
	width: 100%;
	padding: 13px 24px;
	background: linear-gradient(135deg, var(--nx-blue-dark) 0%, var(--nx-blue) 100%);
	color: var(--nx-white);
	border: none;
	border-radius: var(--nx-radius);
	font-size: 15px;
	font-weight: 600;
	font-family: var(--nx-font);
	cursor: pointer;
	transition: var(--nx-transition);
	box-shadow: var(--nx-shadow-blue);
	letter-spacing: 0.2px;
	position: relative;
	overflow: hidden;
}

.nexenone-btn-continue::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.nexenone-btn-continue:hover:not(:disabled) {
	background: linear-gradient(135deg, var(--nx-blue-deep) 0%, var(--nx-blue-dark) 100%);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
	transform: translateY(-1px);
}

.nexenone-btn-continue:hover::before {
	opacity: 1;
}

.nexenone-btn-continue:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: var(--nx-shadow-blue);
}

.nexenone-btn-continue:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

/* --- SSO Divider --- */
.nexenone-sso-divider {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 28px 0;
}

.nexenone-sso-divider::before,
.nexenone-sso-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--nx-slate-200);
}

.nexenone-sso-divider span {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.2px;
	color: var(--nx-slate-400);
	white-space: nowrap;
}

/* --- SSO Buttons --- */
.nexenone-sso-buttons {
	display: flex;
	gap: 12px;
	margin-bottom: 28px;
}

.nexenone-sso-btn {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 8px;
	background: var(--nx-white);
	border: 1.5px solid var(--nx-slate-200);
	border-radius: var(--nx-radius-lg);
	text-decoration: none;
	cursor: pointer;
	transition: var(--nx-transition);
}

.nexenone-sso-btn:hover {
	border-color: var(--nx-slate-300);
	box-shadow: var(--nx-shadow-md);
	transform: translateY(-2px);
	text-decoration: none;
}

.nexenone-sso-btn:active {
	transform: translateY(0);
	box-shadow: var(--nx-shadow-sm);
}

.nexenone-sso-btn.nexenone-sso-inactive {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}

.nexenone-sso-icon {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.nexenone-sso-icon svg {
	width: 22px;
	height: 22px;
}

.nexenone-sso-icon-ms {
	background: transparent;
}

.nexenone-sso-icon-ms svg {
	width: 24px;
	height: 24px;
}

.nexenone-sso-icon-google {
	background: transparent;
}

.nexenone-sso-icon-google svg {
	width: 24px;
	height: 24px;
}

.nexenone-sso-icon-zoho svg {
	width: 32px;
	height: 32px;
}

.nexenone-sso-btn span {
	font-size: 12px;
	font-weight: 500;
	color: var(--nx-slate-600);
	font-family: var(--nx-font);
}

/* --- Need Access --- */
.nexenone-need-access {
	text-align: center;
	font-size: 13px;
	color: var(--nx-slate-500);
	margin: 0 0 32px 0;
}

.nexenone-need-access a {
	color: var(--nx-slate-700);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
	transition: color 0.15s ease;
}

.nexenone-need-access a:hover {
	color: var(--nx-blue);
}

/* --- Forgot Password Section --- */
.nexenone-forgot-section {
	padding-top: 20px;
	border-top: 1px solid var(--nx-slate-200);
}

.nexenone-back-to-login {
	text-align: center;
	margin-top: 16px;
	font-size: 13px;
}

.nexenone-back-to-login a {
	color: var(--nx-blue);
	text-decoration: none;
	font-weight: 500;
}

.nexenone-back-to-login a:hover {
	text-decoration: underline;
}

/* --- Password Group Slide Animation --- */
.nexenone-password-group {
	overflow: hidden;
	transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.3s ease,
		margin 0.3s ease;
}

.nexenone-password-group.nexenone-slide-in {
	animation: nexenone-slide-down 0.35s ease forwards;
}

@keyframes nexenone-slide-down {
	from {
		max-height: 0;
		opacity: 0;
		margin-bottom: 0;
	}

	to {
		max-height: 200px;
		opacity: 1;
		margin-bottom: 20px;
	}
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Large tablets / small desktops */
@media (max-width: 1200px) {
	.nexenone-login-hero {
		padding: 40px 48px;
	}

	.nexenone-welcome {
		font-size: 40px;
	}
}

/* Tablets */
@media (max-width: 1024px) {
	.nexenone-login-hero {
		padding: 32px 36px;
		flex: 1;
	}

	.nexenone-login-panel {
		flex: 1;
		padding: 32px 28px;
	}

	.nexenone-welcome {
		font-size: 34px;
	}

	.nexenone-hero-desc {
		font-size: 14px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.nexenone-login-container {
		flex-direction: column;
		overflow-y: auto;
	}

	.nexenone-login-hero {
		flex: none;
		min-height: auto;
		padding: 28px 24px 36px;
	}

	.nexenone-hero-content {
		margin-top: 32px;
	}

	.nexenone-welcome {
		font-size: 28px;
		margin-bottom: 16px;
	}

	.nexenone-tagline {
		font-size: 10px;
		margin-bottom: 16px;
	}

	.nexenone-hero-desc {
		font-size: 14px;
		line-height: 1.6;
	}

	.nexenone-login-panel {
		flex: none;
		min-height: auto;
		padding: 32px 24px 48px;
	}

	.nexenone-login-card {
		max-width: 100%;
	}

	.nexenone-form-heading {
		font-size: 20px;
	}

	.nexenone-sso-buttons {
		gap: 8px;
	}

	.nexenone-sso-btn {
		padding: 14px 6px;
	}
}

/* Small mobile */
@media (max-width: 480px) {
	.nexenone-login-hero {
		padding: 20px 20px 28px;
	}

	.nexenone-welcome {
		font-size: 24px;
	}

	.nexenone-login-panel {
		padding: 24px 20px 40px;
	}

	.nexenone-card-header {
		margin-bottom: 24px;
	}

	.nexenone-sso-btn span {
		font-size: 11px;
	}
}