/* One full-width shell for customer OTP and staff/legacy login. */
body.commerce-auth-page {
	background: var(--auth-surface) !important;
	color: var(--auth-ink);
	font-family: var(--auth-font-body), sans-serif;
}
.commerce-auth-page:not(.auth-show-navbar) .navbar-container,
.commerce-auth-page:not(.auth-show-navbar) .webcommerce-navbar,
.commerce-auth-page:not(.auth-show-navbar) .navbar-spacer,
.commerce-auth-page:not(.auth-show-banner) .top-contact-banner,
.commerce-auth-page .web-footer,
.commerce-auth-page .page-header-wrapper,
.commerce-auth-page .page-breadcrumbs { display: none !important; }

/* Override the website container and Bootstrap spacing, not the shell's grid. */
body.commerce-auth-page .main-section,
body.commerce-auth-page .page-content-wrapper,
body.commerce-auth-page .page-content,
body.commerce-auth-page .page_content,
body.commerce-auth-page .page-container,
body.commerce-auth-page .web-content,
body.commerce-auth-page main.container {
	width: 100%;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.identity-shell {
	min-height: 100svh;
	background: var(--auth-surface);
	color: var(--auth-ink);
}
.identity-shell * { box-sizing: border-box; }
.identity-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	min-height: 100svh;
}
.identity-panel {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px clamp(32px, 5vw, 88px);
}
.identity-header, .identity-form, .identity-footer { width: 100%; max-width: var(--auth-form-width); }
.identity-shell .identity-header { display: flex !important; justify-content: center; margin-bottom: 48px; }
.identity-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; text-decoration: none; }
.identity-brand img { width: 64px; height: 64px; object-fit: contain; }
.identity-visual { position: relative; min-width: 0; overflow: hidden; background: var(--auth-background); }
.identity-layout.form-right .identity-panel { order: 2; }
.identity-layout.centered, .identity-layout.no-slider { grid-template-columns: 1fr; }
.identity-visual .auth-slider-side { position: absolute; inset: 0; min-height: 0; display: block; background: var(--auth-background); }
.identity-visual .auth-slide-title, .identity-visual .auth-slide-description { color: inherit; }
.identity-layout.no-slider .identity-visual { display: none; }
.identity-shell h1, .identity-shell .auth-logo-section h2 {
	font-family: var(--auth-font-heading), sans-serif;
	font-size: clamp(26px, 2.2vw, 32px);
	line-height: 1.25;
	letter-spacing: -.025em;
	font-weight: 650;
	color: var(--auth-ink);
	margin: 0 0 12px;
}
.identity-shell .identity-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--auth-muted); margin: 0 0 12px; }
.identity-shell .identity-intro { font-size: 14px; line-height: 1.65; color: var(--auth-muted); margin: 0 0 28px; }
.identity-shell label, .identity-shell label.form-label { display: block; font-size: 14px !important; font-weight: 500 !important; color: var(--auth-ink) !important; margin-bottom: 8px; }
.identity-shell .form-control {
	width: 100% !important;
	min-width: 0;
	min-height: 48px !important;
	height: auto !important;
	padding: 12px 14px !important;
	border: 1px solid var(--auth-line) !important;
	border-radius: var(--auth-radius) !important;
	background: var(--auth-background) !important;
	color: var(--auth-ink);
	font-size: 16px !important;
	box-shadow: none !important;
}
.identity-shell .form-control::placeholder { color: var(--auth-muted); }
.identity-shell .form-control:focus, .identity-phone-input:focus-within {
	border-color: var(--auth-primary) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-primary) 15%, transparent) !important;
	outline: none;
}
.identity-phone-input { display: flex; overflow: hidden; border: 1px solid var(--auth-line); border-radius: var(--auth-radius); background: var(--auth-background); margin-bottom: 20px; }
.identity-phone-input > span { display: flex; align-items: center; padding: 0 14px; border-right: 1px solid var(--auth-line); font-size: 15px; }
.identity-shell .identity-phone-input input { flex: 1; width: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.identity-shell .btn { min-height: 48px !important; padding: 12px 16px !important; border-radius: var(--auth-button-radius) !important; font-size: 14px !important; font-weight: 600; white-space: normal; }
body.commerce-auth-page .identity-shell .btn-primary {
	background: var(--auth-primary) !important;
	border: 1px solid var(--auth-primary) !important;
	color: var(--auth-action-text) !important;
	box-shadow: none !important;
	transform: none !important;
}
.identity-shell .btn-primary:hover { background: var(--auth-primary-hover) !important; border-color: var(--auth-primary-hover) !important; color: var(--auth-hover-text) !important; }
.identity-shell .btn:disabled { opacity: .55; cursor: wait; }
.identity-shell .btn-outline-secondary, .identity-shell .btn-outline-primary { border: 1px solid var(--auth-line); background: var(--auth-surface); color: var(--auth-ink); }
.identity-shell .btn-block { display: block; width: 100%; }
.identity-shell .identity-submit { display: flex; justify-content: center; align-items: center; gap: 10px; }
.identity-shell a:not(.btn), .identity-shell .btn-link { color: var(--auth-ink); text-underline-offset: 4px; }
.identity-shell a:focus-visible, .identity-shell button:focus-visible { outline: 2px solid var(--auth-primary); outline-offset: 4px; }
.identity-shell .identity-hint { font-size: 12px; color: var(--auth-muted); margin: 14px 0 0; line-height: 1.65; text-align: center; }
.identity-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--auth-line); }
.identity-links a { font-size: 13px; }
.identity-footer { margin-top: 32px; text-align: center; font-size: 12px; color: var(--auth-muted); }
.identity-back { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; text-decoration: none; }
.identity-copyright { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--auth-line); font-size: 11px; }
.identity-shell #phone-message:empty { display: none; }
.identity-shell #phone-message:not(:empty) { padding: 12px 14px; margin-bottom: 20px; border: 1px solid var(--auth-line); border-radius: var(--auth-radius); background: var(--auth-background); color: var(--auth-ink); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.identity-shell [hidden] { display: none !important; }
.identity-shell #phone-wa-help, .identity-shell #phone-countdown { font-size: 13px; line-height: 1.65; color: var(--auth-muted); }
.identity-shell #phone-register label:has(input[type=checkbox]) { display: flex; gap: 10px; align-items: flex-start; font-size: 13px !important; line-height: 1.6; margin: 20px 0; }
.identity-shell input[type=checkbox] { accent-color: var(--auth-primary); flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; }
/* Contain the legacy login bundle without changing its section visibility logic. */
.identity-shell .auth-page-container, .identity-shell .auth-form-side, .identity-shell .auth-form-wrapper {
	display: block;
	width: 100%;
	max-width: none;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: transparent;
}
.identity-shell .auth-logo-section { text-align: left; margin: 0 0 28px; }
.identity-shell .auth-logo-section .app-logo, .identity-shell .auth-back-link { display: none; }
body.commerce-auth-page .identity-shell .for-login,
body.commerce-auth-page .identity-shell .for-login-with-email-link,
body.commerce-auth-page .identity-shell .form-signin,
body.commerce-auth-page .identity-shell .page-card,
body.commerce-auth-page .identity-shell .page-card-body {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}
.identity-shell .form-group { margin-bottom: 20px !important; }
.identity-shell .form-footer-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 4px 0 24px !important; }
.identity-shell .remember-me-checkbox { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px !important; }
.identity-shell .forgot-password-link { color: var(--auth-ink) !important; font-size: 13px; }
.identity-shell .password-field .form-control { padding-right: 48px !important; }
.identity-shell .toggle-password-icon { width: 44px; height: 44px; right: 2px; border: 0; background: transparent; color: var(--auth-muted); }
.identity-shell .btn-arrow-icon { width: 16px; height: 16px; }
.identity-shell .sign-up-message { font-size: 14px; margin-top: 20px; }
.identity-shell .sign-up-message a { color: var(--auth-ink) !important; }
@media (max-width: 900px) {
	.identity-layout { grid-template-columns: 1fr; }
	.identity-visual { display: none; }
	.identity-panel { padding: 40px 24px; }
	.identity-shell .identity-header { margin-bottom: 36px; }
}
@media (max-width: 380px) {
	.identity-panel { padding: 28px 20px; }
	.identity-shell h1, .identity-shell .auth-logo-section h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.identity-shell *, .identity-shell *::before, .identity-shell *::after { transition: none !important; }
}

