/* ---- Sign-in / create-account / staff sign-in ---- */
body.cb-auth-page #primary { max-width: 78rem; padding-top: 28px; padding-bottom: 40px; }
.cb-auth { --ink: #0f172a; --mute: #64748b; --line: #e2e8f0; --brand: var(--cb-primary, #2563eb); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 620px; overflow: hidden; border-radius: 28px; background: #fff; border: 1px solid var(--line); box-shadow: 0 34px 70px -34px rgba(15, 23, 42, .45); color: var(--ink); }
.cb-auth *, .cb-auth *::before, .cb-auth *::after { box-sizing: border-box; }
.cb-auth svg { flex: none; }

/* left panel (the super admin can restyle this under Site design -> Page sections -> Sign-in page) */
.cb-auth-aside { position: relative; display: flex; align-items: center; padding: 48px 44px; color: #fff; overflow: hidden; background: radial-gradient(600px 300px at 0% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(150deg, var(--cb-primary-dark, #1d4ed8), var(--cb-primary, #2563eb)); }
.cb-auth-aside::after { content: ""; position: absolute; right: -90px; bottom: -110px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .09); pointer-events: none; }
.cb-auth-aside-in { position: relative; z-index: 1; max-width: 420px; }
.cb-auth-logo { display: inline-block; margin-bottom: 34px; color: #fff; font-size: 22px; font-weight: 800; text-decoration: none; }
.cb-auth-logo:hover { color: #fff; }
.cb-auth-aside h2 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: inherit; }
.cb-auth-aside p { margin: 0 0 26px; font-size: 16px; line-height: 1.6; opacity: .92; }
.cb-auth-perks { margin: 0 0 30px; padding: 0; list-style: none; display: grid; gap: 12px; }
.cb-auth-perks li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 600; }
.cb-auth-perks li span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.cb-auth-perks svg { width: 15px; height: 15px; }
.cb-auth-aside p.cb-auth-secure { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; opacity: .8; }
.cb-auth-secure svg { width: 18px; height: 18px; }

/* right side */
.cb-auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; padding: 40px 34px; background: #fff; }
.cb-auth-card { width: 100%; max-width: 420px; }
.cb-auth-card h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.cb-auth-sub { margin: 0 0 22px; color: var(--mute); font-size: 14.5px; line-height: 1.55; }
.cb-auth-legal { margin: 0; font-size: 12.5px; color: var(--mute); text-align: center; }
.cb-auth-legal a { color: var(--mute); }
.cb-auth-legal a:hover { color: var(--brand); }

.cb-auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 26px; padding: 4px; border-radius: 14px; background: #f1f5f9; }
.cb-auth-switch button { padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: #475569; font-size: 14.5px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.cb-auth-switch button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .3); }
.cb-auth-switch button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cb-auth [hidden] { display: none !important; }

.cb-auth-note { margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; font-size: 14px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.cb-auth-note.is-ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.cb-auth-note.is-bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.cb-auth-form { display: grid; gap: 14px; }
.cb-auth-field { display: grid; gap: 6px; }
.cb-auth-label { font-size: 13px; font-weight: 700; color: #334155; }
.cb-auth-input { position: relative; display: flex; align-items: center; }
.cb-auth-input > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: #94a3b8; pointer-events: none; }
.cb-auth-input input { width: 100%; height: 48px; padding: 0 44px 0 42px; border: 1.5px solid var(--line); border-radius: 13px; background: #f8fafc; color: var(--ink); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
.cb-auth-input input:focus { outline: 0; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.cb-auth-eye { position: absolute; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #94a3b8; cursor: pointer; }
.cb-auth-eye:hover { color: var(--ink); background: #eef2f7; }
.cb-auth-eye svg { width: 18px; height: 18px; }
.cb-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.cb-auth-row a, .cb-auth-alt a { color: var(--brand); font-weight: 700; text-decoration: none; }
.cb-auth-row a:hover, .cb-auth-alt a:hover { text-decoration: underline; }
.cb-auth-check { display: flex; align-items: flex-start; gap: 8px; color: #475569; font-size: 13.5px; line-height: 1.4; cursor: pointer; }
.cb-auth-check input { margin-top: 2px; accent-color: var(--brand); }
.cb-auth-terms a { color: var(--brand); font-weight: 600; }
.cb-auth-gate { display: grid; gap: 8px; }
.cb-auth-2fa { font-size: 13.5px; color: #475569; }
.cb-auth-2fa summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.cb-auth-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cb-auth-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 50px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--cb-primary, #2563eb), var(--cb-primary-dark, #1d4ed8)); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 14px 26px -12px color-mix(in srgb, var(--brand) 80%, #000); transition: transform .15s, filter .15s; }
.cb-auth-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.cb-auth-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }
.cb-auth-alt { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--mute); }

.cb-auth-meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 5px; align-items: center; margin-top: -6px; }
.cb-auth-meter i { height: 5px; border-radius: 4px; background: #e2e8f0; transition: background .2s; }
.cb-auth-meter span { margin-left: 6px; min-width: 52px; font-size: 12px; font-weight: 700; color: var(--mute); }
.cb-auth-meter[data-level="1"] i:nth-child(-n+1) { background: #ef4444; }
.cb-auth-meter[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.cb-auth-meter[data-level="3"] i:nth-child(-n+3) { background: #84cc16; }
.cb-auth-meter[data-level="4"] i { background: #16a34a; }

.cb-auth-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.cb-auth-more a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.cb-auth-more a:hover { border-color: var(--brand); transform: translateY(-2px); }
.cb-auth-more svg { width: 22px; height: 22px; color: var(--brand); }
.cb-auth-more b { display: block; font-size: 13.5px; }
.cb-auth-more small { color: var(--mute); font-size: 12px; }

/* the Staff Login form inside the same frame */
.cb-auth .cb-staff-login h2 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.cb-auth .cb-staff-login .cb-help-text { margin: 0 0 18px; color: var(--mute); font-size: 14px; line-height: 1.55; }
.cb-auth .cb-staff-login form p { margin: 0 0 14px; }
.cb-auth .cb-staff-login label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #334155; }
.cb-auth .cb-staff-login input[type="text"], .cb-auth .cb-staff-login input[type="password"] { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 13px; background: #f8fafc; font: inherit; font-size: 15px; }
.cb-auth .cb-staff-login input[type="text"]:focus, .cb-auth .cb-staff-login input[type="password"]:focus { outline: 0; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.cb-auth .cb-staff-login input[type="checkbox"] { width: auto; margin-right: 6px; accent-color: var(--brand); }
.cb-auth .cb-staff-login .cb-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 50px; border: 0; border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer; }
.cb-auth .cb-staff-login .cb-btn-ghost { margin-top: 8px; background: #f1f5f9 !important; color: #334155 !important; }
.cb-auth .cb-staff-login .cb-form-error { padding: 11px 14px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 14px; }
.cb-auth .cb-staff-login .cb-form-success { padding: 11px 14px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 14px; }
.cb-auth .cb-staff-login summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 14px; }

@media (max-width: 860px) {
	.cb-auth { grid-template-columns: 1fr; min-height: 0; border-radius: 22px; }
	.cb-auth-aside { padding: 28px 24px; }
	.cb-auth-aside p, .cb-auth-perks, .cb-auth-aside p.cb-auth-secure { display: none; }
	.cb-auth-aside h2 { margin: 0; font-size: 24px; }
	.cb-auth-logo { margin-bottom: 14px; }
	.cb-auth-main { padding: 28px 18px; }
}
@media (max-width: 480px) {
	.cb-auth-more { grid-template-columns: 1fr; }
	.cb-auth-card h1, .cb-auth .cb-staff-login h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .cb-auth * { transition: none !important; } }

/* ---- two-level tabs, per-tab left panel ---- */
.cb-auth-aside { flex-direction: column; align-items: flex-start; justify-content: center; }
.cb-auth-aside .cb-auth-logo { position: relative; z-index: 1; margin-bottom: 26px; }
.cb-auth-aside-in.is-in { animation: cb-auth-fade .4s ease both; }
@keyframes cb-auth-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cb-auth-aside .cb-auth-perks { margin-bottom: 22px; }
.cb-auth-figure { margin: 0 0 22px; }
.cb-auth-art { display: block; width: 100%; max-width: 250px; height: auto; }
.cb-auth-photo { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 20px; box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .55); }
.cb-auth-roles { margin-bottom: 20px; }
.cb-auth-roles button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cb-auth-roles svg { width: 18px; height: 18px; }
.cb-auth-sub-tabs { display: flex; gap: 22px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.cb-auth-sub-tabs button { position: relative; padding: 8px 2px 12px; border: 0; background: transparent; color: var(--mute); font-size: 14.5px; font-weight: 700; cursor: pointer; }
.cb-auth-sub-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--brand); transform: scaleX(0); transition: transform .2s; }
.cb-auth-sub-tabs button[aria-selected="true"] { color: var(--ink); }
.cb-auth-sub-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.cb-auth-sub-tabs button:hover { color: var(--ink); }
.cb-auth-sub-tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cb-auth .cb-staff-login h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
@media (max-width: 860px) {
	.cb-auth-aside .cb-auth-figure, .cb-auth-aside-in .cb-auth-perks, .cb-auth-aside-in p { display: none; }
	.cb-auth-aside .cb-auth-logo { margin-bottom: 12px; }
}
@media (max-width: 480px) {
	.cb-auth-roles button span { font-size: 13px; }
	.cb-auth .cb-staff-login h1 { font-size: 26px; }
}
.cb-auth .cb-staff-login { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.cb-auth .cb-staff-login .cb-staff-forgot { margin-top: 14px !important; }
