/* ============================================
   HOME PAGE STYLES - Férias Pró
   ============================================ */

/* Reset e variáveis - Paleta de cores Férias Pró */
:root {
    /* Cores principais baseadas na paleta da imagem */
    --primary-color: #007BFF;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #3C963C;
    --danger-color: #dc3545;
    --warning-color: #B48C32;
    --info-color: #3C78B4;
    
    /* Gradiente azul/roxo (lado esquerdo) */
    --gradient-start: #4D62CB;
    --gradient-end: #6675E6;
    --gradient-dark: #374EA9;
    --gradient-pill: #3C4D9B;
    
    /* Backgrounds */
    --bg-light: #F8F8FB;
    --bg-white: #ffffff;
    --bg-card-border: #E6E6E6;
    
    /* Tags de status */
    --tag-pending-bg: #FFF0BE;
    --tag-pending-text: #B48C32;
    --tag-optional-bg: #DCebfa;
    --tag-optional-text: #3C78B4;
    --tag-available-bg: #C8F0C8;
    --tag-available-text: #3C963C;
    
    /* Textos */
    --text-dark: #323232;
    --text-medium: #4B4B4B;
    --text-light: #696969;
    --text-white: #ffffff;
    
    /* Outros */
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body,
body.fp-home-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    overflow-x: hidden;
}

/* Container principal */
.login-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
    min-height: 600px;
    min-width: 0;
}

/* Lado esquerdo */
.login-left {
    flex: 1;
    min-width: 0;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Formas flutuantes decorativas */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.floating-shapes .shape:nth-child(1) {
    width: 200px;
    height: 200px;
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.floating-shapes .shape:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 50%;
    right: -30px;
    animation-delay: 5s;
}

.floating-shapes .shape:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: -30px;
    left: 20%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Logo section */
.logo-section {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.logo-section img {
    max-width: 200px;
    height: auto;
}

.logo-section h1,
.logo-section .brand-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    word-break: break-word;
}

.login-left > h1,
.login-left .hero-title {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 600;
    margin: 1.25rem 0 0.75rem 0;
    position: relative;
    z-index: 1;
}

.login-left > p,
.login-left .hero-copy {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 36ch;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.hero-copy-mobile {
    display: none;
}

.hero-copy-desktop {
    display: inline;
}

/* Lado direito - Formulário */
.login-right {
    flex: 1;
    min-width: 0;
    padding: 3rem;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: none;
    color: var(--text-dark);
}

.login-right form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Cabeçalho do formulário */
.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.form-header p {
    color: var(--text-medium);
    margin: 0;
    overflow-wrap: anywhere;
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-color);
}

/* Inputs com ícones */
.position-relative {
    position: relative;
    display: block;
    width: 100%;
}

.position-relative input[type="hidden"] {
    display: none !important;
    position: absolute;
    visibility: hidden;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    z-index: 3;
    pointer-events: none;
    font-size: 1.1rem;
    margin: 0;
    padding: 0;
    width: 1.2rem;
    height: 100%;
    flex-shrink: 0;
}

.form-control {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 16px; /* evita zoom automático no iOS */
    border: 1px solid var(--bg-card-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 48px;
    height: auto;
    box-sizing: border-box;
    vertical-align: middle;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Contador de caracteres */
.char-counter {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--bg-white);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    z-index: 4;
    line-height: 1;
    pointer-events: none;
}

/* Loading CNPJ */
.cnpj-loading {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--info-color);
    color: #fff;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.9rem;
}

.cnpj-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Resultado CNPJ */
.cnpj-result {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--tag-available-bg);
    border: 1px solid var(--tag-available-text);
    border-radius: var(--border-radius);
    color: var(--text-dark);
    transition: var(--transition);
}

/* Resultado CNPJ quando inativo/baixado */
.cnpj-result.cnpj-inactive {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.cnpj-result.cnpj-inactive .cnpj-result-content {
    color: #842029;
}

.cnpj-result-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.cnpj-result-details {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* Feedback de validação */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
    position: relative;
    z-index: 1;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--tag-available-text);
}

/* Botão de submit */
.btn-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 1;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #8b95b8 0%, #6f7aa3 100%);
    color: #ffffff;
    pointer-events: none;
    box-shadow: none;
}