/* Verification screens follow the approved segmented OTP / WhatsApp concept. */
.identity-shell .identity-header { position: relative; align-items: center; }
.identity-shell .phone-nav-back { position: absolute; left: -8px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--auth-ink); }
.phone-nav-back svg { width: 24px; height: 24px; }
.identity-shell.is-verifying .identity-footer { display: none; }
.phone-verification-heading { text-align: center; }
.identity-shell .phone-verification-heading h1 { font-size: clamp(23px, 2vw, 28px); line-height: 1.3; margin-bottom: 12px; }
.phone-method-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 50%; background: var(--auth-background); color: var(--auth-primary); }
.phone-method-icon svg { display: block; width: 34px; height: 34px; }
.identity-shell .phone-verification-heading .identity-intro { margin: 0 0 12px; line-height: 1.65; }
.phone-destination { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; margin-bottom: 28px; font-size: 14px; }
.phone-destination strong { white-space: nowrap; font-size: 15px; font-weight: 600; }
.identity-shell .phone-text-button { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--auth-ink); font-size: 13px; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.identity-shell .phone-text-button:disabled { color: var(--auth-muted); opacity: .65; cursor: default; }
.phone-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.phone-otp { position: relative; margin: 8px 0 0; }
.phone-otp-cells { display: grid; grid-template-columns: repeat(var(--otp-digits), minmax(0, 1fr)); gap: clamp(4px, 1.7vw, 10px); }
.phone-otp-cell { display: grid; place-items: center; position: relative; min-width: 0; height: 58px; border: 1px solid var(--auth-line); border-radius: var(--auth-radius); background: var(--auth-surface); color: var(--auth-ink); font-size: clamp(22px, 5vw, 28px); line-height: 1; font-variant-numeric: tabular-nums; }
.phone-otp-cell.is-filled { border-color: var(--auth-muted); }
.phone-otp-cell.is-active { border-color: var(--auth-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--auth-primary) 15%, transparent); }
.phone-otp-cell.is-active:empty::after { content: ''; height: 23px; width: 1.5px; background: var(--auth-primary); }
.phone-otp.is-invalid .phone-otp-cell { border-color: var(--auth-danger); }
.identity-shell #auth-code.phone-otp-input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; font-size: 16px !important; opacity: 0; cursor: text; }
.identity-shell .phone-countdown { min-height: 20px; margin: 20px 0 24px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; text-align: center; font-variant-numeric: tabular-nums; }
.phone-resend-row { min-height: 44px; margin-top: 16px; display: flex; justify-content: center; align-items: center; color: var(--auth-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.phone-methods { margin-top: 12px; text-align: center; }
.phone-methods summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; list-style: none; }
.phone-methods summary::-webkit-details-marker { display: none; }
.phone-methods summary:focus-visible { outline: 2px solid var(--auth-primary); outline-offset: 3px; }
#phone-alternatives { display: grid; gap: 4px; padding: 8px 12px; border-radius: var(--auth-radius); background: var(--auth-background); }
.phone-wa-steps { list-style: none; counter-reset: steps; padding: 18px; margin: 0 0 24px; background: var(--auth-background); border: 1px solid var(--auth-line); border-radius: var(--auth-radius); text-align: left; }
.phone-wa-steps li { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 1.6; }
.phone-wa-steps li + li { margin-top: 14px; }
.phone-wa-steps li::before { counter-increment: steps; content: counter(steps); display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--auth-surface); color: var(--auth-ink); }
.identity-shell .phone-wa-action { display: flex; align-items: center; justify-content: center; gap: 10px; }
.phone-wa-action svg { width: 22px; height: 22px; }
.phone-wa-status { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 12px; margin-top: 14px; background: var(--auth-background); border-radius: var(--auth-radius); font-size: 13px; color: var(--auth-muted); }
.phone-spinner { width: 18px; height: 18px; border: 2px solid var(--auth-line); border-top-color: var(--auth-primary); border-radius: 50%; animation: phone-spin 1s linear infinite; }
@keyframes phone-spin { to { transform: rotate(360deg); } }
.identity-shell .phone-message.is-error:not(:empty) { border-color: var(--auth-danger); color: var(--auth-danger); }
.phone-security { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--auth-muted); font-size: 11px; margin: 40px 0 0; }
.phone-security svg { width: 14px; height: 14px; }
#phone-restart { display: block; margin: 12px auto 0; }
@media (max-width: 900px) {
  .identity-shell.is-verifying .identity-panel { justify-content: flex-start; padding-top: 28px; padding-bottom: 28px; }
  .identity-shell.is-verifying .identity-header { margin-bottom: 32px; }
  .phone-method-icon { width: 64px; height: 64px; margin-bottom: 20px; }
}
@media (max-width: 380px) {
  .phone-otp-cell { height: 50px; }
  .phone-destination { gap: 0 8px; margin-bottom: 22px; }
  .phone-destination strong { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .phone-spinner { animation: none; } }
.phone-alternative-direct { display: block; margin: 20px auto 0; }
