/* Ketabbin 2.7 — focused phone-only customer authentication. */

.kb-auth-body { min-height: 100vh; background: var(--paper); }
.kb-auth-body::before { opacity: .035; }

.kb-auth-topbar {
	position: relative;
	z-index: 10;
	display: flex;
	width: min(1380px, calc(100% - 56px));
	height: 86px;
	margin: auto;
	align-items: center;
	justify-content: space-between;
}

.kb-auth-logo { display: grid; width: 132px; height: 62px; place-items: center; }
.kb-auth-logo img { display: block; grid-area: 1 / 1; width: 132px; height: 62px; object-fit: contain; }
.kb-auth-topbar > div { display: flex; align-items: center; gap: 13px; }
.kb-auth-topbar .kb-theme-switch { padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.kb-auth-topbar .kb-theme-switch button { border-radius: 7px; }
.kb-auth-back { color: var(--muted); font-size: 9px; font-weight: 700; }
.kb-auth-back:hover { color: var(--amber); }

.kb-auth-shell {
	display: grid;
	grid-template-columns: minmax(440px, .86fr) minmax(520px, 1.14fr);
	width: min(1380px, calc(100% - 56px));
	min-height: calc(100vh - 140px);
	margin: 0 auto 24px;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: var(--surface);
	box-shadow: 0 25px 70px rgba(7, 27, 44, .09);
}

.kb-auth-panel { display: grid; min-width: 0; padding: 55px clamp(35px, 5vw, 82px); align-items: center; background: var(--surface); }
.kb-auth-panel__inner { width: min(430px, 100%); margin-inline: auto; }
.kb-auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-size: 8px; font-weight: 850; letter-spacing: .2px; }
.kb-auth-eyebrow::before { width: 24px; height: 1px; background: currentColor; content: ""; }
.kb-auth-panel h1 { margin: 9px 0 4px; font-size: clamp(31px, 3vw, 43px); line-height: 1.3; letter-spacing: -1.4px; }
.kb-auth-panel h1 + p { margin: 0 0 23px; color: var(--muted); font-size: 10px; }

.kb-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 22px; padding: 4px; border-radius: 11px; background: var(--surface-2); }
.kb-auth-tabs a { display: grid; min-height: 39px; border-radius: 8px; color: var(--muted); font-size: 9px; font-weight: 750; place-items: center; }
.kb-auth-tabs a.is-active { background: var(--surface); color: var(--text); box-shadow: 0 4px 15px rgba(7, 27, 44, .07); }

.kb-auth-message { display: grid; grid-template-columns: 20px 1fr; min-height: 42px; margin-bottom: 13px; padding: 9px 11px; align-items: center; gap: 8px; border-radius: 9px; font-size: 8px; }
.kb-auth-message svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.kb-auth-message.is-error { background: color-mix(in srgb, var(--commerce-danger) 9%, var(--surface)); color: var(--commerce-danger); }
.kb-auth-message.is-success { background: color-mix(in srgb, var(--commerce-green) 10%, var(--surface)); color: var(--commerce-green); }
.kb-auth-message.is-neutral { grid-template-columns: 1fr; background: var(--surface-2); color: var(--muted); }

.kb-auth-form { display: grid; gap: 13px; }
.kb-auth-form > label > span { display: block; margin-bottom: 5px; color: var(--text); font-size: 8.5px; font-weight: 700; }
.kb-auth-form > label > div { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; height: 48px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); transition: border-color .18s, background .18s; }
.kb-auth-form > label > div:focus-within { border-color: color-mix(in srgb, var(--amber) 62%, var(--line)); background: var(--surface); }
.kb-auth-form > label > div > svg { width: 18px; margin-inline: auto; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.kb-auth-form input[type="text"],
.kb-auth-form input[type="email"],
.kb-auth-form input[type="password"] { width: 100%; height: 46px; padding: 0; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 10px; }
.kb-auth-form input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.kb-auth-form [data-kb-password-toggle] { display: grid; width: 39px; height: 39px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--muted); place-items: center; }
.kb-auth-form [data-kb-password-toggle] svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.kb-auth-form [data-kb-password-toggle].is-visible { color: var(--amber); }
.kb-auth-honeypot { position: absolute !important; right: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.kb-auth-form__meta { display: flex; min-height: 25px; align-items: center; justify-content: space-between; }
.kb-auth-check { display: flex !important; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; cursor: pointer; }
.kb-auth-check > span { margin: 0 !important; color: inherit !important; font-size: inherit !important; font-weight: 500 !important; }
.kb-auth-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--amber); }
.kb-auth-form__meta > a { color: var(--amber); font-size: 8px; font-weight: 700; }

