/* DB PDV — Login moderno isolado da interface interna */
body.auth-login-modern {
    --login-bg: #f8f3ed;
    --login-surface: rgba(255, 255, 255, .88);
    --login-surface-solid: #fffdfb;
    --login-text: #241914;
    --login-muted: #796b64;
    --login-line: rgba(67, 43, 32, .12);
    --login-line-strong: rgba(255, 101, 8, .28);
    --login-orange: #ff6508;
    --login-orange-dark: #e95400;
    --login-green: #17a865;
    --login-danger: #dc3545;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: var(--login-bg);
    color: var(--login-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-login-modern *,
body.auth-login-modern *::before,
body.auth-login-modern *::after { box-sizing: border-box; }

.auth-login-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.auth-login-grid {
    position: absolute;
    inset: 0;
    opacity: .42;
    background-image:
        linear-gradient(rgba(86, 60, 47, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(86, 60, 47, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 28%, transparent 76%);
    mask-image: radial-gradient(circle at 50% 42%, #000 28%, transparent 76%);
}

.auth-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    opacity: .72;
}

.auth-login-orb-one {
    width: 440px;
    height: 440px;
    left: -170px;
    top: 12%;
    background: radial-gradient(circle, rgba(255, 124, 40, .19), rgba(255, 124, 40, 0) 70%);
}

.auth-login-orb-two {
    width: 520px;
    height: 520px;
    right: -210px;
    top: 18%;
    background: radial-gradient(circle, rgba(167, 196, 151, .18), rgba(167, 196, 151, 0) 71%);
}

.auth-login-orb-three {
    width: 320px;
    height: 320px;
    left: 43%;
    bottom: -190px;
    background: radial-gradient(circle, rgba(255, 185, 126, .16), rgba(255, 185, 126, 0) 72%);
}

.auth-login-page {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 40px));
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(24px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 24px;
}

.auth-login-brand-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
}

.auth-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.auth-login-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #ff7928, var(--login-orange));
    box-shadow: 0 10px 22px rgba(255, 101, 8, .24), inset 0 1px rgba(255, 255, 255, .38);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth-login-brand-copy { display: grid; gap: 1px; }
.auth-login-brand-copy strong { font-size: 20px; line-height: 1.05; letter-spacing: -.03em; }
.auth-login-brand-copy small { color: var(--login-muted); font-size: 11.5px; }

.auth-login-online {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid rgba(23, 168, 101, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .56);
    box-shadow: 0 7px 18px rgba(62, 43, 34, .05);
    color: #3c5549;
    font-size: 11.5px;
    font-weight: 650;
}

.auth-login-online i,
.auth-login-trust-row i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--login-green);
    box-shadow: 0 0 0 4px rgba(23, 168, 101, .11);
}

.auth-login-stage {
    position: relative;
    min-height: 580px;
    display: grid;
    place-items: center;
    padding: 28px 0 36px;
}

.auth-login-card {
    position: relative;
    width: min(100%, 446px);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 28px;
    background: var(--login-surface);
    box-shadow:
        0 38px 80px rgba(66, 43, 32, .14),
        0 8px 24px rgba(66, 43, 32, .07),
        inset 0 0 0 1px rgba(89, 59, 44, .07);
    -webkit-backdrop-filter: blur(22px) saturate(115%);
    backdrop-filter: blur(22px) saturate(115%);
    isolation: isolate;
    animation: authLoginCardIn .48s ease-out both;
}

.auth-login-card::before,
.auth-login-card::after {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 12px -12px -12px 12px;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 28px;
    background: rgba(255, 255, 255, .34);
    box-shadow: 0 20px 46px rgba(73, 47, 35, .07);
    transform: rotate(.7deg);
}

.auth-login-card::after {
    inset: 22px -20px -20px 22px;
    opacity: .44;
    transform: rotate(1.2deg);
    z-index: -3;
}

.auth-login-card-glow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
}

.auth-login-card-glow::before {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    top: -130px;
    right: -95px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 101, 8, .14), transparent 70%);
}

.auth-login-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.auth-login-security-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 101, 8, .16);
    border-radius: 999px;
    background: rgba(255, 245, 237, .76);
    color: var(--login-orange-dark);
    font-size: 11px;
    font-weight: 750;
}

