@import url('https://fonts.googleapis.com/css2?family=Inter:wght@700;800&display=swap');

:root {
    --login-panel: rgba(255, 255, 255, 0.07);
    --login-panel-border: rgba(255, 255, 255, 0.14);
    --login-text: #f4f7fb;
    --login-muted: rgba(244, 247, 251, 0.62);
    --login-border: rgba(255, 255, 255, 0.16);
    --login-field-bg: rgba(255, 255, 255, 0.05);
    --login-accent: #ffffff;
    --login-accent-strong: #f2a900;
    --login-navy-900: #0c1b2e;
    --login-navy-800: #14283f;
    --login-navy-700: #1c3552;
}

.login-page {
    min-height: 100vh;
}

.login-page__grid {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 75% 10%, rgba(242, 169, 0, 0.20), transparent 40%),
        radial-gradient(circle at 8% 92%, rgba(70, 140, 210, 0.18), transparent 42%),
        linear-gradient(155deg, var(--login-navy-700) 0%, var(--login-navy-800) 55%, var(--login-navy-900) 100%);
}

.login-page__grid::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.15) 75%, transparent);
}

.login-page__grid::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    z-index: 0;
    opacity: 0.5;
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: 620px auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='220' viewBox='0 0 620 220'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 220V70l40-18 40 18v150'/%3E%3Cpath d='M20 100h80M20 140h80M20 180h80'/%3E%3Cpath d='M150 220V40h60v180'/%3E%3Cpath d='M150 70h60M150 105h60M150 140h60M150 175h60'/%3E%3Cpath d='M320 30v190M320 30l100 40M320 60l70 20'/%3E%3Cpath d='M300 220h40'/%3E%3Cpath d='M470 220V90h50v130'/%3E%3Cpath d='M470 115h50M470 150h50M470 185h50'/%3E%3Cpath d='M560 220V130l25-12 25 12v90'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Lado esquerdo: conteúdo institucional ---------- */

.login-side {
    position: relative;
    z-index: 1;
    display: flex;
}

.login-side__overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(200deg, rgba(9, 18, 32, 0.15) 10%, rgba(9, 18, 32, 0.55) 60%, rgba(9, 18, 32, 0.85) 100%);
}

.login-side__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    padding: 48px clamp(32px, 5vw, 72px) 56px;
    color: #ffffff;
}

.login-side__brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.login-side__brand-logo {
    height: 104px;
    max-width: min(100%, 310px);
    width: auto;
    object-fit: contain;
}

.login-side__marcas { width: 100%; max-width: 400px; display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 18px; }
.login-side__marcas .login-side__brand-logo { width: 84px; height: 84px; }
.login-side__sigo { width: 100%; height: auto; display: block; object-fit: contain; }

.login-side__brand-divisor {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.25);
}

.login-side__intro h1 {
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: clamp(2.1rem, 3.4vw, 3rem);
    line-height: 1.08;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.login-side__intro p {
    max-width: 42ch;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.02rem;
}

.login-side__features {
    display: grid;
    gap: 14px;
}

.login-feature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-feature__text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #ffffff;
}

.login-feature__text p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
    font-size: 0.88rem;
}

.login-feature__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(242, 169, 0, 0.16);
    border: 1px solid rgba(242, 169, 0, 0.35);
}

.login-feature__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--login-accent-strong);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-side__fornecedor {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-side__fornecedor small {
    color: rgba(255, 255, 255, 0.65);
    font: 600 0.68rem/1 'IBM Plex Mono', monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.login-side__fornecedor img {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ---------- Lado direito: formulário ---------- */

.login-panel {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-panel__inner {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
    border: 1px solid var(--login-panel-border);
    border-radius: 24px;
    padding: clamp(28px, 4vw, 40px);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 24px 60px rgba(4, 10, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-panel__header {
    margin-bottom: 28px;
}

.login-panel__header h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.85rem;
    letter-spacing: -0.01em;
    color: var(--login-accent);
    margin-bottom: 8px;
}

.login-panel__header p {
    color: var(--login-muted);
    line-height: 1.6;
}

.login-alert {
    background: rgba(217, 83, 79, 0.14);
    border: 1px solid rgba(217, 83, 79, 0.4);
    color: #ffb3ae;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.login-form {
    display: grid;
    gap: 20px;
}

.login-form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form__group > label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    font-weight: 600;
}

.login-form__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-form__label-row label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    font-weight: 600;
}

.login-form__esqueci {
    color: var(--login-accent-strong);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.login-form__esqueci:hover {
    text-decoration: underline;
}

.login-select {
    position: relative;
}

.login-select select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--login-field-bg);
    border: 1px solid var(--login-border);
    border-radius: 12px;
    padding: 14px 42px 14px 16px;
    font: inherit;
    color: var(--login-text);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-select select option {
    color: #16233a;
    background: #ffffff;
}

.login-select select:focus {
    outline: none;
    border-color: var(--login-accent-strong);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(242, 169, 0, 0.18);
}

.login-select__chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    pointer-events: none;
    fill: none;
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.login-input__icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.login-input input {
    width: 100%;
    background: var(--login-field-bg);
    border: 1px solid var(--login-border);
    border-radius: 12px;
    padding: 14px 16px 14px 42px;
    color: var(--login-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.login-input input:focus {
    outline: none;
    border-color: var(--login-accent-strong);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(242, 169, 0, 0.18);
}

.login-form__help {
    color: var(--login-muted);
    font-size: 0.85rem;
    margin-top: -2px;
}

.login-form__submit {
    width: 100%;
    margin-top: 4px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 12px 26px rgba(242, 169, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-form__submit:hover {
    box-shadow: 0 16px 32px rgba(242, 169, 0, 0.32);
}

.login-panel__footer {
    margin-top: 28px;
    color: var(--login-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--login-border);
    padding-top: 20px;
    line-height: 1.6;
}

.login-panel__footer a,
.login-panel__footer a:visited {
    color: var(--login-accent-strong);
    font-weight: 700;
    text-decoration-color: rgba(242, 169, 0, 0.48);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.login-panel__footer a:hover {
    color: #ffc33d;
    text-decoration-color: currentColor;
}

.login-panel__footer--app {
    margin: 18px 0 4px;
    padding: 12px 14px;
    border: 1px solid rgba(242, 169, 0, 0.24);
    border-radius: 10px;
    background: rgba(242, 169, 0, 0.07);
}


@media (max-width: 980px) {
    .login-page__grid {
        grid-template-columns: 1fr;
    }

    .login-page__grid::after {
        display: none;
    }

    .login-side {
        min-height: 0;
    }

    .login-side__content {
        justify-content: flex-start;
        gap: 24px;
        padding: 32px 24px 36px;
    }

    .login-side__features {
        display: none;
    }
}

@media (max-width: 560px) {
    .login-side__marcas { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
    .login-side__marcas .login-side__brand-logo { width: 64px; height: 64px; }
    .login-panel {
        padding: 32px 18px 44px;
    }

    .login-side__intro p {
        display: none;
    }

    .login-side__brand-logo {
        height: 86px;
        max-width: 250px;
    }
}
