.auth-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: 460px;
    margin: 0 auto 18px;
    overflow: hidden;
    border: 1px solid #c9c9c9;
    border-top: 4px solid #b40000;
    background: #fff;
    color: #222;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .2);
    font-family: Arial, Helvetica, sans-serif;
}

.auth-panel * { box-sizing: border-box; }
.auth-panel-section[hidden] { display: none !important; }
.auth-panel-section { min-width: 0; }
.auth-panel-header { padding: 22px 28px 18px; background: linear-gradient(135deg, #111 0%, #2a2a2a 100%); color: #fff; text-align: center; }
.auth-panel-header h1 { margin: 3px 0 7px; color: #fff; font-size: 24px; line-height: 1.2; }
.auth-panel-header p { margin: 0; color: #d1d1d1; font-size: 12px; line-height: 1.5; }
.auth-panel-header .auth-panel-kicker { color: #e13b3b; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.auth-panel-tabs { display: flex; border-bottom: 1px solid #ddd; background: #f5f5f5; }
.auth-panel-tabs a { flex: 1; padding: 12px 10px; color: #333; font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; text-transform: uppercase; }
.auth-panel-tabs a.is-active { background: #b40000; color: #fff; }
.auth-panel-tabs a:focus { position: relative; z-index: 1; outline: 2px solid #111; outline-offset: -2px; }
.auth-form { padding: 20px 28px 8px; }
.auth-field { margin-bottom: 13px; }
.auth-field label { display: block; margin: 0 0 5px; color: #333; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i { position: absolute; top: 50%; left: 12px; z-index: 1; color: #777; transform: translateY(-50%); }
.auth-input-wrap input { display: block; width: 100%; height: 40px; margin: 0; padding: 8px 42px 8px 36px; border: 1px solid #c8c8c8; border-radius: 2px; outline: 0; background: #fafafa; color: #111; font-size: 13px; }
.auth-input-wrap input:focus { border-color: #b40000; background: #fff; box-shadow: 0 0 0 2px rgba(180, 0, 0, .12); }
.auth-password-toggle { position: absolute; top: 0; right: 0; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: #666; cursor: pointer; }
.auth-password-toggle:hover, .auth-password-toggle:focus { color: #b40000; outline: 0; }
.auth-primary-button { display: block; width: 100%; min-height: 42px; margin: 7px 0 4px; border: 1px solid #8e0000; border-radius: 2px; background-color: #b40000; background-image: linear-gradient(#d11919, #a60000); color: #fff; font-size: 13px; font-weight: 700; text-align: center; text-transform: uppercase; cursor: pointer; text-shadow: 0 -1px 0 rgba(0, 0, 0, .35); }
.auth-primary-button:hover, .auth-primary-button:focus { background-color: #c30000; background-image: linear-gradient(#e02a2a, #b40000); outline: 0; }
.auth-primary-button[disabled] { opacity: .65; cursor: wait; }
.auth-form-message { margin: 16px 28px 0; padding: 10px 12px; border: 1px solid #d7a2a2; background: #fff0f0; color: #8e0000; font-size: 11px; line-height: 1.45; }
.auth-form-message-success { border-color: #93c9a6; background: #eef9f1; color: #21663a; }
.auth-form-message-info { border-color: #b8c8d8; background: #f2f7fb; color: #36536d; }
.auth-panel-links { display: flex; justify-content: space-between; gap: 12px; padding: 10px 28px 3px; color: #777; font-size: 11px; }
.auth-panel-links a { color: #a60000; font-weight: 700; text-decoration: none; }
.auth-panel-links a:hover { text-decoration: underline; }
.auth-panel-links-centered { justify-content: center; text-align: center; }
.auth-recaptcha-note { margin: 8px 0 18px; color: #999; font-size: 9px; text-align: center; }
.header-login-submit { display: block; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.header-login-submit img { display: block; }
.header-login-submit[disabled] { opacity: .65; cursor: wait; }
.header-auth-message { clear: both; margin: 5px 0 0; padding: 5px 7px; border: 1px solid #8e0000; background: #fff0f0; color: #8e0000; font-size: 10px; line-height: 1.3; }
.header-auth-message[hidden] { display: none !important; }

.auth-overlay-root[hidden] { display: none !important; }
.auth-overlay-root {
    position: fixed;
    z-index: 12000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
    overscroll-behavior: contain;
}
.auth-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .58);
}
.auth-overlay-frame {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
}
.auth-overlay-dialog {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    outline: 0;
}
.auth-overlay-dialog .auth-panel {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
}
.auth-overlay-close {
    position: absolute;
    z-index: 5;
    top: 0;
    right: -54px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #b40000;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
    font-size: 30px;
    font-weight: 700;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
}
.auth-overlay-close:hover,
.auth-overlay-close:focus-visible {
    background: #fff;
    color: #8e0000;
    outline: 3px solid #b40000;
    outline-offset: 2px;
}
body.auth-overlay-open {
    overflow: hidden;
}

@media (max-width: 580px) {
    .auth-overlay-root {
        padding-top: 64px;
        padding-right: 12px;
        padding-left: 12px;
    }
    .auth-overlay-close {
        top: -52px;
        right: 0;
    }
}

@media (max-width: 480px) {
    .auth-panel-header { padding-right: 18px; padding-left: 18px; }
    .auth-form { padding-right: 18px; padding-left: 18px; }
    .auth-form-message, .auth-panel-links { margin-right: 18px; margin-left: 18px; padding-right: 0; padding-left: 0; }
    .auth-overlay-root { padding-right: 8px; padding-bottom: 8px; padding-left: 8px; }
    .auth-overlay-dialog { max-height: calc(100vh - 72px); }
}
