/* Login modern layout v2 (skin login_novo). ASCII only.
   Scoped under .lg-shell (login page) and #myModal (registration panel).
   Loaded LAST so it overrides bootstrap/skeleton/flexboxgrid.

   Design: vertical split. Left = solid white form panel (logo, heading,
   fields with inline SVG icons, graphite primary, blue conversion CTA).
   Right = tenant brand backdrop (prefs background shows through) with the
   edition cover floating on a soft shadow. Mobile: single white column. */

.lg-shell {
    --lg-ink: #181a1e;
    --lg-soft: #6b7075;
    --lg-line: #e6e7ea;
    --lg-surface-2: #f5f6f8;
    --lg-accent: #23262b;        /* primary action (login) */
    --lg-accent-ink: #ffffff;
    --lg-action: #2050d8;        /* conversion CTA (subscribe/buy) */
    --lg-action-hover: #1a43b5;
    --lg-action-ink: #ffffff;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--lg-ink);
    -webkit-font-smoothing: antialiased;
}
.lg-shell *, .lg-shell *::before, .lg-shell *::after { box-sizing: border-box; }

/* this stylesheet only loads on login/cadastro pages: kill any sideways
   overflow from legacy floats/fixed widths for good */
html, body { overflow-x: hidden; }

/* tenant background image fills nicely when present */
.lg-shell #background img.stretch { object-fit: cover; }

/* ---------- split ---------- */
.lg-shell > .row {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: nowrap;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch;
}
.lg-shell > .row > .col-xs {
    margin: 0 !important;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* left: solid white form panel */
.lg-shell > .row > .col-xs:first-child {
    flex: 0 0 46%;
    max-width: 46%;
    background: #ffffff;
    box-shadow: 1px 0 0 var(--lg-line);
    padding: 48px 44px;
}
/* right: tenant brand backdrop with the cover */
.lg-shell > .row > .col-xs.capa-revista {
    flex: 1 1 54%;
    max-width: 54%;
    background: linear-gradient(165deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .22));
    padding: 48px 32px;
}
.lg-shell .box { width: 100%; max-width: 400px; margin: 0 auto; }
.lg-shell .capa-revista .box { max-width: none; text-align: center; }
.lg-shell .login { background: transparent; border: 0; box-shadow: none; padding: 0; width: 100%; }

/* ---------- left panel content ---------- */
.lg-shell .logoclass {
    display: block !important;
    text-align: left;
    max-height: none;
    width: 100%;
    margin: 0 0 26px;
}
.lg-shell .logoclass img { max-height: 48px !important; max-width: 190px !important; width: auto; height: auto; }

.lg-shell .lg-heading {
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--lg-ink);
    margin: 0 0 6px;
    text-align: left;
}
.lg-shell .lg-sub {
    font-size: 14.5px;
    color: var(--lg-soft);
    margin: 0 0 22px;
    text-align: left;
}

/* publisher-configured HTML (textoAssinatura): keep it modest */
.lg-shell .topologin fieldset { border: 0; padding: 0; margin: 0 0 4px; }
.lg-shell .topologin fieldset h1,
.lg-shell .topologin fieldset h2,
.lg-shell .topologin fieldset h3 { font-size: 15px; font-weight: 650; color: var(--lg-soft); margin: 0 0 4px; letter-spacing: 0; }
.lg-shell .topologin fieldset p { font-size: 14px; color: var(--lg-soft); margin: 0; }
.lg-shell .topologin br { display: none; }

/* labels */
.lg-shell #login label,
.lg-shell #esqueci label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: var(--lg-ink);
    margin: 14px 0 6px;
    letter-spacing: .01em;
}

