/* NowSham v2.3 for the native login and website shell. */

:root {
	--nw-logo: var(--ns-logo-primary);
	--nw-logo-width: var(--ns-capsule-width);
	--nw-splash: var(--ns-logo-primary);
	--nw-canvas: #fff7ed;
	--nw-panel: #fff;
	--nw-text: #1b1b1b;
	--nw-muted: #555b60;
	--nw-link: var(--ns-action-compact);
	--nw-line: #878c90;
}
:root[data-theme="dark"] {
	--nw-logo: var(--ns-logo-reverse);
	--nw-logo-width: var(--ns-bare-width);
	--nw-splash: var(--ns-logo-reverse);
	--nw-canvas: #1b1b1b;
	--nw-panel: #242424;
	--nw-text: #fff;
	--nw-muted: #d9dde0;
	--nw-link: #fdba74;
	--nw-line: #878c90;
}
/* Frappe's login bundle sets its root font after website hooks. Native controls inherit this stack. */
body { --font-stack: Cairo, system-ui, -apple-system, "Segoe UI", sans-serif; }
body, body *:not(svg):not(svg *):not(code):not(pre) { font-family: var(--font-stack); }
body :focus-visible { outline: 2px solid var(--nw-link); outline-offset: 2px; }
body a { color: var(--nw-link); }
body:is([data-path="login"], [data-path="update-password"]) { background: var(--nw-canvas); }
body :is(.login-content.page-card, .navbar.navbar-light) { background: var(--nw-panel); color: var(--nw-text); }
body .login-content.page-card { box-shadow: 0 8px 24px rgba(27,27,27,.08); }
body .login-content .page-card-head { text-align: start !important; }
body .login-content .page-card-head :is(h4, .indicator), body .login-content .form-control { color: var(--nw-text); }
body .login-content :is(label, .page-card-subtitle, .password-hint, .text-muted) { color: var(--nw-muted); }
body .login-content .form-control { font-family: var(--font-stack); border-color: var(--nw-line); background-color: var(--nw-panel); }
body .login-content a { color: var(--nw-link); text-underline-offset: .18em; }
body .login-content a:hover { text-decoration: underline; }
body :is(.login-content .page-card-head img.app-logo, .navbar .navbar-brand img) {
	content: var(--nw-logo); display: block; max-block-size: none; object-fit: contain;
	block-size: var(--nw-slot-height, 40px); inline-size: calc(var(--nw-slot-height, 40px) * var(--nw-logo-width));
}
body .navbar .navbar-brand img { --nw-slot-height: 36px; }
body .login-content #twofactor_div .page-card-head img { margin-block-end: 16px; }
body .splash img { --nw-logo: var(--nw-splash); content: var(--nw-logo); object-fit: contain; }

body .login-content :is(.es-button:not([data-variant="solid"]), .form-control) { min-block-size: 44px; }
/* Fields: 8 px corners, a line-strong border, body-size text. Secondary actions: a capsule with a line-strong ring and an ink label. */
body .login-content.page-card .page-card-body :is(input[type="text"], input[type="email"], input[type="password"], .form-control) {
	min-block-size: 48px; color: var(--nw-text); background-color: var(--nw-panel); border: 1px solid var(--nw-line); border-radius: 8px; font-size: 16px;
}
body .login-content.page-card .page-card-body :is(input[type="text"], input[type="email"], input[type="password"], .form-control):focus {
	border-color: var(--nw-link); box-shadow: 0 0 0 1px var(--nw-link); background-color: var(--nw-panel);
}
body .login-content .es-button:not([data-variant="solid"], .nowsham-lang-switch) {
	min-block-size: var(--ns-button-size); padding-inline: 20px; border-radius: 9999px; color: var(--nw-text); background: var(--nw-panel);
	border: 1.5px solid var(--nw-line); font: 700 var(--ns-button-type)/var(--ns-button-leading) var(--font-stack); text-decoration: none;
}
body .login-content .es-button:not([data-variant="solid"], .nowsham-lang-switch):is(:hover, :active) { background: var(--nw-canvas); text-decoration: none; }
body .login-content .es-button:not([data-variant="solid"], .nowsham-lang-switch):disabled { color: #9aa0a6; background: #f2f4f5; border-color: #d9dde0; opacity: 1; }
@media (max-width: 767px) {
	body .login-content :is(.es-button:not([data-variant="solid"]), .form-control) { min-block-size: 48px; }
}

/* Sign-in language switch: a compact action (white on #C44D00, #9A3D00 on hover or press), 40 px, at the card's end edge. */
body .login-content.page-card { position: relative; }
body .nowsham-lang-switch {
	position: absolute; inset-block-start: 16px; inset-inline-end: 16px; min-block-size: 40px; padding-inline: 16px;
	border: 0; border-radius: 9999px; font: 600 16px/1.2 var(--font-stack); color: var(--ns-on-action); background: var(--ns-action-compact); cursor: pointer;
}
body .nowsham-lang-switch:is(:hover, :active) { background: var(--ns-action-compact-hover); }
@media (max-width: 767px) { body .nowsham-lang-switch { min-block-size: 48px; } }
