/*
 * Flypper Obras — acesso, cadastro e recuperação.
 * Folha autossuficiente: os temas variam apenas pelos tokens abaixo.
 * As páginas de autenticação não carregam flypper-theme.css ou CSS do workspace.
 */
:root {
    --auth-blue: #1769e0;
    --auth-button: #1769e0;
    --auth-button-hover: #1d4ed8;
    --auth-ink: #172b4d;
    --auth-muted: #5d6c83;
    --auth-placeholder: #64748b;
    --auth-line: #dce3ed;
    --auth-page: #f4f6fa;
    --auth-card: #ffffff;
    --auth-soft: #edf4ff;
    --auth-input: #ffffff;
    --auth-focus: rgba(23, 105, 224, .16);
    --auth-brand-background: linear-gradient(150deg, #123568 0%, #164f91 100%);
    --auth-brand-line: #57779f;
    --auth-brand-text: #cbdcf1;
    --auth-shadow: 0 8px 32px rgba(23, 43, 77, .045);
    --auth-success: #176345;
    --auth-success-bg: #edf9f3;
    --auth-success-line: #c6e8d6;
    --auth-danger: #a42636;
    --auth-danger-bg: #fff3f4;
    --auth-danger-line: #f2cdd2;
}
html[data-theme="dark"] {
    --auth-blue: #92c0ff;
    --auth-ink: #e6edf8;
    --auth-muted: #b0bed1;
    --auth-placeholder: #99abc3;
    --auth-line: #35465e;
    --auth-page: #101b2c;
    --auth-card: #172438;
    --auth-soft: #213854;
    --auth-input: #1b2b42;
    --auth-focus: rgba(105, 169, 255, .22);
    --auth-brand-background: linear-gradient(150deg, #102440 0%, #183c69 100%);
    --auth-brand-line: #526f95;
    --auth-brand-text: #c4d4e9;
    --auth-shadow: 0 8px 30px rgba(0, 0, 0, .10);
    --auth-success: #8ad9b9;
    --auth-success-bg: #17392e;
    --auth-success-line: #34664f;
    --auth-danger: #ffadb8;
    --auth-danger-bg: #3e2733;
    --auth-danger-line: #754552;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--auth-page); color: var(--auth-ink); font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: var(--auth-blue); }
a:focus-visible, button:focus-visible, .checkbox input:focus-visible { outline: 3px solid #6fabff; outline-offset: 4px; }
.auth-page { display: grid; grid-template-columns: minmax(350px, 42%) minmax(0, 58%); min-height: 100vh; min-height: 100dvh; }
.auth-banner { display: flex; align-items: center; min-height: 100vh; padding: 56px clamp(36px, 5vw, 80px); background: var(--auth-brand-background); color: #fff; }
.auth-brand { width: 100%; max-width: 440px; margin-inline: auto; }
.auth-brand-link { display: inline-flex; align-items: center; gap: 24px; text-decoration: none; color: #fff; }
.auth-logo { display: block; width: 152px; height: 78px; object-fit: contain; }
.auth-product-name { display: inline-block; padding-left: 24px; border-left: 1px solid var(--auth-brand-line); color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .15em; }
.auth-brand-copy { margin-top: 40px; }
.auth-brand h2 { max-width: 440px; margin: 0 0 20px; color: #fff; font-size: clamp(34px, 3.15vw, 45px); line-height: 1.15; letter-spacing: -1.15px; font-weight: 650; }
.auth-brand p { max-width: 410px; margin: 0; color: var(--auth-brand-text); font-size: 17px; line-height: 1.7; }
.auth-form-area { position: relative; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 92px 40px 60px; }
.auth-tools { position: absolute; top: 24px; right: 32px; }
.auth-theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--auth-line); border-radius: 10px; background: var(--auth-card); color: var(--auth-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.auth-theme-toggle:hover { color: var(--auth-blue); border-color: var(--auth-blue); }
.auth-card { width: min(100%, 476px); padding: 36px; border: 1px solid var(--auth-line); border-radius: 16px; background: var(--auth-card); box-shadow: var(--auth-shadow); }
.auth-register-page .auth-card { width: min(100%, 556px); }
.auth-eyebrow { display: block; margin-bottom: 9px; color: var(--auth-blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.6; text-transform: uppercase; }
.auth-card h1 { margin: 0 0 12px; color: var(--auth-ink); font-size: 29px; line-height: 1.25; letter-spacing: -.7px; font-weight: 650; }
.subtitle { margin: 0 0 28px; color: var(--auth-muted); font-size: 15px; line-height: 1.65; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { min-width: 0; margin-bottom: 20px; }
.form-group > label { display: block; margin-bottom: 8px; color: var(--auth-ink); font-size: 14px; font-weight: 600; }
.input-wrapper { position: relative; }
.input-wrapper > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--auth-placeholder); font-size: 15px; pointer-events: none; }
.input-wrapper input { display: block; width: 100%; min-width: 0; height: 48px; padding: 0 44px; border: 1px solid var(--auth-line); border-radius: 9px; outline: none; background: var(--auth-input); color: var(--auth-ink); font-size: 15px; transition: border-color .16s ease, box-shadow .16s ease; }
.input-wrapper input::placeholder { color: var(--auth-placeholder); opacity: 1; }
.input-wrapper input:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 4px var(--auth-focus); }
.input-wrapper input.input-error { border-color: var(--auth-danger); }
.toggle-password { position: absolute; display: grid; place-items: center; right: 4px; top: 4px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--auth-muted); cursor: pointer; }
.toggle-password:hover { background: var(--auth-soft); color: var(--auth-blue); }
.field-error { display: block; margin-top: 6px; color: var(--auth-danger); font-size: 13px; line-height: 1.5; }
.form-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.checkbox { display: inline-flex; align-items: center; gap: 9px; min-height: 28px; cursor: pointer; }
.checkbox input { appearance: none; display: grid; place-content: center; flex: 0 0 auto; width: 18px; height: 18px; margin: 0; border: 1px solid var(--auth-placeholder); border-radius: 4px; background: var(--auth-input); cursor: pointer; }
.checkbox input:checked { border-color: var(--auth-button); background: var(--auth-button); }
.checkbox input:checked::before { content: ""; display: block; width: 9px; height: 5px; margin-top: -2px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.checkbox span { color: var(--auth-muted); font-size: 13px; }
.login-help-link { color: var(--auth-blue); font-size: 13px; font-weight: 600; text-decoration: none; }
.login-help-link:hover { text-decoration: underline; }
.btn-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 13px 18px; border: 1px solid transparent; border-radius: 9px; background: var(--auth-button); color: #fff; font-size: 15px; line-height: 1.4; font-weight: 600; cursor: pointer; transition: background .16s ease; }
.btn-submit:hover { background: var(--auth-button-hover); }
.auth-link { margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--auth-line); text-align: center; color: var(--auth-muted); font-size: 14px; }
.auth-link a { color: var(--auth-blue); font-weight: 600; text-decoration: none; white-space: nowrap; }
.auth-link a:hover { text-decoration: underline; }
.auth-back-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 28px; color: var(--auth-muted); text-decoration: none; font-size: 14px; }
.auth-back-link:hover { color: var(--auth-blue); }
.alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 22px; padding: 13px 14px; border: 1px solid; border-radius: 10px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.alert > i { margin-top: 4px; flex: 0 0 auto; }
.alert-success { color: var(--auth-success); background: var(--auth-success-bg); border-color: var(--auth-success-line); }
.alert-error { color: var(--auth-danger); background: var(--auth-danger-bg); border-color: var(--auth-danger-line); }
.alert-error-item { display: block; margin-top: 3px; }
.auth-info-box { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 24px; padding: 14px; border: 1px solid var(--auth-line); border-radius: 10px; background: var(--auth-soft); }
.auth-info-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px; background: var(--auth-card); color: var(--auth-blue); }
.auth-info-box strong, .auth-info-box small { display: block; }
.auth-info-box strong { margin-bottom: 4px; color: var(--auth-ink); font-size: 14px; font-weight: 600; }
.auth-info-box small { color: var(--auth-muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 1150px) {
    .auth-page { grid-template-columns: minmax(340px, 40%) minmax(0, 60%); }
    .auth-banner { padding-inline: 34px; }
    .auth-form-area { padding-inline: 28px; }
    .auth-card { padding: 30px; }
    .auth-brand h2 { font-size: 37px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 860px) {
    .auth-page { display: block; }
    .auth-banner { min-height: auto; padding: 20px 28px; }
    .auth-brand { max-width: 550px; }
    .auth-logo { width: 120px; height: 62px; }
    .auth-product-name { padding-left: 18px; font-size: 14px; }
    .auth-brand-link { gap: 18px; }
    .auth-brand-copy { display: none; }
    .auth-form-area { min-height: auto; padding: 72px 24px 40px; }
    .auth-tools { top: 16px; right: 24px; }
    .auth-card, .auth-register-page .auth-card { width: min(100%, 550px); }
    .form-row { grid-template-columns: 1fr 1fr; gap: 14px; }
}
@media (max-width: 480px) {
    .auth-banner { padding: 16px 22px; }
    .auth-form-area { padding: 68px 16px 28px; }
    .auth-tools { top: 14px; right: 16px; }
    .auth-card { padding: 24px 20px; border-radius: 14px; }
    .auth-card h1 { font-size: 26px; }
    .input-wrapper input { font-size: 16px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .auth-info-box { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .input-wrapper input, .btn-submit { transition: none; }
}
