/* Standalone authentication pages. No application, planner or print overrides. */
.wiggo-auth-page {
    --auth-ink: #263346;
    --auth-muted: #637083;
    --auth-brand: #4c5773;
    --auth-line: #d8e0e8;
    margin: 0;
    background: #f3f5f8;
    color: var(--auth-ink);
    font: 16px/1.55 'Segoe UI', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.wiggo-auth-page *, .wiggo-auth-page *::before, .wiggo-auth-page *::after { box-sizing: border-box; }
.wiggo-auth-page [hidden] { display: none !important; }
.wiggo-auth-page a { color: var(--auth-brand); }
.wiggo-auth-page button, .wiggo-auth-page input { font: inherit; }
.wiggo-auth-page button, .wiggo-auth-page a { -webkit-tap-highlight-color: transparent; }
.wiggo-auth-page :is(a, button, input):focus-visible { outline: 3px solid #519ee3; outline-offset: 4px; }
.auth-shell { display: grid; grid-template-columns: minmax(320px, .95fr) minmax(420px, 1.05fr); max-width: 1120px; min-height: 740px; margin: max(24px, calc((100dvh - 740px) / 2)) auto; border: 1px solid #e1e6ed; border-radius: 24px; background: #fff; box-shadow: 0 24px 80px #2633460d; overflow: hidden; }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff; background: radial-gradient(ellipse at 90% 80%, #455b76 0, transparent 65%), #263346; position: relative; isolation: isolate; overflow: hidden; }
.auth-brand::after { content: ''; position: absolute; z-index: -1; width: 460px; height: 460px; border: 1px solid #ffffff0d; border-radius: 50%; right: -250px; bottom: -170px; box-shadow: 0 0 0 60px #ffffff03, 0 0 0 120px #ffffff03; pointer-events: none; }
.auth-brand .auth-wordmark { display: inline-flex; align-items: center; gap: 12px; width: fit-content; text-decoration: none; color: #fff; font-size: 20px; font-weight: 650; }
.auth-mark { display: block; width: 42px; height: 42px; flex: none; object-fit: contain; border-radius: 10px; }
.auth-partner-logo { max-width: 120px; max-height: 48px; object-fit: contain; }
.auth-story { padding: 64px 0; }
.auth-eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 2.2px; color: #a4c4df; margin: 0 0 20px; }
.auth-story h2 { margin: 0 0 22px; color: #fff; font-size: clamp(32px, 3vw, 42px); line-height: 1.2; letter-spacing: -1.5px; font-weight: 600; }
.auth-story > p:not(.auth-eyebrow) { max-width: 290px; color: #c3cedb; font-size: 15px; margin: 0; }
.auth-features { list-style: none; padding: 0; margin: 44px 0 0; }
.auth-features li { display: flex; align-items: center; gap: 16px; color: #e3eaf2; padding: 13px 0; font-size: 14px; border-bottom: 1px solid #ffffff10; }
.auth-features li span { font-size: 11px; color: #96aac0; font-variant-numeric: tabular-nums; }
.auth-brand-foot { font-size: 12px; color: #a6b7c9; margin: 0; }
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: 28px 54px; }
.auth-languages { display: flex; justify-content: flex-end; gap: 4px; }
.auth-languages a { display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 12px; font-weight: 650; color: var(--auth-muted); text-decoration: none; border-radius: 8px; }
.auth-languages a[aria-current] { color: var(--auth-ink); background: #edf1f6; }
.auth-languages a:hover { background: #f3f5f8; }
.auth-content { width: 100%; max-width: 400px; margin: auto; padding: 38px 0; }
.auth-heading { margin-bottom: 30px; }
.auth-heading h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.25; font-weight: 650; letter-spacing: -.8px; }
.auth-heading p { margin: 0; color: var(--auth-muted); font-size: 15px; }
.auth-field { margin: 0 0 20px; }
.auth-field > label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.auth-field input { display: block; border: 1px solid var(--auth-line); background: #fff; color: var(--auth-ink); min-height: 52px; padding: 12px 14px; width: 100%; min-width: 0; border-radius: 9px; box-shadow: 0 1px 2px #26334603; }
.auth-field input::placeholder { color: #7c8898; }
.auth-field input:focus { border-color: #519ee3; }
.auth-field input[aria-invalid=true] { border-color: #b73542; background: #fffafb; }
.auth-password { position: relative; }
.auth-password:has(.auth-reveal:not([hidden])) input { padding-right: 76px; }
.auth-reveal { position: absolute; right: 4px; top: 4px; bottom: 4px; min-width: 60px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 6px; color: var(--auth-brand); background: transparent; font-size: 12px !important; font-weight: 650 !important; cursor: pointer; }
.auth-reveal:hover { background: #f0f3f7; }
.auth-hint { font-size: 12px; line-height: 1.6; color: var(--auth-muted); margin: 8px 0 0; }
.auth-caps { color: #855c20; margin-bottom: 16px; }
.auth-options { margin: -4px 0 24px; }
.auth-check { display: flex; align-items: center; gap: 10px; min-height: 44px; width: fit-content; font-size: 13px; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--auth-brand); flex: none; }
.auth-options .auth-hint { margin: 0 0 0 28px; }
.auth-primary { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 52px; padding: 13px 18px; border: 1px solid var(--auth-brand); border-radius: 9px; background: var(--auth-brand); color: #fff !important; text-decoration: none; font-size: 14px; font-weight: 650; cursor: pointer; }
.auth-primary:hover { background: #3b4762; border-color: #3b4762; }
.auth-form > .auth-hint { margin-top: -8px; margin-bottom: 24px; }
.auth-secondary-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; width: fit-content; max-width: 100%; margin: 14px auto 0; padding: 8px; font-size: 13px; font-weight: 600; text-underline-offset: 4px; }
.auth-footer { text-align: center; font-size: 11px; color: #778294; padding: 16px 0 0; }
.auth-footer span { padding: 0 8px; }
.auth-error { padding: 15px 16px; margin-bottom: 24px; border: 1px solid #efcbd0; border-radius: 9px; background: #fff6f7; color: #9f2636; font-size: 13px; overflow-wrap: anywhere; }
.auth-error:focus { outline: 3px solid #519ee3; outline-offset: 3px; }
.auth-error p { margin: 5px 0 0; }
.auth-error ul { margin: 8px 0 0; padding-left: 18px; }
.auth-error a { color: inherit; display: inline-block; padding: 10px 0; min-height: 44px; text-underline-offset: 3px; }
.auth-field-error { font-size: 12px; line-height: 1.5; margin: 7px 0 0; color: #a12c3b; }
.auth-submit-status { font-size: 12px; color: var(--auth-muted); margin: 0; }
.auth-submit-status:not(:empty) { margin-top: 12px; }
[aria-busy=true] button[type=submit] { cursor: wait; opacity: .7; }
.auth-status-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #eaf4ef; color: #2f7254; font-size: 28px; margin-bottom: 24px; }
.auth-status-warning { color: #886020; background: #fbf1df; }
.auth-note { font-size: 13px; color: var(--auth-muted); padding: 18px; background: #f5f7fa; border: 1px solid #e7ecf2; border-radius: 10px; margin: 0 0 28px; }
.auth-companies { margin: 0; }
.auth-company-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: min(380px, 45dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 8px; margin: -8px; scroll-padding: 8px; }
.auth-company { display: flex; align-items: center; gap: 12px; min-height: 60px; width: 100%; border: 1px solid var(--auth-line); border-radius: 10px; padding: 12px; background: #fff; text-align: left; color: var(--auth-ink); cursor: pointer; }
.auth-company:hover { background: #f5f7fa; border-color: #9cadc3; }
.auth-company strong { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.auth-company-initial { display: grid; place-items: center; flex: none; width: 32px; height: 32px; background: #edf1f6; border-radius: 8px; color: var(--auth-brand); font-size: 14px; font-weight: 650; text-transform: uppercase; }
.auth-company-search { margin-bottom: 16px; }
.auth-company-searchbox { position: relative; }
.auth-company-searchbox input { padding-right: 52px; }
.auth-company-searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; }
.auth-company-clear { position: absolute; right: 4px; top: 4px; min-width: 44px; min-height: 44px; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: var(--auth-muted); font-size: 24px !important; cursor: pointer; }
.auth-company-clear:hover { background: #edf1f6; }
.auth-company-count { color: var(--auth-muted); font-size: 12px; margin: 0 0 12px; }
.auth-company-empty { padding: 28px 18px; border: 1px dashed var(--auth-line); border-radius: 10px; text-align: center; font-size: 14px; }
.auth-company-empty p { margin: 8px 0 0; color: var(--auth-muted); font-size: 13px; }
.auth-text-button { display: block; margin: 18px auto 0; padding: 10px; min-height: 44px; border: 0; background: none; color: var(--auth-brand); font-size: 13px !important; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@media (max-width: 1168px) { .auth-shell { margin-left: 24px; margin-right: 24px; } .auth-main { padding-left: 36px; padding-right: 36px; } .auth-brand { padding: 36px; } }
@media (max-width: 800px) {
    .auth-shell { display: block; min-height: 0; max-width: 520px; margin: 24px auto; }
    .auth-brand { padding: 24px 32px; }
    .auth-story, .auth-brand-foot { display: none; }
    .auth-main { min-height: 620px; padding: 20px 32px 28px; }
    .auth-content { padding: 30px 0; }
}
@media (max-width: 560px) {
    .wiggo-auth-page { background: #fff; }
    .auth-shell { border: 0; border-radius: 0; box-shadow: none; margin: 0; min-height: 100dvh; }
    .auth-brand { padding: 20px 24px; }
    .auth-brand .auth-wordmark { font-size: 18px; }
    .auth-mark { width: 36px; height: 36px; border-radius: 8px; }
    .auth-main { min-height: calc(100dvh - 76px); padding: 12px 24px max(20px, env(safe-area-inset-bottom)); }
    .auth-content { padding: 24px 0 32px; }
    .auth-heading h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: no-preference) { .auth-primary, .auth-company, .auth-field input { transition: background-color .15s, border-color .15s; } }

/* Company selection needs room for choices, rather than a tall marketing panel. */
.auth-stores-page .auth-shell { display: block; position: relative; max-width: 820px; min-height: 0; margin: 24px auto; }
.auth-stores-page .auth-brand { padding: 24px 32px; }
.auth-stores-page .auth-story, .auth-stores-page .auth-brand-foot { display: none; }
.auth-stores-page .auth-main { min-height: 0; padding: 28px 32px 24px; }
.auth-stores-page .auth-content { max-width: none; margin: 0; padding: 0; }
.auth-stores-page .auth-heading { margin-bottom: 24px; }
.auth-stores-page .auth-heading h1 { font-size: 28px; }
.auth-stores-page .auth-text-button { margin-top: 20px; margin-bottom: 0; }
.auth-stores-page .auth-footer { padding-top: 20px; }
@media (min-width: 561px) {
    .auth-stores-page .auth-brand { padding-right: 200px; }
    .auth-stores-page .auth-languages { position: absolute; top: 23px; right: 28px; }
    .auth-stores-page .auth-languages a { color: #c3cedb; }
    .auth-stores-page .auth-languages a:hover { background: #ffffff12; }
    .auth-stores-page .auth-languages a[aria-current] { background: #fff; color: var(--auth-ink); }
}
@media (max-width: 868px) and (min-width: 561px) {
    .auth-stores-page .auth-shell { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 640px) {
    .auth-company-list { grid-template-columns: minmax(0, 1fr); max-height: min(420px, 50dvh); }
}
@media (max-width: 560px) {
    .auth-stores-page .auth-shell { margin: 0; min-height: 100dvh; }
    .auth-stores-page .auth-brand { padding: 20px 24px; }
    .auth-stores-page .auth-main { padding: 12px 24px max(20px, env(safe-area-inset-bottom)); }
    .auth-stores-page .auth-languages { margin-bottom: 20px; }
}
