/* ════════════════════════════════════════════════════════════════════════════════════════════════
   Power ERP · tela de login com a identidade visual da Power Tuning (powertuning.com.br)
   Paleta do site institucional: navy #191F70, azul de marca #1E2EB8 / #2A3CC0 / #4D5FE0, destaque amarelo #D9B81C.
   Dois temas, como o site: claro (padrão) e escuro (`data-bs-theme="dark"`, mesma preferência do app).
   ════════════════════════════════════════════════════════════════════════════════════════════════ */

:root {
    --pt-navy: #191F70;
    --pt-primary: #1E2EB8;
    --pt-primary-hover: #16229A;
    --pt-brand: #2A3CC0;
    --pt-brand-light: #4D5FE0;
    --pt-accent: #D9B81C;
    --pt-accent-hover: #CC9A1A;
    --pt-success: #10B981;

    --pt-bg: #FFFFFF;
    --pt-bg-2: #F4F7FD;
    --pt-bg-3: #ECF1FA;
    --pt-card: #FFFFFF;
    --pt-border: #E4E8F0;
    --pt-border-2: #D1D9E4;
    --pt-text: #0A0E1F;
    --pt-text-2: #1F2937;
    --pt-text-3: #475569;
    --pt-muted: #64748B;
    --pt-shadow: 0 24px 64px rgba(10, 14, 31, .12), 0 2px 6px rgba(10, 14, 31, .05);
    --pt-shadow-brand: 0 10px 30px rgba(30, 46, 184, .30);

    /* Painel de apresentação: sempre escuro, como o hero do site. */
    --pt-hero-bg: linear-gradient(150deg, #10165A 0%, #191F70 38%, #1E2EB8 100%);
    --pt-hero-text: #F8FAFF;
    --pt-hero-text-2: rgba(232, 237, 255, .82);
    --pt-hero-muted: rgba(214, 222, 255, .62);
    --pt-hero-card: rgba(255, 255, 255, .07);
    --pt-hero-card-hover: rgba(255, 255, 255, .11);
    --pt-hero-border: rgba(255, 255, 255, .13);

    --pt-alert-bg: #FFF7E6;
    --pt-alert-text: #7A4B00;
    --pt-alert-border: #F5C98A;

    --pt-radius: 12px;
    --pt-radius-lg: 18px;
    --pt-radius-xl: 28px;
    --pt-transition: .25s cubic-bezier(.4, 0, .2, 1);
}

[data-bs-theme="dark"] {
    --pt-primary: #5D6FE5;
    --pt-primary-hover: #4D5FE0;

    --pt-bg: #060B1C;
    --pt-bg-2: #0B1227;
    --pt-bg-3: #101930;
    --pt-card: #0C1428;
    --pt-border: #162040;
    --pt-border-2: #1E2D56;
    --pt-text: #F1F5F9;
    --pt-text-2: #E2E8F0;
    --pt-text-3: #CBD5E1;
    --pt-muted: #94A3B8;
    --pt-shadow: 0 24px 64px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .04);
    --pt-shadow-brand: 0 10px 30px rgba(42, 60, 192, .40);

    --pt-hero-bg: radial-gradient(120% 80% at 0% 0%, rgba(42, 60, 192, .32) 0%, transparent 55%),
                  linear-gradient(160deg, #0B1227 0%, #060B1C 70%);
    --pt-hero-card: rgba(93, 111, 229, .07);
    --pt-hero-card-hover: rgba(93, 111, 229, .12);
    --pt-hero-border: rgba(77, 95, 224, .22);

    --pt-alert-bg: rgba(217, 184, 28, .10);
    --pt-alert-text: #F5DE7A;
    --pt-alert-border: rgba(217, 184, 28, .35);
}

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

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--pt-bg);
    color: var(--pt-text);
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--pt-transition), color var(--pt-transition);
}

/* ── Layout ─────────────────────────────────────────────────────────────────────────────────────── */
.pt-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}

/* ── Alternar tema ──────────────────────────────────────────────────────────────────────────────── */
.pt-theme-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--pt-border);
    background: var(--pt-card);
    color: var(--pt-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(10, 14, 31, .08);
    transition: transform var(--pt-transition), background-color var(--pt-transition), color var(--pt-transition);
}

.pt-theme-toggle:hover {
    transform: translateY(-1px);
}

.pt-theme-toggle:focus-visible {
    outline: 3px solid var(--pt-brand-light);
    outline-offset: 2px;
}

.pt-theme-icon--dark {
    display: none;
}

[data-bs-theme="dark"] .pt-theme-toggle {
    color: var(--pt-accent);
}

[data-bs-theme="dark"] .pt-theme-icon--light {
    display: none;
}

[data-bs-theme="dark"] .pt-theme-icon--dark {
    display: inline;
}