.kb-auth-submit { display: flex; width: 100%; min-height: 49px; margin-top: 2px; padding: 8px 17px; align-items: center; justify-content: center; gap: 11px; border: 0; border-radius: 10px; background: var(--amber); color: var(--ink); font-size: 10px; font-weight: 850; transition: background .18s, transform .18s; }
.kb-auth-submit:hover { background: var(--amber-soft); transform: translateY(-1px); }
.kb-auth-submit:disabled { cursor: not-allowed; filter: grayscale(.65); opacity: .55; transform: none; }
.kb-auth-submit span { font-size: 16px; }
.kb-auth-return { display: inline-flex; margin-top: 16px; color: var(--amber); font-size: 8.5px; font-weight: 700; }
.kb-auth-security { display: flex; margin: 20px 0 0; align-items: center; gap: 7px; color: var(--muted); font-size: 7.5px; }
.kb-auth-security svg { width: 16px; flex: 0 0 auto; fill: none; stroke: var(--commerce-green); stroke-width: 1.7; }
.kb-auth-admin-link { display: table; margin: 12px auto 0; color: var(--muted); font-size: 7.5px; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 35%, transparent); text-underline-offset: 3px; }
.kb-auth-admin-link:hover { color: var(--amber); }

.kb-auth-visual { position: relative; min-height: 690px; overflow: hidden; background: #061827 url('../images/ketabbin-hero-book.webp') center / cover no-repeat; color: #f6eddd; }
.kb-auth-visual::before { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 18, 29, .32), rgba(4, 18, 29, .82)), linear-gradient(0deg, rgba(4, 18, 29, .73), transparent 62%); content: ""; }
.kb-auth-visual::after { position: absolute; top: 0; right: 0; width: 1px; height: 100%; background: rgba(242, 169, 0, .5); content: ""; }
.kb-auth-visual__glow { position: absolute; top: 13%; left: 17%; width: 190px; height: 190px; border-radius: 50%; background: rgba(242, 169, 0, .13); filter: blur(60px); }
.kb-auth-visual__content { position: absolute; z-index: 1; right: clamp(35px, 6vw, 86px); bottom: 165px; width: min(485px, calc(100% - 75px)); }
.kb-auth-visual__content > span { color: var(--amber); font: 700 8px Arial; letter-spacing: 1.6px; }
.kb-auth-visual__content h2 { max-width: 460px; margin: 13px 0 9px; font-size: clamp(35px, 4vw, 57px); line-height: 1.25; letter-spacing: -2px; }
.kb-auth-visual__content > p { max-width: 440px; margin: 0; color: rgba(246, 237, 221, .7); font-size: 10px; }
.kb-auth-visual__content ul { display: flex; margin: 24px 0 0; padding: 0; gap: 17px; list-style: none; }
.kb-auth-visual__content li { display: flex; align-items: center; gap: 5px; color: rgba(246, 237, 221, .76); font-size: 7.5px; }
.kb-auth-visual__content li svg { width: 14px; fill: none; stroke: var(--amber); stroke-width: 2.2; }
.kb-auth-quote { position: absolute; z-index: 1; right: clamp(35px, 6vw, 86px); bottom: 42px; left: clamp(35px, 6vw, 86px); display: grid; grid-template-columns: 30px 1fr auto; min-height: 67px; padding-top: 17px; align-items: start; gap: 8px; border-top: 1px solid rgba(255,255,255,.16); }
.kb-auth-quote > span { color: var(--amber); font: 35px/1 Georgia, serif; }
.kb-auth-quote p { margin: 0; font-size: 10px; }
.kb-auth-quote small { color: rgba(246, 237, 221, .55); font-size: 7.5px; }

.kb-auth-footer { display: flex; width: min(1380px, calc(100% - 56px)); min-height: 30px; margin: 0 auto; align-items: center; justify-content: space-between; color: var(--muted); font-size: 7.5px; }

@media (max-width: 1050px) {
	.kb-auth-shell { grid-template-columns: minmax(390px, .95fr) 1.05fr; }
	.kb-auth-panel { padding: 45px 35px; }
	.kb-auth-visual__content { right: 38px; width: calc(100% - 76px); }
	.kb-auth-visual__content ul { display: grid; gap: 7px; }
	.kb-auth-quote { right: 38px; left: 38px; }
}

@media (max-width: 780px) {
	.kb-auth-topbar { width: calc(100% - 28px); height: 72px; }
	.kb-auth-logo, .kb-auth-logo img { width: 105px; height: 50px; }
	.kb-auth-topbar .kb-theme-switch { display: none; }
	.kb-auth-shell { display: block; width: calc(100% - 24px); min-height: auto; border-radius: 16px; }
	.kb-auth-panel { min-height: calc(100vh - 125px); padding: 35px 24px; }
	.kb-auth-panel__inner { width: min(440px, 100%); }
	.kb-auth-visual { display: none; }
	.kb-auth-footer { width: calc(100% - 32px); padding: 12px 0 75px; text-align: center; }
	.kb-auth-footer span:last-child { display: none; }
}

@media (max-width: 430px) {
	.kb-auth-panel { padding: 30px 17px; }
	.kb-auth-panel h1 { font-size: 29px; }
	.kb-auth-form { gap: 11px; }
	.kb-auth-check { align-items: flex-start; }
}
