/* Telas públicas — login e seleção de ambiente */
:root {
    --pulse-orange: #ff6a00;
    --pulse-orange-dark: #e55b00;
    --pulse-bg: #1f2329;
    --pulse-bg-deep: #12151a;
    --pulse-surface: #1a1e24;
    --pulse-elevated: #232830;
    --pulse-text: #e8eaed;
    --pulse-muted: #9aa3af;
    --pulse-line: rgba(255, 255, 255, 0.08);
    --pulse-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    color-scheme: dark;
}

body.pc-guest {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--pulse-text);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    background: var(--pulse-bg);
}

.pulse-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
}

@media (min-width: 980px) {
    .pulse-shell {
        grid-template-columns: minmax(22rem, 0.92fr) minmax(26rem, 1.08fr);
    }

    .pulse-shell--login,
    .pulse-shell--picker {
        grid-template-columns: minmax(28rem, 1.28fr) minmax(22rem, 0.72fr);
    }
}

.pulse-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background:
        radial-gradient(48rem 26rem at -12% -18%, rgba(255, 106, 0, 0.26), transparent 58%),
        radial-gradient(32rem 20rem at 112% 118%, rgba(229, 91, 0, 0.14), transparent 56%),
        linear-gradient(165deg, #161a1f 0%, #101318 48%, #0c0e12 100%);
    border-right: 1px solid var(--pulse-line);
}

.pulse-brand::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #ff6a00, #e55b00, #ffb27a, #ff6a00);
    background-size: 220% 100%;
    animation: pulse-bar 5s linear infinite;
}

.pulse-brand-aura {
    position: absolute;
    width: min(34rem, 80%);
    height: min(34rem, 80%);
    right: -8rem;
    top: 18%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 106, 0, 0.16), transparent 68%);
    filter: blur(8px);
    pointer-events: none;
}

.pulse-brand-orb {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 106, 0, 0.16);
    pointer-events: none;
    animation: pulse-orb 18s ease-in-out infinite;
}

.pulse-brand-orb--a { width: 11rem; height: 11rem; right: 12%; top: 22%; }
.pulse-brand-orb--b { width: 5.5rem; height: 5.5rem; left: 12%; top: 16%; animation-delay: -6s; }
.pulse-brand-orb--c { width: 16rem; height: 16rem; left: 22%; bottom: 6%; animation-delay: -11s; }

.pulse-brand-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.25rem;
    max-width: 34rem;
}

.pulse-shell--login .pulse-brand,
.pulse-shell--picker .pulse-brand {
    padding: clamp(2rem, 4.2vw, 3.4rem) clamp(2rem, 4.5vw, 3.6rem);
}

.pulse-shell--login .pulse-brand-layout,
.pulse-shell--picker .pulse-brand-layout {
    max-width: none;
    width: 100%;
    gap: 2.6rem;
}

.pulse-brand-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.pulse-brand-logo {
    display: block;
    width: min(240px, 72vw);
    height: auto;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.4));
}

.pulse-shell--login .pulse-brand-logo,
.pulse-shell--picker .pulse-brand-logo {
    width: min(320px, 100%);
}

.pulse-brand-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 106, 0, 0.32);
    background: rgba(255, 106, 0, 0.1);
    color: #ffb27a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pulse-brand-hero {
    max-width: 38rem;
}

.pulse-shell--login .pulse-brand-hero,
.pulse-shell--picker .pulse-brand-hero {
    max-width: min(100%, 44rem);
}

.pulse-brand-product {
    margin: 0 0 0.7rem;
    color: #ffb27a;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pulse-brand-hero h1 {
    margin: 0 0 0.85rem;
    color: #fff;
    font-size: clamp(1.7rem, 3.4vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.pulse-shell--login .pulse-brand-hero h1,
.pulse-shell--picker .pulse-brand-hero h1 {
    max-width: none;
    font-size: clamp(2.35rem, 4.6vw, 3.7rem);
}

.pulse-brand-hero p {
    margin: 0;
    max-width: 42ch;
    color: rgba(229, 231, 235, 0.78);
    font-size: 1rem;
    line-height: 1.65;
}

.pulse-shell--login .pulse-brand-hero p,
.pulse-shell--picker .pulse-brand-hero p {
    max-width: 52ch;
    font-size: 1.12rem;
}

.pulse-brand-points {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pulse-shell--login .pulse-brand-points,
.pulse-shell--picker .pulse-brand-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    max-width: none;
}

.pulse-brand-point {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(10px);
    transition: transform 0.2s var(--pulse-ease), border-color 0.2s ease, background 0.2s ease;
}

.pulse-brand-point:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 106, 0, 0.35);
    background: rgba(255, 106, 0, 0.08);
}

.pulse-shell--login .pulse-brand-point,
.pulse-shell--picker .pulse-brand-point {
    flex-direction: column;
    min-height: 9.75rem;
    padding: 1.05rem 1rem 1.1rem;
}

