/*
 * Tela de login do login.webprice.com.br.
 *
 * Sem Bootstrap e sem CDN: script-src/style-src 'self' na CSP dependem de
 * todo asset sair deste projeto. Os tokens abaixo sao COPIADOS de
 * static.webprice.com.br/public/development/start_new e de login_video/style.css,
 * nao linkados -- a tela de login nao pode depender da disponibilidade de
 * outro host nem coloca-lo dentro da fronteira de confianca da autenticacao.
 */

:root {
    --wp-blue: #1e7fd6;
    --wp-blue-dark: #1767b3;
    --wp-blue-link: #1a69b4;
    --wp-gray-text: #5b5b5b;
    --wp-gray-line: #d6d9de;
    --wp-gray-bg: #f6f7f9;
    --wp-white: #ffffff;
    --wp-danger: #b42318;
    --wp-danger-bg: #fef3f2;
    --wp-success: #067647;
    --wp-success-bg: #ecfdf3;
    --wp-warning: #b54708;
    --wp-warning-bg: #fffaeb;

    --wp-radius: 6px;
    --wp-font: "Open Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--wp-font);
    font-size: 16px;
    color: var(--wp-gray-text);
    background: var(--wp-white);
}

/* ─────────────────── layout duas colunas ─────────────────── */
/*
 * Grid 8/4, equivalente ao col-8 + col do Bootstrap 5 do legado, sem
 * carregar o framework inteiro por causa de duas colunas.
 */
.layout {
    display: grid;
    grid-template-columns: 8fr 4fr;
    min-height: 100vh;
}

.layout--single {
    grid-template-columns: 1fr;
}

.side-a {
    position: relative;
    background: var(--wp-gray-bg);
    overflow: hidden;
}

.side-a__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/*
 * Abaixo de 1024px o lado esquerdo some e o formulario ocupa a tela inteira.
 * Comportamento herdado do legado (login_video/style.css), mantido de proposito.
 */
@media (max-width: 1024px) {
    .layout { grid-template-columns: 1fr; }
    .side-a { display: none; }
}

/* ─────────────────── formulário ─────────────────── */

.side-b {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.panel {
    width: 100%;
    max-width: 380px;
}

.brand img { max-width: 100%; height: auto; }

.welcome {
    margin: 24px 0 0;
    font-size: 24px;
    font-weight: 400;
    color: var(--wp-gray-text);
}

.stage { margin-top: 28px; text-align: left; }
.stage[hidden] { display: none; }

.stage__title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--wp-gray-text);
}

.stage__hint {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
}

.field { margin-bottom: 16px; }

.field__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.field input {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 18px;
    color: var(--wp-gray-text);
    background: var(--wp-white);
    border: 1px solid var(--wp-gray-line);
    border-radius: var(--wp-radius);
}

.field input:focus {
    outline: 2px solid var(--wp-blue);
    outline-offset: 1px;
    border-color: var(--wp-blue);
}

/* Codigo de 6 digitos: monoespacado e espacado, para conferir sem esforco. */
#field-code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 24px;
    letter-spacing: 0.4em;
    text-align: center;
}

/* ─────────────────── seleção de conta ─────────────────── */

.accounts { margin-bottom: 16px; }

.account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    font-size: 15px;
    border: 1px solid var(--wp-gray-line);
    border-radius: var(--wp-radius);
    cursor: pointer;
}

.account:hover { border-color: var(--wp-blue); }

.account input { margin: 0; accent-color: var(--wp-blue); }

.account:has(input:checked) {
    border-color: var(--wp-blue);
    background: var(--wp-gray-bg);
}

/* ─────────────────── botões ─────────────────── */

.btn {
    display: inline-block;
    padding: 11px 16px;
    font-family: inherit;
    font-size: 17px;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--wp-radius);
    cursor: pointer;
}

.btn--primary {
    width: 100%;
    color: var(--wp-white);
    background: var(--wp-blue);
}

.btn--primary:hover { background: var(--wp-blue-dark); }

.btn--ghost {
    color: var(--wp-blue);
    background: transparent;
    border-color: var(--wp-gray-line);
}

.btn--link { margin-top: 24px; }

.btn[disabled] { opacity: 0.6; cursor: default; }

.actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.actions .btn { flex: 1; }
.actions .btn--primary { width: auto; }

.link {
    font-size: 14px;
    color: var(--wp-blue-link);
    text-decoration: underline;
}

/* ─────────────────── mensagens ─────────────────── */

.message {
    margin-top: 20px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    border-radius: var(--wp-radius);
}

.message[hidden] { display: none; }
.message--error { color: var(--wp-danger); background: var(--wp-danger-bg); }
.message--success { color: var(--wp-success); background: var(--wp-success-bg); }
.message--info { color: var(--wp-warning); background: var(--wp-warning-bg); }

/* ─────────────────── rodapé ─────────────────── */

.foot {
    margin-top: 40px;
    font-size: 14px;
}

.foot p { margin: 4px 0; }
.foot__powered { margin-top: 32px !important; font-size: 12px; letter-spacing: 1px; }
.foot__logo { max-width: 110px; height: auto; }

.error__text {
    margin: 16px 0 0;
    font-size: 15px;
    line-height: 1.6;
}
