@import url('../common.css');

/* ==========================================================================
   1. LAYOUT GERAL (PÁGINA & CONTAINER)
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-md);
    background: radial-gradient(circle at 10% 20%, rgba(65, 128, 171, 0.08) 0%, rgba(255, 255, 255, 0) 90%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px -10px rgba(65, 128, 171, 0.15),
                0 1px 3px rgba(65, 128, 171, 0.05);
    padding: 2.25rem 2rem;
    border: 1px solid rgba(65, 128, 171, 0.15);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   2. CABEÇALHO & LOGO
   ========================================================================== */

.auth-logo {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(65, 128, 171, 0.1);
    border: 1px solid rgba(65, 128, 171, 0.2);
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-container h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--color-text-secondary);
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ==========================================================================
   3. ESTRUTURA DO FORMULÁRIO & CAMPOS
   ========================================================================== */

.auth-form {
    text-align: left;
}

.auth-form .form-group {
    margin-bottom: 0.95rem;
}

.auth-form .form-label {
    margin-bottom: 0.35rem;
}

/* Customização dos campos do formulário para maior elegância */
.auth-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1.5px solid rgba(65, 128, 171, 0.18);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form .form-control:focus {
    background: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(65, 128, 171, 0.12);
}

/* Grupo para inputs de senha */
.password-group .password-input-wrapper {
    position: relative;
}

.password-group .password-input-wrapper .form-control {
    padding-right: 44px;
}

.password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--color-primary);
    background: rgba(65, 128, 171, 0.06);
}

/* ==========================================================================
   4. FORÇA DE SENHA & FEEDBACK
   ========================================================================== */

.validation-feedback {
    font-size: 0.8rem;
    margin-top: 6px;
    text-align: left;
    min-height: 18px;
    font-weight: 500;
}

.validation-feedback:empty {
    display: none !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.password-recommendations {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    margin-top: 6px;
}

.password-recommendations ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 4px;
}

.password-recommendations li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.password-recommendations li.valid {
    color: var(--color-success);
}

.password-recommendations li.invalid {
    color: var(--color-text-secondary);
}

.password-strength-bar-container {
    width: 100%;
    height: 4px;
    background-color: rgba(65, 128, 171, 0.08);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* ==========================================================================
   5. OPÇÕES, CHECKBOXES E LINKS
   ========================================================================== */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--color-text-secondary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.forgot-password-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.policy {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.policy-link {
    color: var(--color-primary);
    font-weight: 600;
    margin-left: 4px;
}

.policy-link:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(65, 128, 171, 0.15);
}

/* ==========================================================================
   6. SELETOR DE PAÍS (TELEFONE)
   ========================================================================== */

.phone-input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.country-code-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 0.85rem;
    border: 1.5px solid rgba(65, 128, 171, 0.18);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: rgba(245, 248, 252, 0.9);
    color: var(--color-text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    min-width: 98px;
    min-height: 44px;
}

.country-code-btn:hover {
    background: rgba(235, 242, 248, 0.95);
    border-color: rgba(65, 128, 171, 0.3);
}

.country-code-btn:focus {
    outline: none;
}

.country-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.country-dial {
    color: var(--color-text-dark);
}

.country-arrow {
    font-size: 0.55rem;
    color: var(--color-text-secondary);
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 280px;
    max-height: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(65, 128, 171, 0.15), 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1.5px solid rgba(65, 128, 171, 0.18);
    z-index: 100;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}

.country-dropdown.open {
    max-height: 250px;
    opacity: 1;
    transform: translateY(0);
}

.country-search {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: none;
    border-bottom: 1px solid rgba(65, 128, 171, 0.1);
    font-size: 0.85rem;
    font-family: var(--font-family);
    background: transparent;
    color: var(--color-text-dark);
    outline: none;
}

.country-search::placeholder {
    color: var(--color-text-muted);
}

.country-list {
    max-height: 190px;
    overflow-y: auto;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: var(--font-family);
    font-size: 0.85rem;
}

.country-option:hover {
    background: rgba(65, 128, 171, 0.06);
}

.country-option.selected {
    background: rgba(65, 128, 171, 0.1);
    font-weight: 600;
}

.country-option .opt-flag {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.country-option .opt-name {
    flex: 1;
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-option .opt-dial {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.78rem;
}

/* ==========================================================================
   7. AVISO DE VERIFICAÇÃO (MENSAGEM DE INFO)
   ========================================================================== */

.verification-notice {
    text-align: left;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   8. RODAPÉ DO CARD (ROTAÇÃO E LINKS)
   ========================================================================== */

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(65, 128, 171, 0.1);
}

.auth-footer p {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   9. MEDIA QUERIES (ADAPTAÇÕES DE TELA)
   ========================================================================== */

@media (min-width: 576px) {
    .auth-container {
        max-width: 400px;
        padding: 2.5rem 2.25rem;
    }
}