.pulse-brand-point i {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    flex: none;
    border-radius: 0.65rem;
    background: rgba(255, 106, 0, 0.12);
    color: var(--pulse-orange);
    font-size: 0.85rem;
}

.pulse-brand-point strong,
.pulse-brand-point span {
    display: block;
}

.pulse-brand-point strong {
    color: #f8fafc;
    font-size: 0.9rem;
}

.pulse-brand-point span span {
    margin-top: 0.18rem;
    color: var(--pulse-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.pulse-brand-footer {
    position: relative;
    z-index: 1;
    margin: 0;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(156, 163, 175, 0.85);
    font-size: 0.78rem;
}

.pulse-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background:
        radial-gradient(28rem 18rem at 88% -10%, rgba(255, 106, 0, 0.1), transparent 58%),
        linear-gradient(180deg, #242930 0%, var(--pulse-bg) 48%, #181c21 100%);
}

.pulse-main--auth {
    background:
        radial-gradient(22rem 16rem at 50% 0%, rgba(255, 106, 0, 0.08), transparent 55%),
        #1c2026;
}

.login-card {
    width: 100%;
    max-width: 26.5rem;
    position: relative;
    overflow: hidden;
    padding: 1.85rem 1.7rem 1.55rem;
    border-radius: 1.15rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
        var(--pulse-surface);
    border: 1px solid var(--pulse-line);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    animation: login-rise 0.5s var(--pulse-ease) both;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #ff6a00, #e55b00, #ff6a00);
}

.login-card--picker {
    max-width: 22.5rem;
    padding: 1.55rem 1.45rem 1.35rem;
}

.login-card--picker .login-card-lead {
    max-width: none;
}

.login-card--picker .pulse-userchip {
    margin-top: 0.9rem;
    padding: 0.65rem 0.7rem;
    border-radius: 0.8rem;
    border: 1px solid var(--pulse-line);
    background: rgba(255, 255, 255, 0.03);
}

.login-card--picker .pulse-pick-units {
    grid-template-columns: 1fr;
}

.login-card--picker .pulse-pick-list {
    max-height: min(36vh, 16.5rem);
}

.login-card--picker .pulse-pick-group {
    padding: 0.75rem 0.8rem 0.85rem;
}

.login-card--picker .pulse-pick-unit {
    min-height: 3.1rem;
    padding: 0.55rem 0.7rem;
}

.login-card--auth {
    max-width: 22.5rem;
    padding: 1.55rem 1.45rem 1.35rem;
}

.login-head {
    margin-bottom: 1.15rem;
}

.login-head-logo {
    display: block;
    height: 2.1rem;
    width: auto;
    margin-bottom: 0.9rem;
}

.login-card-kicker {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: #ffb27a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-card h2 {
    margin: 0;
    color: #fff;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.login-card--auth h2 {
    font-size: 1.18rem;
}

.login-card-lead {
    margin: 0.5rem 0 0;
    max-width: 34ch;
    color: var(--pulse-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.login-form {
    display: grid;
    gap: 0.85rem;
}

.login-field {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.login-field > span:first-child {
    color: #d1d5db;
    font-size: 0.82rem;
    font-weight: 600;
}

.login-control {
    position: relative;
    display: block;
}

.login-control > i {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pulse-orange);
    font-size: 0.82rem;
    pointer-events: none;
}

.login-control input {
    width: 100%;
    height: 2.7rem;
    padding: 0 2.6rem 0 2.55rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    background: rgba(8, 10, 13, 0.45);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-control input::placeholder {
    color: #6b7280;
}

.login-control:focus-within input,
.login-control input:focus {
    border-color: rgba(255, 106, 0, 0.7);
    background: rgba(8, 10, 13, 0.7);
    box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.14);
}

.login-pass-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: var(--pulse-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.login-pass-toggle:hover,
.login-pass-toggle:focus-visible {
    color: var(--pulse-orange);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.15rem 0 0.2rem;
    color: #c5ccd6;
    font-size: 0.86rem;
    cursor: pointer;
    user-select: none;
}

.login-remember input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--pulse-orange);
}

.login-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    margin: 0 0 1.15rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(248, 113, 113, 0.32);
    background: rgba(248, 113, 113, 0.1);
    color: #fecaca;
    font-size: 0.86rem;
    line-height: 1.45;
}

.login-alert i {
    margin-top: 0.15rem;
    color: #fca5a5;
}

.login-alert strong,
.login-alert span {
    display: block;
}

.login-alert strong {
    margin-bottom: 0.15rem;
    color: #fff;
}

.login-card--auth .pulse-action {
    margin-top: 0.15rem;
    min-height: 2.7rem;
}

.login-card--auth .pulse-trust {
    margin-top: 1.25rem;
}

.pulse-field-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pulse-orange);
    pointer-events: none;
}

.pulse-input {
    padding-left: 2.7rem;
}

.pulse-action {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 2.85rem;
    border: 0;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--pulse-orange), var(--pulse-orange-dark));
    padding: 0.85rem 1.2rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(255, 106, 0, 0.24);
    transition: transform 0.18s var(--pulse-ease), box-shadow 0.18s var(--pulse-ease), filter 0.18s ease;
}