/* ── Painel de apresentação ─────────────────────────────────────────────────────────────────────── */
.pt-hero {
    position: relative;
    overflow: hidden;
    background: var(--pt-hero-bg);
    color: var(--pt-hero-text);
    padding: 44px 56px 36px;
    display: flex;
}

.pt-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pt-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.pt-hero-glow--blue {
    width: 520px;
    height: 520px;
    top: -180px;
    right: -140px;
    background: rgba(77, 95, 224, .45);
}

.pt-hero-glow--gold {
    width: 360px;
    height: 360px;
    bottom: -160px;
    left: -120px;
    background: rgba(217, 184, 28, .22);
}

.pt-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 20%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 0%, transparent 70%);
    pointer-events: none;
}

.pt-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pt-brand-logo {
    height: 44px;
    width: auto;
}

.pt-brand-product {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(217, 184, 28, .14);
    border: 1px solid rgba(217, 184, 28, .45);
    color: #F5DE7A;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .02em;
}

.pt-eyebrow {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    margin: 6px 0 0;
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid var(--pt-hero-border);
    background: rgba(255, 255, 255, .06);
    color: var(--pt-hero-text-2);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.pt-hero-title {
    margin: 0;
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -.02em;
}

.pt-highlight {
    color: var(--pt-accent);
}

.pt-hero-desc {
    margin: 0;
    max-width: 620px;
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--pt-hero-text-2);
}

.pt-modules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pt-modules li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 100px;
    background: var(--pt-hero-card);
    border: 1px solid var(--pt-hero-border);
    font-size: .82rem;
    font-weight: 600;
    color: var(--pt-hero-text);
}

.pt-modules li i {
    color: var(--pt-accent);
}

.pt-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.pt-section-title {
    margin: 0;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pt-hero-muted);
}

.pt-services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pt-service {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: var(--pt-radius);
    background: var(--pt-hero-card);
    border: 1px solid var(--pt-hero-border);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background-color var(--pt-transition), transform var(--pt-transition);
}

.pt-service:hover {
    background: var(--pt-hero-card-hover);
    transform: translateY(-2px);
}

.pt-service-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .1);
    color: #FFFFFF;
    font-size: 1.05rem;
}

.pt-service h3 {
    margin: 0 0 4px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--pt-hero-text);
}

.pt-service p {
    margin: 0;
    font-size: .77rem;
    line-height: 1.45;
    color: var(--pt-hero-text-2);
}

.pt-products {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pt-product {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 13px;
    border-radius: var(--pt-radius);
    border: 1px solid var(--pt-hero-border);
    border-left: 3px solid var(--pt-accent);
    background: var(--pt-hero-card);
}

.pt-product strong {
    font-size: .86rem;
    font-weight: 700;
    color: var(--pt-hero-text);
}

.pt-product span {
    font-size: .74rem;
    line-height: 1.4;
    color: var(--pt-hero-text-2);
}

.pt-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 8px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--pt-hero-border);
}

.pt-stats div {
    min-width: 0;
}

.pt-stats dt {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #FFFFFF;
}

.pt-stats dd {
    margin: 2px 0 0;
    font-size: .74rem;
    color: var(--pt-hero-muted);
}

.pt-hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    font-size: .76rem;
    color: var(--pt-hero-muted);
}

.pt-partner {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pt-partner i {
    color: var(--pt-accent);
}

.pt-site-link {
    color: var(--pt-hero-text-2);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pt-site-link:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* ── Painel de acesso ───────────────────────────────────────────────────────────────────────────── */
.pt-access {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 72px 40px 32px;
    background:
        radial-gradient(ellipse at top, rgba(42, 60, 192, .08) 0%, transparent 60%),
        var(--pt-bg-2);
    transition: background-color var(--pt-transition);
}

.pt-card {
    width: 100%;
    max-width: 420px;
    padding: 34px 32px 30px;
    border-radius: var(--pt-radius-lg);
    background: var(--pt-card);
    border: 1px solid var(--pt-border);
    box-shadow: var(--pt-shadow);
    color: var(--pt-text);
    animation: pt-rise .45s cubic-bezier(.4, 0, .2, 1) both;
}

[data-bs-theme="dark"] .pt-card {
    border-color: var(--pt-border-2);
    box-shadow: var(--pt-shadow), 0 0 0 1px rgba(77, 95, 224, .10), 0 0 60px rgba(42, 60, 192, .12);
}

.pt-card-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.pt-card-logo {
    height: 46px;
    width: auto;
}

.pt-card-logo--dark {
    display: none;
}

[data-bs-theme="dark"] .pt-card-logo--light {
    display: none;
}

[data-bs-theme="dark"] .pt-card-logo--dark {
    display: block;
}

.pt-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 100px;
    background: var(--pt-bg-3);
    color: var(--pt-text-3);
    border: 1px solid var(--pt-border);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pt-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pt-success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .6);
    animation: pt-pulse 2.8s ease infinite;
}

