/* Access and registration only. Global design tokens and panel styles stay intact. */
#auth-ui {
    --auth-green: #16B84E;
    --auth-orange: #FF681F;
    --auth-ink: #172b24;
    width: 100%;
    max-width: 440px;
    margin: 12px auto 32px;
    padding: 28px;
    border: 1px solid #dfe5dc;
    border-top: 5px solid var(--auth-green);
    border-radius: 24px;
    background: #fff;
    color: var(--auth-ink);
    text-align: left;
    box-shadow: 0 12px 36px #172b240a;
}

/* main.js hides auth-ui with inline display:none after authentication.
   The shared header returns to its existing styles when that happens. */
#main-header:has(+ #auth-ui:not([style*="display: none"])) {
    padding: 0;
}
#main-header:has(+ #auth-ui:not([style*="display: none"])) #main-logo {
    max-width: 112px;
}

#auth-ui .auth-heading { margin-bottom: 24px; }
#auth-ui .auth-eyebrow {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
}
#auth-ui .auth-eyebrow span {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--auth-green);
    color: var(--auth-ink);
    letter-spacing: .8px;
}
#auth-ui h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 7vw, 34px);
    line-height: 1.12;
    letter-spacing: -1px;
    font-weight: 750;
}
#auth-ui .auth-intro {
    margin: 0;
    color: #52635a;
    font-size: 14px;
    line-height: 1.5;
}
#auth-ui label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 650;
}
#auth-ui input, #auth-ui select {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #c5d1c7;
    border-radius: 12px;
    background: #fafcf9;
    color: var(--auth-ink);
    font-size: 16px;
    line-height: 1.5;
}
#auth-ui input::placeholder { color: #64736a; opacity: 1; }
#auth-ui #email { margin-bottom: 16px; }
#auth-ui .password-wrapper { max-width: none; margin: 0 0 18px; }
#auth-ui .password-wrapper input { padding-right: 56px !important; }
#auth-ui .password-toggle {
    right: 4px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-ink);
    font-size: 20px;
}
#auth-ui #reg-role-container { margin: 0 0 20px; }
#auth-ui > button {
    width: 100%;
    min-height: 50px;
    margin: 0 0 10px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--auth-orange);
    color: var(--auth-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}
#auth-ui #backToCatalogBtn {
    background: #eef7ef;
    color: #245d35;
}
#auth-ui #resetPasswordBtn {
    margin-bottom: 0;
    background: transparent;
    color: #245d35;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
#auth-ui > button:hover { background: #f45e16; transform: none; }
#auth-ui #resetPasswordBtn:hover, #auth-ui .password-toggle:hover {
    background: #eef7ef;
}
#auth-ui .password-toggle:hover { transform: translateY(-50%); }
#auth-ui input:focus, #auth-ui select:focus {
    border-color: #24823d;
    box-shadow: 0 0 0 3px #16b84e26;
}
#auth-ui :is(input, select, button):focus-visible {
    outline: 3px solid #245d35;
    outline-offset: 3px;
}
@media (max-width: 480px) {
    #auth-ui { padding: 22px 20px; margin-top: 8px; border-radius: 20px; }
    #auth-ui .auth-heading { margin-bottom: 20px; }
    #main-header:has(+ #auth-ui:not([style*="display: none"])) #main-logo { max-width: 88px; }
}
