:root {
    --bg: #f6f9fb;
    --surface: #ffffff;
    --surface-strong: #eef5f6;
    --ink: #132023;
    --muted: #627174;
    --line: #dce7e8;
    --primary-color: #087f8c;
    --primary-dark: #045e68;
    --success-color: #1f7a4d;
    --error-color: #cf2f2f;
    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
}

#particles-canvas,
#planes-canvas,
.bg-glow {
    display: none;
}

.login-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 251, 0.9)),
        url("../img/forneceaqui-launch-4k.webp") center / cover no-repeat;
}

.container {
    width: min(1180px, calc(100% - 40px));
    z-index: 1;
}

.login-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
    gap: 58px;
    align-items: center;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo i,
.logo span,
.feature-icon,
.trust-badges i,
.forgot-password,
.card-footer a {
    color: var(--primary-color);
}

.badge-enterprise {
    background: var(--surface-strong);
    color: var(--primary-dark);
    padding: 0.42rem 0.86rem;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    border: 1px solid var(--line);
    letter-spacing: 0.06em;
}

.headline {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    line-height: 1.02;
    font-weight: 900;
    margin: 0 0 1.4rem;
    color: var(--ink);
    letter-spacing: 0;
}

.typewriter-container {
    display: inline-block;
    min-height: 1.15em;
}

.typewriter-text {
    color: var(--primary-color);
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
    margin-left: 5px;
    vertical-align: middle;
    height: 1em;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.subheadline {
    font-size: 1.08rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 680px;
}

.enterprise-features {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.4rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.feature-icon {
    background: var(--surface-strong);
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    color: var(--ink);
    font-weight: 800;
    margin-bottom: 0.18rem;
}

.feature-text span,
.trust-badges span,
.card-header p,
.card-footer p,
.modal-header p,
.alert-message {
    color: var(--muted);
}

.trust-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.module-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2.4rem;
    box-shadow: 0 24px 60px rgba(19, 32, 35, 0.14);
    position: relative;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h2,
.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    font-weight: 850;
}

.form-group {
    margin-bottom: 1.35rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 750;
    color: var(--ink);
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    z-index: 2;
}

.form-control {
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.86rem 1rem 0.86rem 3rem;
    color: var(--ink);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(8, 127, 140, 0.12);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    cursor: pointer;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    display: none;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.6rem;
    font-size: 0.9rem;
}

.forgot-password,
.card-footer a {
    text-decoration: none;
    font-weight: 750;
}

.forgot-password:hover,
.card-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.86rem 1.5rem;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: var(--font-body);
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem;
    font-size: 1.03rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 12px 26px rgba(8, 127, 140, 0.22);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--surface-strong);
    color: var(--ink);
    border: 1px solid var(--line);
}

.card-footer {
    margin-top: 1.8rem;
    text-align: center;
    border-top: 1px solid var(--line);
    padding-top: 1.4rem;
}

.alert-box {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 20px 45px rgba(19, 32, 35, 0.16);
    z-index: 1000;
}

.alert-box.error {
    border-left-color: var(--error-color);
}

.alert-box.success {
    border-left-color: var(--success-color);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(19, 32, 35, 0.55);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 460px;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    flex: 1;
}

.fade-in {
    animation: fadeIn 0.65s ease-out both;
}

.fade-in-delayed {
    animation: fadeIn 0.65s ease-out 0.12s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 920px) {
    .login-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 620px;
        margin: 0 auto;
    }

    .login-branding {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .login-wrapper {
        align-items: flex-start;
        padding: 28px 0;
    }

    .container {
        width: min(100% - 28px, 1180px);
    }

    .module-card {
        padding: 1.45rem;
    }

    .brand-header,
    .trust-badges,
    .form-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-actions .btn {
        width: 100%;
    }

    .enterprise-features,
    .subheadline {
        display: none;
    }

    .headline {
        font-size: 2rem;
    }
}
