/* 3D Kitchen – sign in / register / forgot password. Light, cool-neutral SaaS look over a full-bleed 3D render. */
:root {
	--ks-accent: #4f46e5;
	--ks-accent-hover: #4338ca;
	--ks-bg: #f6f7f9;
	--ks-ink: #0f172a;
	--ks-muted: #64748b;
	--ks-line: #e2e8f0;
	--ks-error: #b91c1c;
	--ks-ok: #047857;
	--ks-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ks-radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.ks-auth-page { font-family: var(--ks-font); color: var(--ks-ink); background: var(--ks-bg); -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 1.5; overflow-x: hidden; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ks-accent) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
.ks-skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--ks-ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.ks-skip:focus { top: 12px; }

.ks-auth { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding: clamp(24px, 5vw, 72px); isolation: isolate; }
.admin-bar .ks-auth { min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px)); }

/* Full-bleed render + left gradient for legibility */
.ks-auth__bg { display: block; position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #dfe3ea; }
.ks-auth__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 65% center; display: block; }
.ks-auth::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15, 23, 42, .55) 0%, rgba(15, 23, 42, .28) 38%, rgba(15, 23, 42, 0) 70%); }

/* Language pill */
.ks-auth__topbar { position: absolute; top: clamp(16px, 2.5vw, 28px); right: clamp(16px, 2.5vw, 28px); z-index: 3; }
.ks-lang { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 4px 18px rgba(15, 23, 42, .12); border: 1px solid rgba(255, 255, 255, .6); }
.ks-lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ks-muted); text-decoration: none; }
.ks-lang a:hover { color: var(--ks-ink); }
.ks-lang a.is-active { background: var(--ks-ink); color: #fff; }
.ks-lang__sep { display: none; }

/* Glass card */
.ks-auth__main { width: 100%; display: flex; }
.ks-auth__main:focus { outline: none; }
.ks-auth__card {
	width: 100%; max-width: 440px; margin-left: clamp(0px, 4vw, 64px);
	padding: clamp(24px, 3vw, 36px); border-radius: var(--ks-radius);
	background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 30px 80px -20px rgba(15, 23, 42, .45);
}
.ks-auth__logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ks-ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.ks-auth__logo img { max-height: 36px; width: auto; }
.ks-auth__mark { width: 30px; height: 30px; flex: none; }
.ks-auth__headline { margin: 18px 0 12px; font-size: clamp(1.3rem, 2.1vw, 1.55rem); line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.ks-auth__benefits { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; color: var(--ks-muted); font-size: 14.5px; }
.ks-auth__benefits li { display: flex; align-items: center; gap: 10px; }
.ks-auth__benefits svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ks-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Tabs */
.ks-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 20px; border-radius: 12px; background: #eef1f5; }
.ks-tabs__tab { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ks-muted); text-decoration: none; transition: background-color .15s, color .15s, box-shadow .15s; }
.ks-tabs__tab:hover { color: var(--ks-ink); }
.ks-tabs__tab[aria-current="page"] { background: #fff; color: var(--ks-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

.ks-auth__title { font-size: 1.15rem; line-height: 1.3; margin: 0 0 4px; font-weight: 600; letter-spacing: -.01em; }
.ks-auth__lead { color: var(--ks-muted); margin: 0 0 18px; font-size: 14.5px; }
.ks-auth__notice, .ks-auth__errors { border-radius: 12px; padding: 11px 14px; margin: 0 0 16px; font-size: 14.5px; }
.ks-auth__notice { background: #ecfdf5; color: var(--ks-ok); border: 1px solid #a7f3d0; }
.ks-auth__errors { background: #fef2f2; color: var(--ks-error); border: 1px solid #fecaca; }
.ks-auth__errors p { margin: 0; }
.ks-auth__errors p + p { margin-top: 4px; }
.ks-auth__errors[hidden] { display: none; }

/* Fields */
.ks-field { margin-bottom: 16px; }
.ks-field label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; color: #334155; }
.ks-optional { font-weight: 400; color: var(--ks-muted); }
.ks-field input[type=text], .ks-field input[type=email], .ks-field input[type=password] {
	width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ks-ink);
	background: #fff; border: 1px solid var(--ks-line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.ks-field input::placeholder { color: #94a3b8; }
.ks-field input:hover { border-color: #cbd5e1; }
.ks-field input:focus { outline: none; border-color: var(--ks-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ks-accent) 18%, transparent); }
.ks-field input[aria-invalid=true] { border-color: var(--ks-error); }
.ks-field__hint { margin: 6px 0 0; font-size: 13px; color: var(--ks-muted); }
.ks-field__hint:empty { display: none; }
.ks-caps { color: #b45309; font-weight: 600; }
.ks-field--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.ks-field--row label { margin: 0; }
.ks-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 14px !important; color: #334155; cursor: pointer; }
.ks-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ks-accent); flex: none; }
.ks-auth a { color: var(--ks-accent); font-weight: 500; text-decoration: none; }
.ks-auth a:hover { color: var(--ks-accent-hover); text-decoration: underline; text-underline-offset: .2em; }
.ks-auth .ks-auth__logo, .ks-auth .ks-tabs__tab, .ks-auth .ks-lang a { text-decoration: none; }
.ks-pwd { position: relative; }
.ks-pwd input { padding-right: 50px !important; }
.ks-pwd__toggle { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: #94a3b8; display: grid; place-items: center; }
.ks-pwd__toggle:hover { color: var(--ks-ink); background: #f1f5f9; }
.ks-pwd__toggle svg { width: 20px; height: 20px; fill: currentColor; }
.ks-pwd__toggle[aria-pressed=true] { color: var(--ks-accent); }
.ks-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.ks-auth__submit {
	position: relative; width: 100%; height: 48px; border: 0; border-radius: 12px; cursor: pointer;
	background: var(--ks-accent); color: #fff; font: 600 16px var(--ks-font);
	box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 10px 24px -12px color-mix(in srgb, var(--ks-accent) 80%, transparent);
	transition: background-color .15s, transform .15s;
}
.ks-auth__submit:hover { background: var(--ks-accent-hover); }
.ks-auth__submit:active { transform: translateY(1px); }
.ks-auth__submit[aria-busy=true] { pointer-events: none; }
.ks-auth__submit[aria-busy=true] span { opacity: 0; }
.ks-auth__submit[aria-busy=true]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: ks-auth-spin .8s linear infinite; }
@keyframes ks-auth-spin { to { transform: rotate(360deg); } }
.ks-auth__switch { text-align: center; margin: 16px 0 0; color: var(--ks-muted); font-size: 14px; }
.ks-auth__divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.ks-auth__divider::before, .ks-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--ks-line); }
.ks-auth .ks-auth__guest { display: flex; justify-content: center; align-items: center; gap: 8px; height: 44px; border-radius: 12px; color: var(--ks-ink); font-weight: 500; border: 1px solid transparent; }
.ks-auth .ks-auth__guest:hover { background: #f1f5f9; border-color: var(--ks-line); color: var(--ks-ink); text-decoration: none; }
.ks-auth__fine { text-align: center; color: #94a3b8; font-size: 12.5px; margin: 6px 0 0; }

@media (prefers-reduced-motion: reduce) { .ks-auth__submit[aria-busy=true]::after { animation: none; } }

/* Phones: render becomes a 40vh band, the card overlaps it by 24px */
@media (max-width: 760px) {
	.ks-auth { display: block; padding: 0; min-height: 0; }
	.ks-auth::before { display: none; }
	.ks-auth__bg { position: relative; inset: auto; height: 40vh; height: 40svh; min-height: 220px; }
	.ks-auth__bg img { object-position: center 62%; }
	.ks-auth__bg::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(0deg, rgba(246, 247, 249, .9), rgba(246, 247, 249, 0)); }
	.ks-auth__topbar { position: absolute; top: 12px; right: 12px; }
	.ks-auth__main { padding: 0 16px 28px; margin-top: -24px; position: relative; z-index: 1; }
	.ks-auth__card { margin: 0 auto; max-width: 520px; padding: 22px 18px; background: rgba(255, 255, 255, .96); }
	.ks-auth__headline { font-size: 1.25rem; }
}
@media (max-width: 380px) {
	.ks-field--row { flex-direction: column; align-items: flex-start; }
	.ks-auth__card { padding: 20px 14px; }
}
