:root {

    --bg-main:
        linear-gradient(
            135deg,
            #dbeafe,
            #cfe3ff
        );

    --primary:
        #1f6fff;

    --primary-dark:
        #155df5;

    --text:
        #1e293b;

    --text-soft:
        #1e293b;

    --shadow:
        0 10px 28px rgba(15, 23, 42, 0.08);

    --radius-xl:
        28px;

    --radius-lg:
        16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {

    width: 100%;
    min-height: 100vh;

    font-family: 'Inter', sans-serif;

    background: var(--bg-main);
}

body {

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 1.5rem;

    overflow-x: hidden;
}

.login-messages {
    width: 100%;
}

.login-messages:has(.alert-message) {
    margin: 0.9rem 0 1rem;
}

.login-messages .alert-message {
    --login-alert-color: var(--info, #0ea5e9);
    --login-alert-soft: var(
        --info-soft,
        rgba(14, 165, 233, 0.1)
    );

    position: relative;

    width: 100%;
    margin: 0 0 0.65rem;
    padding: 0.78rem 0.9rem;

    display: flex;
    align-items: center;
    gap: 0.7rem;

    color: var(--text, #0f172a);

    background: var(--card, #ffffff);
    background:
        color-mix(
            in srgb,
            var(--login-alert-soft) 45%,
            var(--card, #ffffff)
        );

    border: 1px solid var(--border, #e2e8f0);
    border-color:
        color-mix(
            in srgb,
            var(--login-alert-color) 24%,
            var(--border, #e2e8f0)
        );

    border-left-width: 1px;
    border-radius: 12px;

    box-shadow:
        0 5px 16px rgba(15, 23, 42, 0.06);

    overflow: hidden;

    animation:
        loginAlertEnter 0.26s ease both;
}

.login-messages .alert-message:last-child {
    margin-bottom: 0;
}

.login-messages .alert-message::before {
    content: "";

    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;

    width: 3px;

    background: var(--login-alert-color);
    border-radius: 0 999px 999px 0;
}

.login-messages .alert-message > svg:first-child {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;

    margin: 0;
    padding: 7px;

    color: var(--login-alert-color);
    background: var(--login-alert-soft);

    border-radius: 10px;
    stroke-width: 2.2;
}

.login-messages .alert-message > i[data-lucide]:first-child {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--login-alert-color);
    background: var(--login-alert-soft);

    border-radius: 10px;
}

.login-messages .alert-message p {
    min-width: 0;
    flex: 1;

    margin: 0;

    color: var(--text, #0f172a);

    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.45;

    overflow-wrap: anywhere;
}

.login-messages .alert-success {
    --login-alert-color: var(--success, #22c55e);
    --login-alert-soft: var(
        --success-soft,
        rgba(34, 197, 94, 0.1)
    );
}

.login-messages .alert-error {
    --login-alert-color: var(--danger, #ef4444);
    --login-alert-soft: var(
        --danger-soft,
        rgba(239, 68, 68, 0.1)
    );
}

.login-messages .alert-warning {
    --login-alert-color: var(--warning, #f59e0b);
    --login-alert-soft: var(
        --warning-soft,
        rgba(245, 158, 11, 0.1)
    );
}

.login-messages .alert-info {
    --login-alert-color: var(--info, #0ea5e9);
    --login-alert-soft: var(
        --info-soft,
        rgba(14, 165, 233, 0.1)
    );
}

.login-messages .alert-close {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    margin-left: auto;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--text-soft, #64748b);
    background: transparent;

    border: none;
    border-radius: 8px;

    cursor: pointer;
    opacity: 0.7;
}

.login-messages .alert-close:hover {
    color: var(--text, #0f172a);
    background: var(--hover, rgba(15, 23, 42, 0.05));
    opacity: 1;
}

.login-messages .alert-close svg {
    width: 15px;
    height: 15px;
}

@keyframes loginAlertEnter {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .login-messages:has(.alert-message) {
        margin: 0.75rem 0 0.9rem;
    }

    .login-messages .alert-message {
        padding: 0.72rem 0.78rem;
        gap: 0.62rem;
    }

    .login-messages .alert-message > svg:first-child,
    .login-messages .alert-message > i[data-lucide]:first-child {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .login-messages .alert-message p {
        font-size: 0.74rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-messages .alert-message {
        animation: none !important;
        transition: none !important;
    }
}

.login-wrapper {

    width: 100%;
    max-width: 900px;

    min-height: 620px;

    display: flex;

    overflow: hidden;

    border-radius: var(--radius-xl);

    background:
        rgba(255, 255, 255, 0.42);

    border:
        1px solid rgba(255, 255, 255, 0.5);

    backdrop-filter:
        blur(10px);

    box-shadow: var(--shadow);
}

.login-column {

    flex: 1;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 2rem;
}

.login-column img {

    width: 100%;
    max-width: 200px;
    transition: transform 0.2s ease;
    object-fit: contain;
}

.login-column img:hover {
    transform: scale(1.03);
}

.login-form {

    width: 100%;
    max-width: 300px;

    margin: 0 auto;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 2.8rem 2rem;

    background:
        rgba(255, 255, 255, 0.72);

    backdrop-filter:
        blur(18px);

    border-left:
        1px solid rgba(59, 130, 246, 0.25);

    border-right:
        1px solid rgba(59, 130, 246, 0.25);
}

.logo {

    text-align: center;

    margin-bottom: 1.5rem;
}

.logo img {

    width: 170px;
    transition: transform 0.2s ease;
    object-fit: contain;
}

.logo img:hover{
    transform: scale(1.03);
}

.login-description {

    text-align: center;

    color: var(--text);

    font-size: 0.98rem;

    line-height: 1.5;

    margin-bottom: 1.8rem;

    font-weight: 500;
}

form {
    width: 100%;
}

.form-group {

    margin-bottom: 1rem;
}

.input-group {

    position: relative;
}

.input-group svg {

    position: absolute;

    left: 16px;
    top: 50%;

    transform: translateY(-50%);

    width: 18px;
    height: 18px;

    stroke: #64748b;

    opacity: 0.9;
}

input[type="text"],
input[type="password"] {

    width: 100%;

    height: 48px;

    padding:
        0 50px;

    border-radius:
        var(--radius-lg);

    border:
        1px solid rgba(203, 213, 225, 0.95);

    background:
        rgba(255, 255, 255, 0.95);

    color: var(--text);

    font-size: 0.97rem;

    font-weight: 500;

    transition:
        border 0.2s ease,
        box-shadow 0.2s ease;
}

input::placeholder {

    color: #64748b;

    font-weight: 500;
}

input:focus {

    outline: none;

    border-color:
        rgba(37, 99, 235, 0.5);

    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.10);
}

.toggle-password {

    position: absolute;

    right: 40px;
    top: 50%;

    transform: translateY(-50%);

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.toggle-password svg {

    width: 18px;
    height: 18px;

    stroke: #64748b;
}

button {

    width: 100%;

    height: 45px;

    margin-top: 0.4rem;

    border: none;

    border-radius:
        var(--radius-lg);

    background:
        linear-gradient(
            135deg,
            #1f6fff,
            #155df5
        );

    color: white;

    font-size: 1.15rem;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

button:hover {

    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(37, 99, 235, 0.22);
}

.msg-erro,
.msg-sucesso {

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 12px;

    border-radius: 12px;

    margin-bottom: 1rem;

    font-size: 0.92rem;

    font-weight: 600;
}

.msg-erro {

    background:
        rgba(239, 68, 68, 0.08);

    color: #dc2626;
}

.msg-sucesso {

    background:
        rgba(34, 197, 94, 0.08);

    color: #16a34a;
}

.forgot-password {

    text-align: center;

    margin-top: 1.3rem;
}

.forgot-password a {

    color: var(--primary);

    font-size: 0.95rem;

    font-weight: 600;

    text-decoration: underline;
}

footer {

    margin-top: 1.6rem;

    text-align: center;

    color: var(--text-soft);

    font-size: 0.82rem;

    font-weight: 500;
}

@media (max-width: 1100px) {

    .login-wrapper {

        flex-direction: column;

        min-height: auto;
    }

    .login-column {
        display: none;
    }

    .login-form {

        max-width: 100%;

        border: none;
    }
}

@media (max-width: 700px) {

    body {
        padding: 0.8rem;
    }

    .login-wrapper {

        border-radius: 22px;
    }

    .login-form {

        padding:
            2.2rem 1.3rem;
    }

    .logo img {

        width: 150px;
    }

    input[type="text"],
    input[type="password"],
    button {

        height: 52px;
    }

    .login-description {

        font-size: 0.92rem;
    }
}