.pt-card-title {
    margin: 14px 0 6px;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--pt-text);
}

.pt-card-sub {
    margin: 0 0 22px;
    font-size: .88rem;
    line-height: 1.55;
    color: var(--pt-text-3);
}

.pt-alert {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin: 0 0 16px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: .82rem;
    line-height: 1.4;
    background: var(--pt-alert-bg);
    color: var(--pt-alert-text);
    border: 1px solid var(--pt-alert-border);
}

.pt-ms-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 100px;
    background: var(--pt-navy);
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: .95rem;
    box-shadow: var(--pt-shadow-brand);
    transition: background-color var(--pt-transition), transform var(--pt-transition), box-shadow var(--pt-transition);
}

.pt-ms-btn:hover {
    background: var(--pt-primary);
    transform: translateY(-1px);
}

.pt-ms-btn:focus-visible {
    outline: 3px solid var(--pt-accent);
    outline-offset: 3px;
}

[data-bs-theme="dark"] .pt-ms-btn {
    background: var(--pt-brand);
}

[data-bs-theme="dark"] .pt-ms-btn:hover {
    background: var(--pt-brand-light);
}

.pt-ms-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #FFFFFF;
    flex-shrink: 0;
}

.pt-ms-label {
    flex: 1;
}

.pt-ms-arrow {
    transition: transform var(--pt-transition);
}

.pt-ms-btn:hover .pt-ms-arrow {
    transform: translateX(3px);
}

.pt-signin-notes {
    list-style: none;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--pt-border);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.pt-signin-notes li {
    display: flex;
    gap: 9px;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--pt-muted);
}

.pt-signin-notes i {
    color: var(--pt-primary);
    margin-top: 1px;
}

.pt-access-footer {
    margin: 0;
    font-size: .74rem;
    color: var(--pt-muted);
    text-align: center;
}

/* ── Animações ──────────────────────────────────────────────────────────────────────────────────── */
@keyframes pt-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pt-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); }
    70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ── Responsivo ─────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .pt-services,
    .pt-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .pt-page {
        grid-template-columns: 1fr;
    }

    /* Small screens keep the sign-in action visible without a second marketing page below it. */
    .pt-access {
        order: 1;
        min-height: auto;
        padding: 52px 16px 20px;
    }

    .pt-hero {
        display: none;
    }

    .pt-hero-title {
        font-size: 1.7rem;
    }

    .pt-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
    }
}

/* Fit the presentation to the browser's usable height, including desktop browser chrome. */
@media (min-width: 992px) and (max-height: 1100px) {
    .pt-hero { padding: 24px 32px; }
    .pt-hero-inner { gap: 12px; }
    .pt-hero-title { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
    .pt-hero-desc { font-size: .9rem; line-height: 1.45; }
    .pt-service { padding: 10px; gap: 8px; }
    .pt-services { gap: 8px; }
    .pt-section { gap: 8px; }
    .pt-product { padding: 8px 10px; }
    .pt-stats { padding-top: 10px; }
}

@media (min-width: 992px) and (max-height: 950px) {
    .pt-section:has(.pt-products),
    .pt-stats { display: none; }
}

@media (min-width: 992px) and (max-height: 650px) {
    .pt-section,
    .pt-modules,
    .pt-hero-footer { display: none; }
}

@media (max-height: 600px) {
    .pt-access-footer { display: none; }
    .pt-access { padding: 12px 16px; gap: 12px; }
    .pt-access .pt-card { padding: 20px; }
    .pt-card-brand { margin-bottom: 10px; }
    .pt-card-logo { height: 32px; }
    .pt-card-title { font-size: 1.25rem; margin-top: 10px; }
    .pt-card-sub { margin-bottom: 12px; }
    .pt-signin-notes { margin-top: 12px; padding-top: 10px; }
}

@media (max-height: 540px) {
    .pt-signin-notes { display: none; }
}

@media (max-height: 430px) {
    .pt-page { grid-template-columns: 1fr; }
    .pt-hero,
    .pt-signin-notes,
    .pt-access-footer { display: none; }
    .pt-access { padding: 8px 56px; }
    .pt-access .pt-card { padding: 14px 20px; }
    .pt-theme-toggle { top: 8px; right: 8px; width: 36px; height: 36px; }
}

@media (max-height: 280px) {
    .pt-card-brand,
    .pt-card-chip,
    .pt-card-title,
    .pt-card-sub { display: none; }
    .pt-card-title { margin-top: 0; }
    .pt-alert { padding: 6px; margin-bottom: 8px; }
    .pt-ms-btn { padding: 10px 14px; }
}

@media (max-width: 575.98px) {
    .pt-services,
    .pt-products {
        grid-template-columns: 1fr;
    }

    .pt-card {
        padding: 26px 20px 22px;
    }

    .pt-brand-logo {
        height: 36px;
    }
}