.pulse-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(255, 106, 0, 0.32);
}

.pulse-action:active {
    transform: translateY(0) scale(0.99);
}

.pulse-secondary-action {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    border-radius: 0.85rem;
    border: 1px solid var(--pulse-line);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.75rem 1.2rem;
    color: #e5e7eb;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.pulse-secondary-action:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.alert-shake {
    animation: shake 0.5s ease-in-out;
}

.pulse-userchip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.pulse-userchip-avatar,
.pulse-company-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #ff8a2b, #ff6a00);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.pulse-userchip strong,
.pulse-userchip span {
    display: block;
}

.pulse-userchip strong {
    color: #fff;
    font-size: 0.92rem;
}

.pulse-userchip span {
    color: var(--pulse-muted);
    font-size: 0.75rem;
}

.pulse-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.pulse-stat {
    padding: 0.65rem 0.75rem;
    border-radius: 0.8rem;
    border: 1px solid var(--pulse-line);
    background: rgba(255, 255, 255, 0.03);
}

.pulse-stat span,
.pulse-stat strong {
    display: block;
}

.pulse-stat span {
    color: var(--pulse-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pulse-stat strong {
    margin-top: 0.15rem;
    color: #fff;
    font-size: 1.15rem;
}

.pulse-pick-list {
    display: grid;
    gap: 0.75rem;
    max-height: min(48vh, 28rem);
    overflow: auto;
    padding-right: 0.15rem;
}

.pulse-pick-group {
    margin: 0;
    padding: 0.95rem 1rem 1rem;
    border: 1px solid var(--pulse-line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.025);
}

.pulse-pick-group.is-current {
    border-color: rgba(255, 106, 0, 0.35);
    background: rgba(255, 106, 0, 0.05);
}

.pulse-pick-legend {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pulse-pick-legend h3 {
    margin: 0;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
}

.pulse-pick-count {
    margin-left: auto;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--pulse-line);
    color: var(--pulse-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.pulse-pick-units {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 720px) {
    .pulse-pick-units {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.pulse-pick-unit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(15, 18, 22, 0.55);
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s var(--pulse-ease);
}

.pulse-pick-unit:hover {
    border-color: rgba(255, 106, 0, 0.45);
    background: rgba(255, 106, 0, 0.08);
    transform: translateY(-1px);
}

.pulse-pick-unit:has(:checked) {
    border-color: var(--pulse-orange);
    background: rgba(255, 106, 0, 0.12);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
}

.pulse-pick-unit input {
    accent-color: var(--pulse-orange);
    width: 1.05rem;
    height: 1.05rem;
    flex: none;
}

.pulse-pick-unit-copy {
    min-width: 0;
    flex: 1;
}

.pulse-pick-unit-copy small,
.pulse-pick-unit-copy strong {
    display: block;
}

.pulse-pick-unit-copy small {
    color: var(--pulse-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pulse-pick-unit-copy strong {
    margin-top: 0.12rem;
    color: #f3f4f6;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
}

.pulse-pick-now {
    margin-left: auto;
    color: #ffb27a;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pulse-trust {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.15rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--pulse-muted);
    font-size: 0.75rem;
}

.pulse-trust i {
    color: var(--pulse-orange);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pulse-actions {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.25rem;
}

@keyframes pulse-bar {
    to { background-position: 220% 0; }
}

@keyframes pulse-orb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
    50% { transform: translate(12px, -10px) scale(1.06); opacity: 0.85; }
}

@keyframes login-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@media (max-width: 979px) {
    .pulse-brand {
        padding: 1.25rem 1.15rem 1.1rem;
        border-right: 0;
        border-bottom: 1px solid var(--pulse-line);
    }

    .pulse-brand-layout {
        gap: 0.85rem;
        max-width: none;
    }

    .pulse-brand-logo {
        width: min(200px, 64vw);
    }

    .pulse-brand-hero h1 {
        font-size: 1.35rem;
    }

    .pulse-brand-hero p,
    .pulse-brand-points,
    .pulse-brand-footer,
    .pulse-brand-aura,
    .pulse-brand-orb {
        display: none;
    }

    .pulse-main {
        align-items: flex-start;
        padding: 1.15rem 0.9rem 1.6rem;
    }

    .login-card--picker {
        max-width: none;
    }
}

@media (max-width: 479px) {
    .pulse-brand-kicker {
        display: none;
    }

    .login-card {
        padding: 1.35rem 1.05rem 1.15rem;
    }

    .pulse-stats,
    .pulse-pick-units {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-brand::before,
    .pulse-brand-orb,
    .login-card,
    .alert-shake,
    .pulse-action,
    .pulse-pick-unit {
        animation: none;
        transition: none;
    }

    .pulse-action:hover,
    .pulse-pick-unit:hover,
    .login-pass-toggle:hover,
    .pulse-brand-point:hover {
        transform: none;
    }
}
