/**
 * ADM Organizador Pro - Client Registration Login
 * Estilos para formulário de cadastro na tela de login
 * Design System: Apple Human Interface Guidelines
 * @version 4.0.0
 * 
 * Tipografia Apple:
 * - Large Title: 34px (mobile 28px)
 * - Title 1: 28px (mobile 24px)
 * - Title 2: 22px (mobile 20px)
 * - Title 3: 20px (mobile 18px)
 * - Headline: 17px semibold
 * - Body: 17px regular
 * - Callout: 16px
 * - Subhead: 15px
 * - Footnote: 13px
 * - Caption 1: 12px
 * - Caption 2: 11px
 */

/* ==================================================================
   CSS RESET PARA MODAL
   ================================================================== */
.ba-modal *,
.ba-modal *::before,
.ba-modal *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ==================================================================
   BOTÃO/LINK DE CADASTRO - Posicionado no login_footer
   ================================================================== */
#ba-register-button-container,
.ba-register-container {
    max-width: 320px;
    margin: 0 auto 16px auto;
    padding: 0;
    text-align: center;
}

/* Estilo Link (padrão - combina com WP login) */
.ba-register-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ba-register-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.ba-register-link:active {
    opacity: 0.8;
}

/* Estilo Botão - Glassmorphism consistente */
.ba-register-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    min-height: 44px;
    font-size: 15px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
}

.ba-register-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.ba-register-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(0);
}

/* ==================================================================
   MODAL DE CADASTRO - FUNDO ESCURECIDO + CARD GLASSMORPHISM
   ================================================================== */
.ba-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 40px 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ba-modal.active {
    display: flex;
}

.ba-modal-overlay {
    display: none;
}

.ba-modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 0.5px rgba(255, 255, 255, 0.1) inset;
    padding: 32px 28px;
    animation: baModalSlideIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes baModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Botão fechar */
.ba-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #8e8e93;
    z-index: 10;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ba-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1c1c1e;
}

.ba-modal-close:active {
    transform: scale(0.92);
}

.ba-modal-close svg {
    width: 18px;
    height: 18px;
}

/* ==================================================================
   CABEÇALHO DO MODAL
   ================================================================== */
.ba-modal-header {
    text-align: center;
    margin-bottom: 28px;
    padding-right: 20px; /* Espaço para o botão fechar */
    padding-left: 20px;
}

.ba-modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.12) 0%, rgba(0, 122, 255, 0.06) 100%);
    border-radius: 16px;
    color: #007AFF;
}

.ba-modal-icon svg {
    width: 30px;
    height: 30px;
}

.ba-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px; /* Apple Title 2 */
    font-weight: 700;
    color: #1c1c1e;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.ba-modal-header p {
    margin: 0;
    font-size: 15px; /* Apple Subhead */
    color: #8e8e93;
    line-height: 1.4;
    font-weight: 400;
}

/* ==================================================================
   FORMULÁRIO - ESTILO APPLE iOS
   ================================================================== */
.ba-register-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ba-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ba-form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px; /* Apple Footnote */
    font-weight: 500;
    color: #3c3c43; /* Apple secondaryLabel */
    letter-spacing: -0.1px;
    margin-bottom: 0;
    text-transform: none;
}

.ba-form-group label svg {
    color: #8e8e93;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ba-form-group label .required {
    color: #FF3B30;
    font-weight: 400;
    font-size: 12px;
}

.ba-form-group input {
    width: 100%;
    height: 44px; /* Altura padrão Apple iOS */
    padding: 0 14px;
    margin: 0;
    font-size: 16px; /* Apple Callout - evita zoom no iOS */
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    background: #F2F2F7; /* Apple systemGray6 */
    border: none;
    border-radius: 10px;
    color: #1c1c1e;
    box-shadow: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ba-form-group input::placeholder {
    color: #C7C7CC; /* Apple systemGray3 - mais sutil */
    font-size: 15px; /* Menor que o texto digitado */
    font-weight: 400;
}

.ba-form-group input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.ba-form-group input.error {
    background: rgba(255, 59, 48, 0.08);
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.3);
}