.auth-login-security-pill svg { width: 15px; height: 15px; }
.auth-login-product-label { color: #9b8c84; font-size: 9.5px; font-weight: 800; letter-spacing: .16em; }

.auth-login-heading { margin-bottom: 25px; }
.auth-login-heading-secondary { margin-top: 18px; }
.auth-login-kicker { display: block; margin-bottom: 7px; color: var(--login-orange); font-size: 11.5px; font-weight: 750; letter-spacing: .02em; }
.auth-login-heading h1 { margin: 0 0 8px; color: var(--login-text); font-size: clamp(28px, 4vw, 34px); line-height: 1.04; letter-spacing: -.045em; font-weight: 760; }
.auth-login-heading p { margin: 0; color: var(--login-muted); font-size: 13.5px; line-height: 1.55; }

.auth-login-form { display: grid; gap: 16px; }
.auth-login-field { display: grid; gap: 7px; margin: 0; }
.auth-login-field-label { color: #4a3c35; font-size: 12px; font-weight: 700; }
.auth-login-input-wrap { position: relative; display: flex; align-items: center; }
.auth-login-input-wrap > svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #9c8d85;
    pointer-events: none;
    transition: color .18s ease;
}

.auth-login-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 43px;
    border: 1px solid var(--login-line);
    border-radius: 14px;
    outline: none;
    background: rgba(255, 255, 255, .73);
    color: var(--login-text);
    box-shadow: inset 0 1px 2px rgba(66, 43, 32, .025);
    font: inherit;
    font-size: 13.5px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-login-input-wrap input::placeholder { color: #b0a39c; }
.auth-login-input-wrap:focus-within > svg { color: var(--login-orange); }
.auth-login-input-wrap:focus-within input {
    border-color: rgba(255, 101, 8, .5);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 101, 8, .09), 0 8px 20px rgba(255, 101, 8, .04);
}

.auth-login-password-toggle {
    position: absolute;
    right: 7px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8d7f78;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
.auth-login-password-toggle:hover { background: #f5ede7; color: var(--login-text); }
.auth-login-password-toggle svg { width: 18px; height: 18px; }
.auth-login-password-toggle .auth-eye-closed { display: none; }
.auth-login-password-toggle[aria-pressed="true"] .auth-eye-open { display: none; }
.auth-login-password-toggle[aria-pressed="true"] .auth-eye-closed { display: block; }

.auth-login-caps { display: none; color: #b4661f; font-size: 10.5px; font-weight: 650; }
.auth-login-caps.visible { display: block; }

.auth-login-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: -3px;
}

.auth-login-session-note { display: inline-flex; align-items: center; gap: 6px; color: #958780; font-size: 10.5px; }
.auth-login-session-note svg { width: 14px; height: 14px; }
.auth-login-forgot { color: var(--login-orange-dark); font-size: 11.5px; font-weight: 750; text-decoration: none; }
.auth-login-forgot:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-login-submit {
    position: relative;
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff7624, var(--login-orange));
    box-shadow: 0 14px 24px rgba(255, 101, 8, .24), inset 0 1px rgba(255, 255, 255, .35);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 780;
    cursor: pointer;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.auth-login-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, .22) 45%, transparent 72%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}
.auth-login-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 30px rgba(255, 101, 8, .29), inset 0 1px rgba(255, 255, 255, .35); }
.auth-login-submit:hover::before { transform: translateX(120%); }
.auth-login-submit:active { transform: translateY(0); }
.auth-login-submit:disabled { cursor: wait; filter: saturate(.72); }
.auth-login-submit svg { width: 18px; height: 18px; transition: transform .18s ease; }
.auth-login-submit:hover svg { transform: translateX(2px); }
.auth-login-submit.is-loading svg { animation: authLoginSpin .8s linear infinite; }

.auth-login-trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(67, 43, 32, .08);
    color: #94867f;
    font-size: 9.8px;
}
.auth-login-trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.auth-login-trust-row span + span::before { content: ""; width: 3px; height: 3px; margin-right: 4px; border-radius: 50%; background: #c8bbb4; }

.auth-login-alert {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: start;
    gap: 9px;
    margin-bottom: 18px;
    padding: 11px 12px;
    border: 1px solid;
    border-radius: 13px;
    font-size: 11.5px;
    line-height: 1.45;
}
.auth-login-alert span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; }
.auth-login-alert p { margin: 2px 0 0; }
.auth-login-alert-danger { border-color: rgba(220, 53, 69, .18); background: rgba(220, 53, 69, .065); color: #96323d; }
.auth-login-alert-danger span { background: rgba(220, 53, 69, .11); }
.auth-login-alert-success { border-color: rgba(23, 168, 101, .18); background: rgba(23, 168, 101, .065); color: #276e50; }
.auth-login-alert-success span { background: rgba(23, 168, 101, .11); }
.auth-login-alert-warning { border-color: rgba(198, 125, 21, .18); background: rgba(198, 125, 21, .065); color: #80591f; }
.auth-login-alert-warning span { background: rgba(198, 125, 21, .11); }

.auth-login-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #7d6e66;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
}
.auth-login-back svg { width: 16px; height: 16px; }
.auth-login-back:hover { color: var(--login-orange-dark); }

.auth-login-reset-box {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid rgba(255, 101, 8, .16);
    border-radius: 15px;
    background: rgba(255, 247, 241, .76);
}
.auth-login-reset-box > div:first-child { display: grid; gap: 2px; }
.auth-login-reset-box strong { font-size: 11.5px; }
.auth-login-reset-box small { color: var(--login-muted); font-size: 10px; line-height: 1.4; }
.auth-login-reset-box input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--login-line); border-radius: 10px; background: rgba(255,255,255,.72); color: #6d5e57; font-size: 10px; }
.auth-login-reset-actions { display: flex; gap: 8px; }
.auth-login-reset-actions button,
.auth-login-reset-actions a { flex: 1; min-height: 36px; display: grid; place-items: center; padding: 0 12px; border: 1px solid rgba(255,101,8,.18); border-radius: 10px; background: #fff; color: var(--login-orange-dark); font: inherit; font-size: 10.5px; font-weight: 750; text-decoration: none; cursor: pointer; }

.auth-login-float {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 196px;
    padding: 11px 13px;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 16px;
    background: rgba(255,255,255,.66);
    box-shadow: 0 18px 38px rgba(70, 47, 36, .09), inset 0 0 0 1px rgba(67,43,32,.04);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    animation: authLoginFloat 5.4s ease-in-out infinite;
}
.auth-login-float-security { left: calc(50% - 420px); top: 25%; }
.auth-login-float-device { right: calc(50% - 430px); bottom: 24%; animation-delay: -2.2s; }
.auth-login-float-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #fff5ed; color: var(--login-orange); }
.auth-login-float-icon svg { width: 19px; height: 19px; }
.auth-login-float > span:last-child { display: grid; gap: 2px; }
.auth-login-float strong { font-size: 10.5px; }
.auth-login-float small { color: #8f8078; font-size: 9.2px; }

.auth-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 28px;
    color: #95877f;
    font-size: 9.8px;
}
.auth-login-footer-dot { width: 3px; height: 3px; border-radius: 50%; background: #c6b8b0; }


@keyframes authLoginCardIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes authLoginFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
@keyframes authLoginSpin { to { transform: rotate(360deg); } }

@media (max-width: 920px) {
    .auth-login-float { display: none; }
}

@media (max-width: 620px) {
    body.auth-login-modern { background: #faf6f1; }
    .auth-login-page { width: min(100% - 24px, 480px); padding-top: max(16px, env(safe-area-inset-top)); gap: 14px; }
    .auth-login-brand-wrap { min-height: 46px; }
    .auth-login-brand-mark { width: 38px; height: 38px; border-radius: 12px; }
    .auth-login-brand-copy strong { font-size: 18px; }
    .auth-login-brand-copy small { display: none; }
    .auth-login-online { padding: 7px 9px; font-size: 10px; }
    .auth-login-stage { min-height: 0; padding: 16px 0 24px; align-items: start; }
    .auth-login-card { padding: 24px 20px; border-radius: 23px; }
    .auth-login-card::before { inset: 8px -7px -8px 7px; border-radius: 23px; }
    .auth-login-card::after { display: none; }
    .auth-login-card-head { margin-bottom: 22px; }
    .auth-login-heading { margin-bottom: 22px; }
    .auth-login-heading h1 { font-size: 29px; }
    .auth-login-input-wrap input { height: 49px; }
    .auth-login-trust-row { flex-wrap: wrap; row-gap: 6px; }
    .auth-login-footer { flex-wrap: wrap; line-height: 1.4; }
}

@media (max-width: 390px) {
    .auth-login-page { width: calc(100% - 18px); }
    .auth-login-card { padding: 22px 17px; }
    .auth-login-product-label { display: none; }
    .auth-login-form-row { align-items: flex-start; flex-direction: column; gap: 7px; }
    .auth-login-forgot { align-self: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-login-card,
    .auth-login-float,
    .auth-login-submit.is-loading svg { animation: none !important; }
    .auth-login-submit,
    .auth-login-submit::before,
    .auth-login-submit svg { transition: none !important; }
}

.auth-login-register-link {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid var(--login-line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--login-muted);
    font-size: 11px;
}
.auth-login-register-link a {
    color: var(--login-orange-dark);
    font-weight: 800;
    text-decoration: none;
}
.auth-login-register-link a:hover { text-decoration: underline; }
