/* ── Auth header widget ─────────────────────────────────────────────────── */

#authWidget {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.auth-signin-btn {
    background: transparent;
    border: 1px solid #4a8fa8;
    color: #7ec8e3;
    font-size: 13px;
    font-family: inherit;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.auth-signin-btn:hover {
    background: #4a8fa8;
    color: #fff;
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #4a8fa8;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.auth-user-name {
    font-size: 13px;
    color: #c8d4e4;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-signout-btn {
    background: transparent;
    border: none;
    color: #8a9bb5;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color 0.15s;
    white-space: nowrap;
}

.auth-signout-btn:hover {
    color: #c8d4e4;
}

/* ── Modal overlay ──────────────────────────────────────────────────────── */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-modal-hidden {
    display: none !important;
}

/* ── Modal card ─────────────────────────────────────────────────────────── */

.auth-modal-card {
    background: #19243a;
    border: 1px solid #2a3a55;
    border-radius: 10px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: #8a9bb5;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s;
}

.auth-modal-close:hover {
    color: #c8d4e4;
}

.auth-modal-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #e0e8f4;
    letter-spacing: 0.01em;
}

/* ── Google button ──────────────────────────────────────────────────────── */

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

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

.auth-google-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ── Divider ────────────────────────────────────────────────────────────── */

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

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #2a3a55;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */

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

.auth-field--hidden {
    display: none !important;
}

.auth-label {
    display: block;
    font-size: 12px;
    color: #8a9bb5;
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    background: #111b2e;
    border: 1px solid #2a3a55;
    border-radius: 5px;
    color: #c8d4e4;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.auth-input:focus {
    border-color: #4a8fa8;
}

/* ── Error ──────────────────────────────────────────────────────────────── */

.auth-error {
    background: rgba(200, 60, 60, 0.15);
    border: 1px solid rgba(200, 60, 60, 0.35);
    color: #f08080;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 5px;
    margin-bottom: 12px;
}

/* ── Submit button ──────────────────────────────────────────────────────── */

.auth-submit-btn {
    width: 100%;
    padding: 9px;
    background: #4a8fa8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}

.auth-submit-btn:hover {
    background: #3a7a93;
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ── Toggle sign-up / sign-in ───────────────────────────────────────────── */

.auth-toggle-row {
    margin-top: 10px;
}

.auth-toggle-btn--outline {
    display: block;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid #2a3a55;
    color: #8a9bb5;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    border-radius: 6px;
    transition: border-color 0.15s, color 0.15s;
    text-align: center;
}

.auth-toggle-btn--outline:hover {
    border-color: #4a8fa8;
    color: #c8d4e4;
}