/* inputs with inline SVG icons */
.lg-shell input[type="text"],
.lg-shell input[type="password"],
.lg-shell input[type="email"] {
    width: 100% !important;
    height: 48px !important;
    padding: 0 14px 0 42px !important;
    border: 1px solid var(--lg-line) !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    background-color: #fff;
    color: var(--lg-ink);
    margin: 0 !important;
    box-shadow: none;
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 18px 18px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-shell input:focus {
    border-color: var(--lg-accent) !important;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(35, 38, 43, .10);
}
.lg-shell .usuario {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7075' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-3.9 3.6-6.5 8-6.5s8 2.6 8 6.5'/%3E%3C/svg%3E");
}
.lg-shell .senha {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7075' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}
.lg-shell .email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7075' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.lg-shell input[type="submit"],
.lg-shell input[type="button"] {
    width: 100% !important;
    float: none !important;
    height: 48px;
    line-height: 46px;
    padding: 0 18px;
    margin: 0 !important;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    text-align: center;
    transition: background .15s ease, box-shadow .15s ease, transform .06s ease;
}
.lg-shell input[type="submit"]:active,
.lg-shell input[type="button"]:active { transform: translateY(1px); }

/* primary: login / send.
   Note: selectors carry #login/#esqueci so their margins BEAT the generic
   `input[type=submit] { margin: 0 !important }` reset above. */
.lg-shell .acessar, .lg-shell #forgot {
    background: var(--lg-accent);
    color: var(--lg-accent-ink);
}
.lg-shell .acessar:hover, .lg-shell #forgot:hover { box-shadow: 0 8px 20px rgba(24, 26, 30, .22); }
.lg-shell #login input.acessar { margin-top: 16px !important; }
.lg-shell #esqueci input.acessar,
.lg-shell #esqueci #forgot { margin-top: 16px !important; }

/* secondary: back */
.lg-shell .btn-voltar {
    background: #fff;
    color: var(--lg-ink);
    border-color: var(--lg-line);
}
.lg-shell .btn-voltar:hover { background: var(--lg-surface-2); }
.lg-shell #esqueci input.btn-voltar { margin-top: 10px !important; }

/* conversion CTA: subscribe / buy / register (refined blue, no green) */
.lg-shell .btn-assinar {
    background: var(--lg-action) !important;
    color: var(--lg-action-ink) !important;
    box-shadow: 0 8px 20px rgba(32, 80, 216, .25);
}
.lg-shell .btn-assinar:hover { background: var(--lg-action-hover) !important; box-shadow: 0 10px 26px rgba(32, 80, 216, .35); }
.lg-shell #login input.btn-assinar { margin-top: 12px !important; }

/* ---- form flow order (best practice): password -> forgot link (small,
   right-aligned) -> Acessar -> divider -> conversion CTA. The DOM has the
   forgot link AFTER the submit, so we reorder with flexbox. ---- */
.lg-shell #login { display: flex; flex-direction: column; }
/* default anchors (subscribe/buy wrappers, no known forgot id): conversion zone */
.lg-shell #login > a {
    order: 4;
    display: block;
    text-align: center;
    margin: 12px 0 0;
    font-size: 13.5px;
    color: var(--lg-soft);
    text-decoration: none;
}
.lg-shell #login > a > input.btn-assinar { margin-top: 0 !important; }
/* forgot-password links (ids all start with esqueci-lnk): tucked under the
   password field, right-aligned and quiet */
.lg-shell #login > a[id^="esqueci-lnk"] {
    order: 1;
    align-self: flex-end;
    margin: 10px 0 0;
    font-size: 13px;
}
.lg-shell #login > a:hover { color: var(--lg-ink); text-decoration: underline; }
.lg-shell #login input.acessar { order: 2; }
.lg-shell #login hr { order: 3; width: 100%; border: 0; border-top: 1px solid var(--lg-line); margin: 20px 0 0; }
.lg-shell #login input.btn-assinar { order: 5; }
.lg-shell #login .g-recaptcha { order: 0; }

