/* ============================================================
   Clinora — Portal do Parceiro — Login
   ============================================================ */

:root {
    --blue-900: #001A4D;
    --blue-700: #003C99;
    --blue-500: #0052CC;
    --blue-400: #0061F2;
    --mint-500: #00D9A3;
    --mint-600: #00B888;
    --bg-soft: #F7F9FC;
    --ink-900: #101828;
    --ink-500: #667085;
    --border: #E4E7EC;
    --white: #FFFFFF;
    --danger: #DC2626;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at 15% 15%, #EAF1FF 0%, var(--bg-soft) 55%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink-900);
}

/* ---------- Card ---------- */

.login-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px -12px rgba(0, 26, 77, 0.22);
    width: 100%;
    max-width: 1040px;
    margin: auto;
    overflow: hidden;
    display: flex;
}

.row {
    width: 100%;
    margin: 0 !important;
}

/* ---------- Left panel: value proposition ---------- */

.login-illustration {
    position: relative;
    background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-500) 100%);
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(2rem, 4vw, 2.75rem);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: var(--white);
}

.login-illustration::before {
    /* soft radial glow, purely decorative */
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -160px;
    top: -160px;
    background: radial-gradient(circle, rgba(0, 217, 163, 0.25) 0%, rgba(0, 217, 163, 0) 70%);
    pointer-events: none;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
    z-index: 1;
}

.brand-row img {
    width: 34px;
    height: 34px;
}

.brand-row span {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

.illustration-copy {
    position: relative;
    z-index: 1;
    margin: 2.5rem 0;
}

.illustration-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--mint-500);
    margin-bottom: 0.85rem;
}

.illustration-title {
    font-size: clamp(1.6rem, 2.6vw, 2.05rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin: 0 0 0.9rem;
}

.illustration-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
    max-width: 34ch;
}

/* Signature element: heartbeat-into-growth pulse line */
.pulse-wrap {
    position: relative;
    z-index: 1;
    margin: 1.75rem 0 2rem;
}

.pulse-svg {
    width: 100%;
    height: auto;
    display: block;
}

.pulse-line {
    fill: none;
    stroke: var(--mint-500);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    animation: draw-pulse 1.8s ease-out forwards;
}

.pulse-dot {
    fill: var(--mint-500);
    opacity: 0;
    animation: pop-dot 0.4s ease-out 1.7s forwards, breathe 2.2s ease-in-out 2.1s infinite;
}

@keyframes draw-pulse {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pop-dot {
    to {
        opacity: 1;
    }
}

@keyframes breathe {

    0%,
    100% {
        r: 4.5;
    }

    50% {
        r: 6;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-line {
        animation: none;
        stroke-dashoffset: 0;
    }

    .pulse-dot {
        animation: none;
        opacity: 1;
    }
}

/* Value chips */
.chip-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.chip-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.chip-item i {
    color: var(--mint-500);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Mobile-only compact header (hidden on desktop) */
.illustration-mobile-only {
    display: none;
}

/* ---------- Right panel: form ---------- */

.form-container {
    padding: clamp(2.5rem, 5vw, 3.75rem) clamp(2rem, 4vw, 3.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.login-title {
    font-size: clamp(1.35rem, 2.6vw, 1.6rem);
    font-weight: 800;
    color: var(--ink-900);
    margin-bottom: 0.35rem;
    letter-spacing: -0.3px;
}

.login-subtitle {
    color: var(--ink-500);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2.25rem;
}

.form-label {
    font-weight: 600;
    color: var(--ink-900);
    font-size: 0.85rem;
    margin-bottom: 0.45rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i.field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-500);
    font-size: 0.95rem;
    pointer-events: none;
}

.form-control {
    padding: 0.875rem 1rem 0.875rem 2.6rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    width: 100%;
    background: var(--bg-soft);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    font-family: 'Montserrat', sans-serif;
}

.form-control::placeholder {
    color: #9AA3B2;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-400);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 97, 242, 0.12);
}

.password-field .form-control {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ink-500);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    display: flex;
}

.password-toggle:hover {
    color: var(--blue-400);
    background: rgba(0, 97, 242, 0.08);
}

.password-toggle:focus-visible,
.form-control:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--blue-400);
    outline-offset: 2px;
}

.error-message {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 0.4rem;
    display: none;
    font-weight: 600;
    align-items: center;
    gap: 0.35rem;
}

.error-message.is-visible {
    display: flex;
}

.error-message i {
    font-size: 0.85rem;
}

.form-group {
    margin-bottom: 1.35rem;
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 4px;
    border: 1.5px solid var(--border);
    accent-color: var(--blue-400);
    cursor: pointer;
}

.remember-me label {
    color: var(--ink-500);
    font-size: 0.85rem;
    user-select: none;
    cursor: pointer;
    font-weight: 500;
}

.esqueceu-senha {
    color: var(--blue-400);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.15s ease;
}

.esqueceu-senha:hover {
    color: var(--blue-700);
    text-decoration: underline;
}

.btn-sign-in {
    padding: 0.95rem;
    border-radius: var(--radius-sm);
    width: 100%;
    background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-700) 100%);
    color: var(--white);
    font-weight: 700;
    font-size: 0.92rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.btn-sign-in i {
    font-size: 0.85rem;
    transition: transform 0.15s ease;
}

.btn-sign-in:hover {
    box-shadow: 0 10px 24px -6px rgba(0, 82, 204, 0.5);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-sign-in:hover i {
    transform: translateX(3px);
}

.btn-sign-in:active {
    transform: translateY(0);
}

.btn-sign-in:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.form-footnote {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.82rem;
    color: var(--ink-500);
}

.form-footnote a {
    color: var(--blue-400);
    font-weight: 600;
    text-decoration: none;
}

.form-footnote a:hover {
    text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .login-container {
        flex-direction: column;
        margin: 1rem;
        min-height: auto;
    }

    .login-illustration {
        padding: 2rem 1.5rem;
    }

    .illustration-copy {
        margin: 1.5rem 0;
    }

    .illustration-subtitle {
        max-width: none;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 575.98px) {
    body {
        padding: 0;
    }

    .login-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    /* Collapse left panel into a compact header, keep the value message */
    .login-illustration {
        padding: 1.75rem 1.25rem;
    }

    .illustration-copy {
        margin: 1.25rem 0 1.5rem;
    }

    .pulse-wrap {
        margin: 1.25rem 0 1.5rem;
    }

    .chip-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    .auth-footer {
        flex-direction: column-reverse;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }

    .remember-me {
        justify-content: center;
    }

    .form-container {
        padding: 2rem 1.25rem;
    }
}