.ba-form-group input.success {
    background: rgba(52, 199, 89, 0.08);
}

.ba-field-hint {
    font-size: 13px; /* Apple Footnote */
    color: #8e8e93;
    margin-top: 0;
    font-weight: 400;
}

.ba-field-hint.error {
    color: #FF3B30;
}

.ba-field-hint.success {
    color: #34C759;
}

/* ==================================================================
   CAMPO DE SENHA - ESTILO APPLE
   ================================================================== */
.ba-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ba-password-wrapper input {
    padding-right: 50px;
}

.ba-toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ba-toggle-password:hover {
    color: #007AFF;
    background: transparent;
}

.ba-toggle-password:focus {
    box-shadow: none;
    outline: none;
}

.ba-toggle-password svg {
    width: 20px;
    height: 20px;
}

/* ==================================================================
   FORÇA DA SENHA - ESTILO APPLE
   ================================================================== */
.ba-password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.ba-strength-bar {
    flex: 1;
    height: 3px;
    background: rgba(60, 60, 67, 0.06);
    border-radius: 1.5px;
    overflow: hidden;
}

.ba-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.ba-strength-bar.weak span {
    width: 25%;
    background: #FF3B30;
}

.ba-strength-bar.fair span {
    width: 50%;
    background: #FF9500;
}

.ba-strength-bar.good span {
    width: 75%;
    background: #34C759;
}

.ba-strength-bar.strong span {
    width: 100%;
    background: #007AFF;
}

.ba-strength-text {
    font-size: 12px; /* Apple Caption 1 */
    font-weight: 500;
    min-width: 45px;
    text-align: right;
}

.ba-strength-text.weak { color: #FF3B30; }
.ba-strength-text.fair { color: #FF9500; }
.ba-strength-text.good { color: #34C759; }
.ba-strength-text.strong { color: #007AFF; }

/* ==================================================================
   REQUISITOS DA SENHA - ESTILO APPLE
   ================================================================== */
.ba-password-requirements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.025);
    border-radius: 8px;
}

.ba-req {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px; /* Apple Caption 1 */
    font-weight: 400;
    color: #8e8e93;
    transition: color 0.2s ease;
}

.ba-req.valid {
    color: #34C759;
}

.ba-req-icon {
    font-size: 10px;
    width: 12px;
    text-align: center;
    color: #C7C7CC; /* Cinza claro para o círculo */
}

/* Quando válido, esconde o círculo e mostra o check */
.ba-req.valid .ba-req-icon {
    font-size: 0; /* Esconde o ○ */
    color: #34C759;
}

.ba-req.valid .ba-req-icon::before {
    content: '✓';
    font-size: 10px;
    font-weight: 700;
}

/* ==================================================================
   CONFIRMAÇÃO DE SENHA
   ================================================================== */
.ba-password-match-hint {
    display: none;
    font-size: 13px; /* Apple Footnote */
    font-weight: 400;
    margin-top: 6px;
}

.ba-password-match-hint.visible {
    display: block;
}

.ba-password-match-hint.match {
    color: #34C759;
}

.ba-password-match-hint.no-match {
    color: #FF3B30;
}

/* ==================================================================
   BOTÃO SUBMIT - ESTILO APPLE iOS
   ================================================================== */
.ba-form-actions {
    margin-top: 12px;
}

.ba-submit-btn {
    width: 100%;
    height: 44px; /* Altura padrão Apple iOS */
    padding: 0 20px;
    font-size: 16px; /* Apple Callout */
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
}

.ba-submit-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.ba-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
    opacity: 0.9;
}

.ba-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ba-btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ba-spinner {
    width: 20px;
    height: 20px;
    animation: baSpinnerRotate 1s linear infinite;
}

@keyframes baSpinnerRotate {
    to { transform: rotate(360deg); }
}

/* ==================================================================
   RODAPÉ DO FORMULÁRIO
   ================================================================== */
.ba-form-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 0.5px solid rgba(60, 60, 67, 0.08);
}