.btn-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: var(--tag-available-bg);
    border-color: var(--tag-available-text);
    color: var(--tag-available-text);
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

/* Botão "Já tenho conta" — centralizado, fundo branco, borda azul (view raw) */
.login-right .home-login-action {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.login-right .home-login-action .home-login-link,
.login-right .home-login-action a.home-login-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--primary-color) !important;
    background-color: var(--bg-white) !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: var(--border-radius);
    text-decoration: none !important;
    transition: var(--transition);
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    min-height: 48px;
}

.login-right .home-login-action .home-login-link:hover,
.login-right .home-login-action .home-login-link:focus {
    color: var(--text-white) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.login-right .home-login-action .home-login-link:focus-visible {
    outline: 2px solid var(--gradient-end);
    outline-offset: 2px;
}

.login-right .home-login-action .home-login-link i {
    font-size: 1.1rem;
}

/* Responsividade */
@media (max-width: 992px) {
    body,
    body.fp-home-page {
        align-items: stretch;
        padding: 0;
    }

    .login-container {
        flex-direction: column;
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }

    .login-left {
        flex: 0 0 auto;
        padding: 1.75rem 1.5rem 1.5rem;
        min-height: 0;
        justify-content: flex-start;
    }

    .login-right {
        flex: 1 1 auto;
        padding: 1.5rem;
        max-height: none;
        justify-content: flex-start;
    }

    .logo-section {
        margin-bottom: 0.75rem;
    }

    .logo-section img {
        max-width: 160px;
    }

    .logo-section h1,
    .logo-section .brand-title {
        font-size: 1.75rem;
    }

    .login-left > h1,
    .login-left .hero-title {
        font-size: 1.35rem;
        margin: 0.75rem 0 0.5rem;
    }

    .login-left > p,
    .login-left .hero-copy {
        font-size: 0.95rem;
        max-width: none;
        opacity: 1;
    }

    .login-right,
    .login-right .form-header h2,
    .login-right .form-label {
        color: #1f2937;
    }

    .login-right .form-header p {
        color: #4b5563;
    }

    .hero-copy-desktop {
        display: none;
    }

    .hero-copy-mobile {
        display: inline;
    }

    .floating-shapes .shape:nth-child(2),
    .floating-shapes .shape:nth-child(3) {
        opacity: 0.55;
    }

    .form-header {
        margin-bottom: 1.25rem;
        text-align: left;
    }

    .form-header h2 {
        font-size: 1.35rem;
        color: var(--text-dark);
    }

    .form-header p {
        color: var(--text-medium);
        font-size: 0.95rem;
    }

    .char-counter {
        display: none;
    }
}

@media (max-width: 576px) {
    .login-left {
        padding: 1.35rem 1.15rem 1.15rem;
    }

    .login-right {
        padding: 1.25rem 1.15rem 1.75rem;
    }

    .form-group {
        margin-bottom: 1.1rem;
    }

    .form-control {
        padding-right: 1rem;
    }

    .home-login-action {
        margin-bottom: 1.15rem;
    }

    .login-right .home-login-action .home-login-link,
    .login-right .home-login-action a.home-login-link {
        font-size: 0.95rem;
        padding: 0.8rem 0.9rem;
    }

    .btn-submit {
        font-size: 1rem;
        padding: 0.9rem 1rem;
        min-height: 48px;
        margin-top: 0.5rem;
        position: sticky;
        bottom: 0.5rem;
        z-index: 2;
    }

    .floating-shapes .shape:nth-child(1) {
        width: 140px;
        height: 140px;
    }

    .floating-shapes .shape:nth-child(2),
    .floating-shapes .shape:nth-child(3) {
        display: none;
    }
}

@media (max-width: 380px) {
    .login-left,
    .login-right {
        padding: 1rem;
    }

    .logo-section .brand-title {
        font-size: 1.5rem;
    }

    .login-left .hero-title {
        font-size: 1.2rem;
    }
}

/* Animações de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-right {
    animation: fadeIn 0.6s ease-out;
}

.form-group {
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group:nth-child(4) {
    animation-delay: 0.4s;
}

/* Scrollbar personalizada */
.login-right::-webkit-scrollbar {
    width: 8px;
}

.login-right::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.login-right::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.login-right::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}


