/* ==========================================================================
   FBN Indica Auth Pages — replica fiel do WP plugin
   ========================================================================== */

html, body.fbn-indica-auth-page {
    min-height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%) !important;
}

.fbn-auth-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 20px;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: authSlideUp 0.5s ease-out;
}

.auth-container.register-container { max-width: 520px; }

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

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo img {
    max-width: 140px;
    height: auto;
}
.register-container .auth-logo img { max-width: 120px; }

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}
.auth-header h1 {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.register-container .auth-header h1 { font-size: 26px; }
.auth-header p {
    color: #64748b;
    font-size: 15px;
    margin: 0;
}
.register-container .auth-header p { font-size: 14px; }
.auth-header .text-primary { color: #2056df; }

/* Form Styles */
.auth-form .form-group { margin-bottom: 20px; }
.register-container .auth-form .form-group { margin-bottom: 18px; }

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 500;
    font-size: 14px;
}
.register-container .auth-form label {
    margin-bottom: 6px;
    font-size: 13px;
}

.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.input-wrapper > i {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 14px;
    z-index: 1;
}
.register-container .input-wrapper > i { left: 14px; font-size: 13px; }

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}
.register-container .input-wrapper input,
.register-container .input-wrapper select {
    padding: 12px 14px 12px 40px;
    font-size: 14px;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: #2056df;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(32, 86, 223, 0.1);
}
.input-wrapper input::placeholder { color: #94a3b8; }

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    background-color: transparent !important;
    border: none;
    color: #64748b !important;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}
.toggle-password i { color: inherit !important; }
.toggle-password:hover { color: #334155 !important; }

/* Form Options (login) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    white-space: nowrap;
}
.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2056df;
    cursor: pointer;
}
.forgot-link {
    color: #2056df;
    font-size: 14px;
    text-decoration: underline;
    font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

/* Password Requirements */
.password-requirements {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}
.requirement:last-child { margin-bottom: 0; }
.requirement i { font-size: 6px; color: #cbd5e1; }
.requirement.valid { color: #16a34a; }
.requirement.valid i { color: #16a34a; }
.requirement.invalid { color: #dc2626; }
.requirement.invalid i { color: #dc2626; }

/* Auth Button */
.btn-auth {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2056df 0%, #1a44b3 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}
.register-container .btn-auth { padding: 14px; }
.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 86, 223, 0.4);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Auth Messages */
.auth-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
}
.auth-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}
.auth-message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}
.auth-message.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.auth-message.dev {
    background: #fef9c3;
    border: 1px dashed #ca8a04;
    color: #713f12;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    text-align: left;
    line-height: 1.5;
    word-break: break-all;
}
.auth-message.dev a {
    color: #1e40af;
    text-decoration: underline;
    word-break: break-all;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}
.register-container .auth-footer { margin-top: 20px; padding-top: 16px; }
.auth-footer > p {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 16px 0;
}
.link-primary {
    color: #2056df;
    text-decoration: none;
}
.link-primary:hover { text-decoration: underline; }

.auth-footer > p .link-primary,
.auth-footer > p a {
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.security-badge i {
    color: #22c55e;
    font-size: 16px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
}
.footer-links a {
    color: #64748b;
    text-decoration: none;
}
.footer-links a:hover { color: #2056df; }

/* Responsive */
@media (max-width: 520px) {
    .auth-container { padding: 30px 24px; }
    .auth-header h1 { font-size: 24px; }
    .register-container .auth-header h1 { font-size: 22px; }
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .auth-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ==========================================================================
   Auth Modal (Termos)
   ========================================================================== */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.auth-modal.open { display: flex; }

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.auth-modal-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.auth-modal-header h2 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    font-weight: 600;
}
.auth-modal-header h2 i { color: #2056df; }

.auth-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}
.auth-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.auth-modal-body {
    padding: 24px;
    overflow-y: auto;
    line-height: 1.7;
}
.auth-modal-body h3 {
    color: #2056df;
    font-size: 16px;
    margin: 20px 0 10px 0;
    font-weight: 600;
}
.auth-modal-body h3:first-child { margin-top: 0; }
.auth-modal-body p {
    color: #475569;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.auth-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
}

.btn-modal-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #2056df 0%, #1a44b3 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32, 86, 223, 0.4);
}