.ba-form-footer p {
    margin: 0;
    font-size: 14px; /* Apple Callout menor */
    font-weight: 400;
    color: #8e8e93;
}

.ba-form-footer a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.ba-form-footer a:hover {
    opacity: 0.7;
}

.ba-form-footer a:active {
    opacity: 0.5;
}

/* ==================================================================
   MENSAGEM DE SUCESSO - ESTILO APPLE
   ================================================================== */
.ba-success-message {
    text-align: center;
    padding: 20px 0;
}

.ba-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.12), rgba(52, 199, 89, 0.06));
    border-radius: 50%;
    color: #34C759;
    animation: baSuccessPulse 0.5s ease;
}

.ba-success-icon svg {
    width: 36px;
    height: 36px;
}

@keyframes baSuccessPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.ba-success-message h3 {
    margin: 0 0 12px 0;
    font-size: 22px; /* Apple Title 2 */
    font-weight: 700;
    color: #1c1c1e;
    letter-spacing: -0.4px;
}

.ba-success-message p {
    margin: 0 0 24px 0;
    font-size: 15px; /* Apple Subhead */
    font-weight: 400;
    color: #8e8e93;
    line-height: 1.5;
}

/* ==================================================================
   ERROS DO FORMULÁRIO - ESTILO APPLE
   ================================================================== */
.ba-form-error {
    background: rgba(255, 59, 48, 0.08);
    color: #FF3B30;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px; /* Apple Subhead */
    font-weight: 400;
    margin-bottom: 20px;
    border-left: 4px solid #FF3B30;
    line-height: 1.4;
}

/* ==================================================================
   AVISOS NA TELA DE LOGIN - ESTILO APPLE CLEAN
   ================================================================== */

/* Container do erro do WordPress */
#login #login_error {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

