/* Modal de autenticação */

.auth-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-modal.is-open {
    display: flex;
}

.auth-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
}

.auth-modal__content {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    width: min(480px, 90vw);
    padding: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: authModalFadeIn 0.25s ease;
}

.auth-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f3f4f8;
    color: #2c2c2c;
    font-size: 1.4rem;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.auth-modal__close:hover {
    background: #e2e5ef;
}

.auth-modal__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    background: rgba(0, 0, 0, 0.08);
    padding: 6px;
    border-radius: 12px;
}

.auth-modal__tabs button {
    border: none;
    border-radius: 10px;
    height: 44px;
    font-weight: 600;
    background: transparent;
    color: #383838;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-modal__tabs button.is-active {
    background: #fbb246;
    color: #000000;
    box-shadow: 0 8px 18px rgba(251, 178, 70, 0.35);
}

.auth-modal__title {
    margin: 0;
    font-size: 1.6rem;
    color: #1f1f1f;
}

.auth-modal__lead {
    margin: 0;
    color: #6f6f6f;
    line-height: 1.6;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-form[style*="display: flex"] {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.auth-session {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.auth-session .actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

.auth-session .actions a {
    padding: 10px 20px;
    border-radius: 8px;
    background: #fbb246;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.auth-session .actions a:hover {
    background: #dd9933;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label {
    font-weight: 600;
    color: #5a5a5a;
}

.auth-form input {
    height: 48px;
    border-radius: 12px;
    border: 1px solid #d9dcf0;
    padding: 0 16px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #fbb246;
    box-shadow: 0 0 0 4px rgba(251, 178, 70, 0.2);
}

.auth-form button {
    height: 48px;
    border-radius: 12px;
    border: none;
    background: #fbb246;
    color: #000000;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-form button:hover {
    background: #dd9933;
    box-shadow: 0 12px 28px rgba(251, 178, 70, 0.35);
}

.auth-message {
    display: none;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.auth-message.is-visible {
    display: block;
}

.auth-message.success {
    background: rgba(31, 138, 64, 0.12);
    color: #1f8a40;
}

.auth-message.error {
    background: rgba(215, 38, 56, 0.12);
    color: #d72638;
}

.auth-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.auth-actions-row .link {
    font-size: 0.95rem;
    color: #6f6f6f;
}

.auth-actions-row .link a {
    color: #fbb246;
    font-weight: 600;
}

.auth-session {
    display: none;
    flex-direction: column;
    gap: 16px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 20px 24px;
}

.auth-session.is-visible {
    display: flex;
}

.auth-session strong {
    font-size: 1.1rem;
}

.auth-session .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-session .actions a {
    padding: 10px 18px;
    border-radius: 10px;
    background: #fbb246;
    color: #000000;
    font-weight: 600;
}

@keyframes authModalFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 540px) {
    .auth-modal__content {
        width: min(95vw, 360px);
        padding: 28px 24px;
    }
}
