.auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    font-family: "Amazon Ember", "Helvetica Neue", Arial, sans-serif;
}

.auth-overlay.active {
    display: flex;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 360px;
    border-radius: 8px;
    border: 1px solid #d5d9d9;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    padding: 24px 28px 30px;
    position: relative;
    color: #0f1111;
    animation: authSlideIn 0.2s ease;
}

@keyframes authSlideIn {
    from {
        transform: translateY(-24px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    background: none;
    border: none;
}

.auth-close:hover {
    color: #111;
}

.auth-brand {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #1a7a38;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.auth-title {
    font-size: 26px;
    font-weight: 400;
    margin: 0 0 16px;
    line-height: 1.2;
}

.auth-field {
    margin-bottom: 12px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
}

.auth-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #a6a6a6;
    border-radius: 3px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.auth-field input:focus {
    border-color: #e77600;
    box-shadow: 0 0 0 3px rgba(231, 118, 0, .25);
}

.auth-btn-primary {
    width: 100%;
    padding: 9px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    border-bottom-color: #846a29;
    border-radius: 3px;
    color: #111;
    cursor: pointer;
    transition: filter .15s;
}

.auth-btn-secondary {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    font-size: 13px;
    background: linear-gradient(to bottom, #f7f8f8, #e7e9ec);
    border: 1px solid #adb1b8;
    border-radius: 3px;
    color: #0f1111;
    cursor: pointer;
    transition: filter .15s;
}

.auth-btn-primary:hover,
.auth-btn-google:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.auth-btn-primary:hover {
    filter: brightness(1.06);
}

.auth-btn-secondary:hover {
    filter: brightness(0.97);
}

.auth-btn-google {
    width: 100%;
    padding: 8px 12px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #3c4043;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .15s, box-shadow .15s;
}

.auth-btn-google:hover {
    background: #f8f9fa;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 4px;
    color: #767676;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #e7e7e7;
}

.auth-link,
.auth-footer a {
    color: #0066c0;
    text-decoration: none;
}

.auth-link {
    font-size: 13px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: inline;
}

.auth-link:hover,
.auth-footer a:hover {
    text-decoration: underline;
}

.auth-link:hover {
    color: #c45500;
}

.auth-error {
    display: none;
    background: #fff0f0;
    border: 1px solid #c40000;
    border-radius: 4px;
    color: #c40000;
    font-size: 13px;
    padding: 8px 10px;
    margin-top: 10px;
}

.auth-footer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e7e7e7;
    font-size: 12px;
    color: #555;
    text-align: center;
}

.nav-auth-btn {
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid;
    transition: filter .15s;
}

.nav-auth-btn.signup {
    background: #1a7a38;
    border-color: #145c26;
    color: #fff;
}

.nav-auth-btn.login {
    background: transparent;
    border-color: #1a7a38;
    color: #1a7a38;
}

.nav-auth-btn.logout {
    background: #f0c14b;
    border-color: #a88734;
    color: #111;
}

.nav-auth-btn:hover {
    filter: brightness(0.92);
}

#authStrengthBar {
    height: 5px;
    border-radius: 4px;
    background: #e0e0e0;
    overflow: hidden;
    margin-top: 6px;
}

#authStrengthFill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width .3s ease, background .3s ease;
}

#authStrengthRules div {
    font-size: 11px;
    color: #555;
    line-height: 1.7;
    transition: color .2s;
}

#authStrengthRules div:has(✅) {
    color: #2e7d32;
}

#authPassToggle {
    color: #555;
    line-height: 1;
}

#authPassToggle:hover {
    color: #111;
}