.ba-pending-notice,
.ba-rejected-notice {
    text-align: center;
    line-height: 1.5;
    font-size: 15px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    padding: 28px 24px;
    background: #FFFFFF;
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ba-pending-notice .ba-notice-icon,
.ba-rejected-notice .ba-notice-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Ícone Pendente - Relógio sólido */
.ba-pending-notice .ba-notice-icon {
    background: linear-gradient(145deg, #FF9F0A 0%, #FF6B00 100%);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
}

.ba-pending-notice .ba-notice-icon::before {
    content: '';
    width: 28px;
    height: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.ba-pending-notice .ba-notice-icon::after {
    display: none;
}

/* Ícone Recusado - X sólido */
.ba-rejected-notice .ba-notice-icon {
    background: linear-gradient(145deg, #FF453A 0%, #D70015 100%);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.ba-rejected-notice .ba-notice-icon::before {
    content: '';
    width: 28px;
    height: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.ba-rejected-notice .ba-notice-icon::after {
    display: none;
}

.ba-pending-notice .ba-notice-title,
.ba-rejected-notice .ba-notice-title {
    font-size: 18px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.ba-pending-notice .ba-notice-message,
.ba-rejected-notice .ba-notice-message {
    font-size: 15px;
    font-weight: 400;
    color: #6E6E73;
    line-height: 1.5;
    margin-bottom: 0;
}

.ba-rejected-notice .ba-notice-reason {
    font-size: 13px;
    font-weight: 500;
    color: #FF3B30;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255, 59, 48, 0.08);
    border-radius: 10px;
}

/* Botão WhatsApp com ícone */
.ba-notice-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(145deg, #25D366 0%, #128C7E 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.ba-notice-whatsapp:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
    color: white !important;
    text-decoration: none !important;
}

.ba-notice-whatsapp:active {
    transform: scale(0.98);
}

/* Ícone WhatsApp via CSS */
.ba-notice-whatsapp .ba-wa-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ba-pending-notice,
    .ba-rejected-notice {
        background: #2C2C2E;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .ba-pending-notice .ba-notice-title,
    .ba-rejected-notice .ba-notice-title {
        color: #FFFFFF;
    }
    
    .ba-pending-notice .ba-notice-message,
    .ba-rejected-notice .ba-notice-message {
        color: #98989D;
    }
    
    .ba-rejected-notice .ba-notice-reason {
        background: rgba(255, 59, 48, 0.15);
    }
}

/* ==================================================================
   RESPONSIVO - APPLE HUMAN INTERFACE GUIDELINES
   Breakpoints: 
   - Mobile: até 430px (iPhone Pro Max width)
   - Small Mobile: até 375px (iPhone SE/Mini)
   - Tiny: até 320px (muito pequeno)
   ================================================================== */

/* ---- Tablets e telas médias ---- */
@media screen and (max-width: 768px) {
    .ba-modal {
        padding: 30px 16px;
    }
    
    .ba-modal-content {
        max-width: 400px;
    }
}

/* ---- Mobile padrão (iPhone 14/15 Pro Max - 430px) ---- */
@media screen and (max-width: 480px) {
    .ba-modal {
        padding: 16px 12px;
        align-items: flex-start;
    }
    
    .ba-modal-content {
        padding: 28px 20px;
        border-radius: 16px;
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
    }
    
    /* Header */
    .ba-modal-header {
        margin-bottom: 24px;
        padding-right: 16px;
        padding-left: 16px;
    }
    
    .ba-modal-icon {
        width: 56px;
        height: 56px;
    }
    
    .ba-modal-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .ba-modal-header h2 {
        font-size: 20px; /* Apple Title 3 mobile */
    }
    
    .ba-modal-header p {
        font-size: 15px; /* Apple Subhead - mantém */
    }
    
    /* Formulário */
    .ba-register-form {
        gap: 14px;
    }
    
    .ba-form-group label {
        font-size: 12px;
    }
    
    /* CRÍTICO: 16px evita zoom automático no iOS */
    .ba-form-group input {
        height: 44px;
        font-size: 16px;
        padding: 0 12px;
        border-radius: 8px;
    }
    
    .ba-form-group input::placeholder {
        font-size: 14px;
    }
    
    .ba-password-wrapper input {
        padding-right: 44px;
    }
    
    .ba-toggle-password {
        width: 40px;
        height: 40px;
    }
    
    .ba-toggle-password svg {
        width: 18px;
        height: 18px;
    }
    
    /* Força da senha */
    .ba-password-strength {
        gap: 8px;
        margin-top: 6px;
    }
    
    .ba-strength-text {
        font-size: 11px;
        min-width: 40px;
    }
    
    /* Requisitos de senha */
    .ba-password-requirements {
        gap: 4px 10px;
        padding: 8px 10px;
        border-radius: 6px;
    }
    
    .ba-req {
        font-size: 11px;
    }
    
    /* Botão */
    .ba-submit-btn {
        height: 44px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    /* Footer */
    .ba-form-footer {
        margin-top: 14px;
        padding-top: 14px;
    }
    
    .ba-form-footer p {
        font-size: 13px;
    }
    
    /* Botão fechar */
    .ba-modal-close {
        top: 14px;
        right: 14px;
        width: 28px;
        height: 28px;
    }
    
    .ba-modal-close svg {
        width: 16px;
        height: 16px;
    }
    
    /* Mensagem de sucesso */
    .ba-success-icon {
        width: 64px;
        height: 64px;
    }
    
    .ba-success-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .ba-success-message h3 {
        font-size: 20px;
    }
    
    .ba-success-message p {
        font-size: 15px;
    }
    
    /* Hint fields */
    .ba-field-hint {
        font-size: 12px;
    }
}

/* ---- iPhone SE, Mini e similares (375px) ---- */
@media screen and (max-width: 375px) {
    .ba-modal {
        padding: 10px 8px;
    }
    
    .ba-modal-content {
        padding: 20px 16px;
    }
    
    .ba-modal-header {
        margin-bottom: 16px;
        padding-right: 10px;
        padding-left: 10px;
    }
    
    .ba-modal-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }
    
    .ba-modal-header h2 {
        font-size: 18px;
    }
    
    .ba-modal-header p {
        font-size: 13px;
    }
    
    .ba-register-form {
        gap: 12px;
    }
    
    .ba-form-group label {
        font-size: 11px;
    }
    
    .ba-form-group input {
        height: 42px;
        font-size: 16px;
        padding: 0 10px;
    }
    
    .ba-form-group input::placeholder {
        font-size: 13px;
    }
    
    .ba-password-wrapper input {
        padding-right: 40px;
    }
    
    /* Requisitos mais compactos */
    .ba-password-requirements {
        grid-template-columns: 1fr 1fr;
        gap: 3px 8px;
        padding: 6px 8px;
    }
    
    .ba-req {
        font-size: 10px;
    }
    
    .ba-submit-btn {
        height: 42px;
        font-size: 15px;
    }
    
    .ba-form-footer p {
        font-size: 12px;
    }
}

/* ---- Telas muito pequenas (320px) ---- */
@media screen and (max-width: 320px) {
    .ba-modal-content {
        padding: 16px 12px;
    }
    
    .ba-modal-header h2 {
        font-size: 16px;
    }
    
    .ba-modal-header p {
        font-size: 12px;
    }
    
    .ba-form-group label {
        font-size: 10px;
    }
    
    .ba-form-group input {
        height: 40px;
    }
    
    .ba-form-group input::placeholder {
        font-size: 12px;
    }
    
    /* Requisitos em 1 coluna */
    .ba-password-requirements {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    
    .ba-submit-btn {
        height: 40px;
    }
}

/* ==================================================================
   SAFE AREA PARA iPHONES COM NOTCH
   ================================================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .ba-modal {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* ==================================================================
   PREVENÇÃO DE OVERFLOW HORIZONTAL
   ================================================================== */
.ba-modal,
.ba-modal-content,
.ba-register-form,
.ba-form-group,
.ba-form-group input,
.ba-submit-btn {
    max-width: 100%;
}

/* ==================================================================
   DARK MODE - APPLE STYLE
   ================================================================== */
@media (prefers-color-scheme: dark) {
    .ba-modal {
        background: rgba(0, 0, 0, 0.6);
    }
    
    .ba-modal-content {
        background: rgba(28, 28, 30, 0.98);
        border-color: rgba(255, 255, 255, 0.08);
    }
    
    .ba-modal-header h2 {
        color: #ffffff;
    }
    
    .ba-modal-header p {
        color: #8e8e93;
    }
    
    .ba-form-group label {
        color: #ffffff;
    }
    
    .ba-form-group input {
        background: #2c2c2e; /* Apple systemGray5 dark */
        color: #ffffff;
    }
    
    .ba-form-group input::placeholder {
        color: #636366;
    }
    
    .ba-form-group input:focus {
        background: #3a3a3c;
    }
    
    .ba-modal-close {
        background: rgba(255, 255, 255, 0.08);
        color: #8e8e93;
    }
    
    .ba-modal-close:hover {
        background: rgba(255, 255, 255, 0.12);
    }
    
    .ba-password-requirements {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .ba-form-footer {
        border-top-color: rgba(255, 255, 255, 0.08);
    }
    
    .ba-form-footer p {
        color: #8e8e93;
    }
    
    .ba-success-message h3 {
        color: #ffffff;
    }
    
    .ba-success-message p {
        color: #8e8e93;
    }
}

/* ==================================================================
   ACESSIBILIDADE - REDUCED MOTION
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
    .ba-modal-content {
        animation: none;
    }
    
    .ba-success-icon {
        animation: none;
    }
    
    .ba-spinner {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}