/* server message banner (session MESSAGE) */
.lg-shell .msg-login {
    display: block;
    background: #fdf3f2;
    border: 1px solid #f1d3ce;
    color: #8f2b20;
    border-radius: 12px;
    padding: 12px 14px 12px 40px;
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.45;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f2b20' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5'/%3E%3Ccircle cx='12' cy='16.2' r='.4' fill='%238f2b20'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px 12px;
    background-size: 18px 18px;
}
.lg-shell .msg-login .close {
    width: auto !important;
    height: auto !important;
    line-height: 1;
    float: right;
    margin: 0 0 0 8px !important;
    padding: 2px 6px;
    background: transparent;
    color: inherit;
    border: 0;
    box-shadow: none;
    font-weight: 700;
    font-size: 13px;
    border-radius: 6px;
}

/* recaptcha */
.lg-shell .g-recaptcha { margin: 14px 0 0; }

/* app store badges (kills legacy inline float/width) */
.lg-shell form > div[style*="display:table"] {
    height: auto !important;
    display: flex !important;
    justify-content: flex-start;
    gap: 12px;
    margin: 22px 0 0 !important;
}
.lg-shell form > div[style*="display:table"] > a {
    float: none !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    display: inline-block;
}
.lg-shell form > div[style*="display:table"] img { height: 40px; width: auto; display: block; }

/* forgot-password panel */
.lg-shell #esqueci h1 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 0 0 14px; text-align: left; }

/* ---------- right panel: cover (the star of that half) ---------- */
.lg-shell .capa {
    width: auto !important;
    height: auto !important;
    max-width: min(560px, 92%);
    max-height: 76vh;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38), 0 4px 14px rgba(0, 0, 0, .22);
    display: block;
    margin: 0 auto 24px;
}
/* cover-side conversion CTA. Neutralizes two legacy hacks:
   - skeleton.css: `a.assine { float:left; width:49% !important }`
   - normalize.css: image-replacement `{ text-indent:-200px; position:absolute;
     overflow:hidden; background:url(bt-assine-agora.gif) }` which hid the text. */
.lg-shell .capa-revista a.assine {
    float: none !important;
    width: auto !important;
    max-width: 100%;
    min-width: 0;
    position: relative !important;
    text-indent: 0 !important;
    overflow: visible !important;
    height: 48px !important;
    z-index: auto;
    display: inline-block;
    height: 48px;
    line-height: 48px;
    padding: 0 34px;
    border-radius: 12px;
    background: var(--lg-action);
    color: var(--lg-action-ink) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 10px 26px rgba(32, 80, 216, .35);
    transition: background .15s ease, box-shadow .15s ease;
}
.lg-shell .capa-revista a.assine:hover { background: var(--lg-action-hover); }
.lg-shell a.assine:empty::before { content: "Assinar agora"; }

/* ---------- footer: slim, translucent, unobtrusive ---------- */
.lg-shell .maven-footer {
    color: var(--lg-soft) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px 16px;
    font-size: 12px;
    text-align: center;
    border: 0;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.lg-shell .maven-footer a { color: var(--lg-soft); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .lg-shell > .row { flex-direction: column; }
    .lg-shell > .row > .col-xs:first-child {
        flex: 1 1 auto;
        max-width: 100%;
        box-shadow: none;
        padding: 32px 22px;
    }
    /* the brand/cover half is decorative: hide it on small screens */
    .lg-shell > .row > .col-xs.capa-revista { display: none !important; }
    .lg-shell .box { max-width: 440px; }
}

/* ============================================================================
   Registration (cadastro) - modern panel scoped to #myModal.
   Used by the login modal (login.jsp) and by paginaCadastro.jsp.
   ============================================================================ */
#myModal {
    --c-ink: #181a1e;
    --c-soft: #6b7075;
    --c-line: #e6e7ea;
    --c-surface-2: #f5f6f8;
    --c-accent: #23262b;
    --c-action: #2050d8;
    --c-action-hover: #1a43b5;
    --c-action-ink: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--c-ink);
    max-width: 100% !important;
}
#myModal *, #myModal *::before, #myModal *::after { box-sizing: border-box; }

#myModal .cad-logo { text-align: center; margin: 10px 0 2px; }
#myModal .cad-logo img { max-height: 46px; max-width: 180px; width: auto; height: auto; }
#myModal .cad-title, #myModal h3 {
    font-size: 20px !important;
    font-weight: 750;
    text-align: center;
    color: var(--c-ink);
    margin: 8px 0 4px;
    letter-spacing: -.01em;
}

#myModal .cadastro-step1,
#myModal .cadastro-step2 {
    padding: 20px 24px !important;
    max-height: none !important;
    overflow: visible !important;
}
#myModal .box { background: transparent; padding: 0; margin: 0 auto; max-width: 640px; width: 100%; }

#myModal .controls-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 4px; }
#myModal .controls-row > .span3 { flex: 1 1 240px; min-width: 0; width: auto; }

#myModal label { display: block; font-size: 13px; font-weight: 650; color: var(--c-ink); margin: 10px 0 6px; text-align: left; }

#myModal input[type="text"],
#myModal input[type="email"],
#myModal input[type="password"],
#myModal select {
    width: 100% !important;
    height: 46px !important;
    padding: 0 12px !important;
    border: 1px solid var(--c-line) !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    background: #fff;
    color: var(--c-ink);
    margin-bottom: 4px !important;
    box-shadow: none;
}
#myModal input:focus, #myModal select:focus { border-color: var(--c-accent) !important; outline: 0; box-shadow: 0 0 0 3px rgba(35, 38, 43, .10); }

#myModal input[name="flipUsuario.dddTelefone"] { width: 74px !important; display: inline-block; }
#myModal input[name="flipUsuario.telefone"] { width: auto !important; min-width: 150px; display: inline-block; }

#myModal .maior { display: block; width: 100% !important; float: none; margin: 8px 0; }
#myModal .maior .grande { display: block; float: none; width: auto; padding: 0; font-weight: 650; color: var(--c-soft); font-size: 13px; margin-bottom: 6px; }

#myModal .nav-tabs { display: flex; gap: 6px; border: 0; list-style: none; padding: 0; margin: 0 0 16px; }
#myModal .nav-tabs > li { margin: 0; list-style: none; }
#myModal .nav-tabs > li > a { display: block; padding: 10px 16px; border-radius: 999px; background: var(--c-surface-2); color: var(--c-soft); font-weight: 650; font-size: 14px; text-decoration: none; border: 1px solid var(--c-line); }
#myModal .nav-tabs > li.active > a { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

#myModal .modal-footer { border: 0; background: transparent; padding: 16px 24px 24px; position: static !important; width: auto !important; box-shadow: none; }
#myModal .modal-footer .row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
#myModal .modal-footer .col-xs { flex: 1 1 auto; margin: 0; padding: 0; }
#myModal .modal-footer .box { max-width: none; }
#myModal .btn,
#myModal input[type="submit"],
#myModal input[type="button"] {
    width: 100% !important;
    height: 46px;
    line-height: 1;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    margin: 0;
    transition: box-shadow .15s ease, background .15s ease;
}
#myModal .btn-success,
#myModal .button-login-register,
#myModal .button-login-assina,
#myModal .button-login-finaliza {
    background: var(--c-action) !important;
    color: var(--c-action-ink) !important;
    box-shadow: 0 8px 20px rgba(32, 80, 216, .25);
}
#myModal .btn-success:hover,
#myModal .button-login-register:hover,
#myModal .button-login-assina:hover,
#myModal .button-login-finaliza:hover { background: var(--c-action-hover) !important; }
#myModal .btn-primary,
#myModal #fechar {
    background: #fff !important;
    color: var(--c-ink) !important;
    border-color: var(--c-line) !important;
}
#myModal .acessar, #myModal .button-login { background: var(--c-accent) !important; color: #fff !important; }

#myModal .validation-error { color: #c0392b; font-size: 12px; display: block; margin-top: 4px; }

@media (max-width: 640px) {
    #myModal .controls-row { gap: 10px; }
    #myModal .controls-row > .span3 { flex: 1 1 100%; }
    #myModal .cadastro-step1, #myModal .cadastro-step2 { padding: 16px !important; }
    #myModal .modal-footer .row { flex-direction: column; }
}
