/*
 * Site institucional VFATEC.
 * Mesma linguagem visual da landing do Roça Integrada (hero escuro com foto, kicker espaçado,
 * cards arredondados translúcidos, CTA em caixa escura), com a paleta do logo VFATEC:
 * preto, amarelo e o vermelho do "Sistemas".
 */
:root {
    --vfa-ink: #15130f;
    --vfa-ink-soft: #3b362d;
    --vfa-muted: rgba(21, 19, 15, 0.72);
    --vfa-yellow: #ffd60a;
    --vfa-yellow-deep: #f0c400;
    --vfa-red: #b3161e;
    --vfa-paper: #fcfbf8;
    --vfa-line: rgba(21, 19, 15, 0.09);
    --shadow-soft: 0 24px 60px rgba(21, 19, 15, 0.16);
    --shadow-card: 0 16px 35px rgba(21, 19, 15, 0.07);
    --font-sf: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sf);
    color: var(--vfa-ink);
    background: linear-gradient(180deg, #f2efe7 0%, #f8f6f0 45%, #fcfbf8 100%);
    overflow-x: hidden;
}

a { color: var(--vfa-ink); text-decoration: none; }
a:hover { color: var(--vfa-red); }

:focus-visible { outline: 3px solid var(--vfa-yellow); outline-offset: 2px; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--vfa-yellow);
    color: var(--vfa-ink);
    font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ===== Header ===== */
/* O logo tem letras pretas, então o header é sempre claro (o do Roça fica transparente sobre o hero). */
.site-header {
    background: rgba(252, 251, 248, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.35s ease, background-color 0.35s ease;
}

.site-header.is-scrolled {
    background: rgba(252, 251, 248, 0.96);
    box-shadow: 0 10px 30px rgba(21, 19, 15, 0.08);
}

.site-header .navbar { padding: 0.7rem 0; }

.site-brand { display: inline-flex; align-items: center; }

.site-brand-logo { height: 2.9rem; width: auto; display: block; }

.navbar-toggler {
    border: 0;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--vfa-ink);
    padding: 0.25rem 0.4rem;
}
.navbar-toggler:focus { box-shadow: none; }

.site-header .nav-link {
    color: var(--vfa-ink-soft);
    font-size: 0.97rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: 999px;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus { color: var(--vfa-ink); background: rgba(21, 19, 15, 0.05); }

.site-header .nav-link.active {
    color: var(--vfa-ink);
    font-weight: 700;
    box-shadow: inset 0 -3px 0 var(--vfa-yellow);
    border-radius: 0;
}

.btn-access {
    background: var(--vfa-ink);
    color: #fff;
    border-radius: 999px;
    padding: 0.6rem 1.35rem;
    font-weight: 700;
    border: 0;
}
.btn-access:hover,
.btn-access:focus { background: var(--vfa-red); color: #fff; }

/* Mesma pílula do .btn-access, contornada: divide a barra com ele sem disputar
   a atenção. O ícone some abaixo de 1200px, onde a barra fica apertada com os
   três itens de menu mais dois botões — o rótulo é que precisa sobrar. */
.btn-apps {
    background: transparent;
    color: var(--vfa-ink);
    border: 1.5px solid rgba(21, 19, 15, 0.22);
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
}
.btn-apps:hover,
.btn-apps:focus {
    background: var(--vfa-ink);
    border-color: var(--vfa-ink);
    color: #fff;
}
.btn-apps i { margin-right: 0.4rem; }

@media (max-width: 1199.98px) and (min-width: 992px) {
    .btn-apps i { display: none; }
    .btn-apps { padding: 0.6rem 1rem; }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 0.75rem;
        padding: 0.75rem;
        border-radius: 1.25rem;
        background: #fff;
        box-shadow: var(--shadow-card);
    }
    .site-header .nav-link.active { box-shadow: inset 3px 0 0 var(--vfa-yellow); }
    .btn-access { width: 100%; margin-top: 0.5rem; }
    .btn-apps { width: 100%; margin-top: 0.5rem; }
}

/* ===== Painel "Aplicações VFATEC" ===== */
/* A largura vai pela variável do Bootstrap, não por `width` nossa: a regra dele
   é mais específica e vencia a nossa, deixando o painel com 400px fixos. Em
   telas de 375px isso punha 25px do painel para fora da tela — o "Entrar"
   começava em -2px — e nada indicava que havia conteúdo cortado à esquerda. */
.apps-panel {
    --bs-offcanvas-width: min(25rem, 100%);
    background: var(--vfa-paper);
}

.apps-panel-header {
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--vfa-line);
}

.apps-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--vfa-ink);
}
.apps-panel-title i { color: var(--vfa-red); margin-right: 0.45rem; }

.apps-panel-body { padding: 1.35rem; }

.apps-intro {
    color: var(--vfa-muted);
    font-size: 0.94rem;
    margin-bottom: 1.1rem;
}

.apps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }

/* O cartão da lista é botão, não link: não leva a outra página, troca a tela
   do painel. Por isso reset de aparência em vez de herdar o estilo de botão. */
.app-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    text-align: left;
    padding: 1rem 1.1rem;
    border-radius: 1.1rem;
    background: #fff;
    border: 1px solid var(--vfa-line);
    box-shadow: var(--shadow-card);
    color: var(--vfa-ink);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.app-item:hover,
.app-item:focus-visible {
    border-color: var(--vfa-yellow-deep);
    transform: translateY(-1px);
}

.app-item-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    background: var(--vfa-yellow);
    font-size: 1.3rem;
}

/* min-width: 0 para o resumo poder truncar: sem isso o flex item se recusa a
   encolher e a seta é empurrada para fora do painel. */
.app-item-texto { display: flex; flex-direction: column; min-width: 0; }
.app-item-nome { font-weight: 700; font-size: 1rem; }
.app-item-resumo {
    font-size: 0.85rem;
    color: var(--vfa-muted);
    line-height: 1.35;
}
.app-item-seta { margin-left: auto; flex: 0 0 auto; color: var(--vfa-muted); }

.apps-back {
    background: none;
    border: 0;
    padding: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--vfa-muted);
}
.apps-back:hover, .apps-back:focus { color: var(--vfa-red); }
.apps-back i { margin-right: 0.3rem; }

.apps-login-titulo {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--vfa-ink);
}

.apps-campo { margin-bottom: 1rem; }
.apps-campo label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--vfa-ink-soft);
    margin-bottom: 0.35rem;
}
.apps-campo input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 0.8rem;
    border: 1px solid var(--vfa-line);
    background: #fff;
    color: var(--vfa-ink);
    font-size: 1rem;
}
.apps-campo input:focus {
    outline: 0;
    border-color: var(--vfa-ink);
    box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.35);
}

/* O botão do olho fica DENTRO do campo, então o input reserva o espaço dele no
   padding — sem isso a senha longa passa por baixo do ícone. */
.apps-senha { position: relative; }
.apps-senha input { padding-right: 3rem; }
.apps-senha-olho {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 0.5rem 0.6rem;
    color: var(--vfa-muted);
    font-size: 1.05rem;
}
.apps-senha-olho:hover, .apps-senha-olho:focus { color: var(--vfa-ink); }

.apps-erro {
    background: rgba(179, 22, 30, 0.08);
    border: 1px solid rgba(179, 22, 30, 0.25);
    color: var(--vfa-red);
    border-radius: 0.8rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.apps-entrar { width: 100%; }

/* ===== Tipografia de seção ===== */
.section-kicker {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--vfa-red);
}

.hero-content h1,
.page-hero h1,
.intro-section h2,
.collection-section h2,
.section-heading h2,
.section-title,
.restricted-box h2 {
    font-family: var(--font-sf);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 0.98;
}

.intro-section h2,
.collection-section h2,
.section-heading h2,
.section-title,
.restricted-box h2 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    margin: 0.8rem 0 1.4rem;
}

.lead-text,
.hero-lead,
.restricted-box p,
.footer-text {
    font-size: 1.07rem;
    line-height: 1.8;
}

.lead-text { color: var(--vfa-muted); }

.section-heading { max-width: 52rem; margin: 0 auto 3rem; }

.intro-section,
.collection-section,
.restricted-section { padding: 6.5rem 0; }

.section-compact { padding: 3.5rem 0; }

.collection-section { background: rgba(255, 255, 255, 0.55); border-block: 1px solid var(--vfa-line); }

.group-heading { margin-bottom: 1.5rem; }

/* ===== Hero ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(115deg, rgba(10, 9, 7, 0.9) 10%, rgba(10, 9, 7, 0.45) 70%),
        radial-gradient(circle at 85% 20%, rgba(255, 214, 10, 0.28), transparent 32%),
        url("https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
    overflow: hidden;
}

.hero-section .section-kicker,
.page-hero .section-kicker,
.restricted-box .section-kicker { color: var(--vfa-yellow); }

.hero-main { flex: 1; display: flex; align-items: center; }

.hero-content { padding: 6.5rem 0 2.5rem; max-width: 46rem; }

.hero-content h1 {
    font-size: clamp(2.8rem, 6.2vw, 5.4rem);
    margin: 1rem 0 1.4rem;
}

.hero-lead { color: rgba(255, 255, 255, 0.86); max-width: 42rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.hero-stats {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 9, 7, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-stats dl { margin: 0; }

.hero-stat { padding: 1.1rem 1rem; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.hero-stat:first-child { border-left: 0; }

.hero-stat dt {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.hero-stat dd { margin: 0.2rem 0 0; font-size: 1.7rem; font-weight: 700; color: #fff; }

@media (max-width: 767.98px) {
    .hero-content { padding: 7rem 0 2.5rem; }
    .hero-stat { padding: 0.9rem 0.75rem; }
    .hero-stat:nth-child(3) { border-left: 0; }
    .hero-stat dd { font-size: 1.25rem; }
}

/* Hero das páginas internas: mesma linguagem, mais baixo. */
.page-hero {
    color: #fff;
    padding: 10rem 0 5.5rem;
    background:
        linear-gradient(115deg, rgba(10, 9, 7, 0.94) 20%, rgba(10, 9, 7, 0.6)),
        radial-gradient(circle at 90% 10%, rgba(255, 214, 10, 0.3), transparent 35%),
        url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
}

.page-hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); margin: 0.9rem 0 1.2rem; max-width: 50rem; }

.page-hero--compact { padding-bottom: 4rem; }

.page-hero--full { min-height: 80vh; display: flex; align-items: center; }

.page-back {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}
.page-back:hover { color: var(--vfa-yellow); }

/* ===== Botões ===== */
.btn-brand {
    background: var(--vfa-yellow);
    color: var(--vfa-ink);
    border-radius: 999px;
    padding: 0.9rem 1.6rem;
    font-weight: 700;
    border: 0;
}
.btn-brand:hover,
.btn-brand:focus { background: var(--vfa-yellow-deep); color: var(--vfa-ink); }

.btn-brand--dark { background: var(--vfa-ink); color: #fff; }
.btn-brand--dark:hover,
.btn-brand--dark:focus { background: var(--vfa-red); color: #fff; }

.btn-outline-light { border-radius: 999px; padding: 0.9rem 1.6rem; font-weight: 600; }

/* ===== Cards ===== */
.benefit-card,
.module-card {
    display: block;
    height: 100%;
    padding: 1.85rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--vfa-line);
    box-shadow: var(--shadow-card);
    color: var(--vfa-ink);
}

.benefit-card .benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: 0.9rem;
    font-size: 1.45rem;
    background: var(--vfa-yellow);
    color: var(--vfa-ink);
}

.benefit-card h3,
.module-card h3 {
    font-family: var(--font-sf);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.benefit-card p,
.module-card p { margin: 0; color: var(--vfa-muted); line-height: 1.7; }

.benefit-card a { color: var(--vfa-ink); font-weight: 600; }
.benefit-card a:hover { color: var(--vfa-red); }

.benefit-card--compact { padding: 1.5rem; }
.benefit-card--compact h3 { font-size: 1.2rem; }

.module-card .module-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--vfa-red);
    margin-bottom: 0.75rem;
}
.module-card .module-kicker .bi { font-size: 1.05rem; letter-spacing: 0; color: var(--vfa-ink); }

.module-card .module-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.1rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--vfa-ink);
}

.module-card--link { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.module-card--link:hover,
.module-card--link:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(255, 214, 10, 0.9);
    box-shadow: 0 22px 45px rgba(21, 19, 15, 0.12);
    color: var(--vfa-ink);
}
.module-card--link:hover .module-more { color: var(--vfa-red); }
.module-card--link:hover .module-more .bi-arrow-right { transform: translateX(3px); }
.module-more .bi { transition: transform 0.2s ease; }

.product-card { position: relative; padding-top: 5.2rem; }
.product-card-icon { position: absolute; top: 1.6rem; left: 1.85rem; width: 52px; height: 52px; }
.product-card-icon--bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--vfa-ink);
    color: var(--vfa-yellow);
    font-size: 1.6rem;
}

/* Lista com marcador de check, usada no ERP e nas páginas de módulo. */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
    position: relative;
    padding: 0.55rem 0 0.55rem 2.1rem;
    font-size: 1.05rem;
    color: var(--vfa-ink-soft);
    border-bottom: 1px solid var(--vfa-line);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
    content: "\F26E"; /* bi-check */
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: var(--vfa-yellow);
    color: var(--vfa-ink);
}
.check-list--compact li { font-size: 0.97rem; padding-block: 0.4rem; }
.check-list--compact li::before { top: 0.45rem; }

.integra-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.integra-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--vfa-line);
    box-shadow: var(--shadow-card);
    font-weight: 600;
}
.integra-chip:hover { border-color: var(--vfa-yellow); color: var(--vfa-ink); }

.big-number {
    margin: 0;
    font-size: clamp(4.5rem, 12vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(180deg, var(--vfa-ink) 55%, var(--vfa-red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.big-number-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--vfa-red);
}

.contact-strong { font-size: 1.15rem; }

/* ===== CTA escuro ===== */
.restricted-box {
    padding: 4rem 2rem;
    border-radius: 2rem;
    color: #fff;
    background:
        linear-gradient(130deg, rgba(10, 9, 7, 0.95), rgba(40, 34, 24, 0.9)),
        url("https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}
/* O "risco" vermelho do logo, como assinatura da caixa. */
.restricted-box::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 60%;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 4px 4px 0 0;
    background: linear-gradient(90deg, transparent, var(--vfa-red), transparent);
}
.restricted-box p { color: rgba(255, 255, 255, 0.82); max-width: 40rem; margin: 0 auto; }

/* ===== Política (texto longo) ===== */
.legal-doc {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 1.5rem;
    background: #fff;
    border: 1px solid var(--vfa-line);
    box-shadow: var(--shadow-card);
    font-size: 1.03rem;
    line-height: 1.8;
    color: var(--vfa-ink-soft);
}
.legal-doc h2 { font-size: 1.3rem; font-weight: 700; color: var(--vfa-ink); margin: 2rem 0 0.6rem; }
.legal-doc ul { padding-left: 1.2rem; }
.legal-doc li { margin-bottom: 0.4rem; }
.legal-callout {
    margin: 1.5rem 0;
    padding: 1.1rem 1.3rem;
    border-radius: 1rem;
    background: rgba(255, 214, 10, 0.18);
    border-left: 4px solid var(--vfa-yellow);
    color: var(--vfa-ink);
}
.legal-foot { margin: 2.5rem 0 0; font-size: 0.9rem; color: var(--vfa-muted); }

@media (max-width: 575.98px) {
    .legal-doc { padding: 1.5rem; }
    .restricted-box { padding: 3rem 1.25rem; border-radius: 1.5rem; }
    .intro-section, .collection-section, .restricted-section { padding: 4.5rem 0; }
}

/* ===== Footer ===== */
.site-footer { padding: 3.5rem 0 3rem; border-top: 1px solid var(--vfa-line); background: #fff; }

.footer-logo { height: 3.2rem; width: auto; margin-bottom: 1rem; }

.footer-text { color: var(--vfa-muted); max-width: 22rem; font-size: 0.97rem; }

.footer-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--vfa-red);
    margin-bottom: 0.9rem;
}

.footer-list { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; line-height: 1.9; color: var(--vfa-ink-soft); }
.footer-list a { color: inherit; }
.footer-list a:hover { color: var(--vfa-red); }
.footer-list .bi { margin-right: 0.5rem; color: var(--vfa-ink); }

.footer-address { font-style: normal; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--vfa-line);
}
.footer-legal { margin: 0; font-size: 0.85rem; color: var(--vfa-muted); }
.footer-legal-link { font-size: 0.85rem; color: var(--vfa-muted); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* ===== Plataforma do Pedmobile (área logada) ===== */
/* Menu lateral fixo + conteúdo na área principal, no desenho do Roça
   Integrada, mas com os tokens da VFATEC — não os dele. */

.pf-body { background: var(--vfa-paper); margin: 0; }

.pf-shell { display: flex; min-height: 100vh; }

.pf-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 16rem;
    display: flex;
    flex-direction: column;
    background: var(--vfa-ink);
    color: rgba(255, 255, 255, 0.82);
    z-index: 1040;
}

.pf-sidebar-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* O logo tem letras pretas e o "@" vermelho sobre fundo escuro do menu. Inverter
   por CSS estragava o vermelho (virava ciano), então a marca vai nas cores reais
   sobre um chip claro arredondado — é o logo correto, legível no menu escuro. */
.pf-logo-chip {
    display: inline-flex; align-items: center;
    background: #fff; border-radius: 0.6rem;
    padding: 0.4rem 0.6rem;
}
.pf-logo { height: 2.1rem; width: auto; display: block; }

.pf-fechar, .pf-abrir {
    background: none; border: 0; padding: 0.3rem 0.45rem;
    color: inherit; font-size: 1.3rem; line-height: 1;
}
.pf-fechar { display: none; }

.pf-usuario { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.pf-usuario-nome { margin: 0; font-weight: 700; color: #fff; font-size: 0.97rem; }
.pf-usuario-empresa {
    margin: 0.15rem 0 0; font-size: 0.82rem; color: rgba(255,255,255,0.6);
    /* Razão social é longa e não cabe: cortar pelo fim mantém o começo, que
       é o que identifica a empresa. */
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* align-content:start é o que de fato aproxima as opções: a nav cresce (flex:1)
   para empurrar o "Sair" ao rodapé, e sem isto o grid espalhava os itens pela
   altura toda — o gap pequeno não adiantava. Agora eles ficam colados no topo,
   e o espaço que sobra vai para baixo, vazio. */
.pf-nav { padding: 0.5rem 0.5rem; display: grid; gap: 0.5rem; align-content: start; flex: 1 1 auto; }

.pf-nav-link {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.34rem 0.7rem; border-radius: 0.55rem;
    color: rgba(255,255,255,0.78); text-decoration: none;
    font-size: 0.82rem; font-weight: 500;
}
.pf-nav-link:hover, .pf-nav-link:focus-visible {
    background: rgba(255,255,255,0.08); color: #fff;
}
/* O item ativo usa o amarelo da marca como marcador lateral — a mesma
   linguagem do item ativo do site, que usa o amarelo embaixo. */
.pf-nav-link.is-active {
    background: rgba(255,255,255,0.1); color: #fff; font-weight: 700;
    box-shadow: inset 3px 0 0 var(--vfa-yellow);
}
.pf-nav-link i { font-size: 0.95rem; flex: 0 0 auto; }

.pf-sidebar-rodape {
    padding: 0.6rem 1.25rem 0.9rem; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-direction: column; gap: 0.1rem;
}
.pf-rodape-link, .pf-sair {
    display: flex; align-items: center; gap: 0.6rem;
    color: rgba(255,255,255,0.72); text-decoration: none; font-size: 0.9rem;
    padding: 0.5rem 0;
}
.pf-rodape-link i, .pf-sair i { font-size: 1.05rem; flex: 0 0 auto; }
.pf-rodape-link:hover, .pf-rodape-link:focus-visible,
.pf-sair:hover, .pf-sair:focus-visible { color: var(--vfa-yellow); }

.pf-principal { flex: 1 1 auto; margin-left: 16rem; min-width: 0; }

.pf-topo {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    /* Fundo OPACO de propósito: um backdrop-filter: blur() numa barra fixa
       obriga o navegador a re-renderizar o desfoque de tudo que rola atrás
       dela a cada repintura — inclusive ao trocar de aba — e era a causa da
       lentidão nos cliques. Sólido não tem esse custo e fica igual (já era 92%). */
    background: var(--vfa-paper, #fcfbf8);
    border-bottom: 1px solid var(--vfa-line);
}
.pf-abrir { display: none; color: var(--vfa-ink); }
.pf-titulo { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--vfa-ink); }

/* Vendedor vinculado ao usuário, no canto direito da barra superior. */
.pf-topo-vend {
    margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--vfa-ink-soft); font-size: 0.9rem; font-weight: 600;
    background: rgba(21,19,15,0.05); border-radius: 999px; padding: 0.3rem 0.8rem;
    max-width: 16rem;
}
.pf-topo-vend i { color: var(--vfa-red); font-size: 1rem; flex: 0 0 auto; }
.pf-topo-vend-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
    .pf-topo-vend-nome { max-width: 7rem; }
}

/* Conteúdo em largura total: os cards ocupam toda a faixa horizontal, sem
   max-width que os encurtasse. Vale para os quatro menus. */
.pf-conteudo { padding: 1.25rem 1.5rem; }

/* Os filtros (seletor de loja, busca, inativos) ficam estreitos e à esquerda,
   acima da lista; a lista é que vai à largura toda. */
.pf-filtros {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0.55rem; margin-bottom: 1rem;
    /* Cresce para ocupar a largura disponível, e a busca (width:100%) estica
       junto. Em pedidos, divide a linha com o Criar — por isso flex:1 e não
       width fixa, senão o botão quebraria para a linha de baixo. */
    flex: 1 1 auto; min-width: 0;
}
.pf-campo { display: flex; flex-direction: column; gap: 0.25rem; }
.pf-campo-rot {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--vfa-muted); font-weight: 700;
}
.pf-select {
    width: 100%; padding: 0.55rem 0.9rem;
    border: 1px solid var(--vfa-line); border-radius: 0.7rem;
    background: #fff; color: var(--vfa-ink); font-size: 1rem;
}
.pf-select:focus {
    outline: 0; border-color: var(--vfa-ink);
    box-shadow: 0 0 0 3px rgba(255,214,10,0.35);
}

/* Busca alinhada à esquerda — sem título próprio, que o nome da tela já está na
   barra superior. */
.pf-busca { position: relative; }
.pf-busca i {
    position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
    color: var(--vfa-muted); pointer-events: none;
}
.pf-busca input {
    width: 100%;
    padding: 0.6rem 0.9rem 0.6rem 2.4rem;
    border: 1px solid var(--vfa-line); border-radius: 999px;
    background: #fff; color: var(--vfa-ink); font-size: 1rem;
}
.pf-busca input:focus {
    outline: 0; border-color: var(--vfa-ink);
    box-shadow: 0 0 0 3px rgba(255,214,10,0.35);
}

.pf-check {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-size: 0.9rem; color: var(--vfa-ink-soft); cursor: pointer;
    user-select: none;
}
.pf-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--vfa-ink); }

/* ---- Lista em cards (substitui a tabela) ---- */
/* Coluna única e vertical: no celular comparar é rolar para baixo, não para o
   lado. Cards compactos para caber ~10 por tela; o lazy load traz 20 por vez. */
.pf-lista { display: flex; flex-direction: column; gap: 0.6rem; }

.pf-card {
    background: #fff;
    border: 1px solid var(--vfa-line);
    border-radius: 0.9rem;
    box-shadow: var(--shadow-card);
    padding: 0.7rem 0.9rem;
}

/* Produto inativo na loja: fundo cinza, para destoar do ativo (branco) sem
   precisar ler o selo de situação. */
.pf-card--inativo { background: #eceae4; box-shadow: none; }
.pf-card--inativo .pf-card-titulo { color: var(--vfa-ink-soft); }

/* Card clicável (pedidos): abre a tela do pedido. Reset de link + seta à
   direita + realce no hover, para parecer tocável. */
.pf-card--link { text-decoration: none; color: inherit; display: block; cursor: pointer; }
.pf-card--link:hover, .pf-card--link:focus-visible {
    border-color: var(--vfa-yellow-deep);
    box-shadow: 0 2px 10px rgba(21,19,15,0.08);
}
.pf-card-seta { margin-left: auto; color: var(--vfa-muted); flex: 0 0 auto; align-self: center; }

/* Card com menu "..." (pedidos): a <div> externa posiciona o botão; o <a>
   interno (pf-card-abre) é a área clicável que abre o pedido. */
.pf-card--acoes { position: relative; padding: 0; }
.pf-card-abre {
    display: block; text-decoration: none; color: inherit;
    padding: 0.7rem 0.9rem; padding-right: 3rem; border-radius: inherit;
}
.pf-card-acoes-btn {
    position: absolute; top: 0.4rem; right: 0.45rem;
    width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center;
    border: 0; background: transparent; border-radius: 0.6rem;
    color: var(--vfa-muted); font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.pf-card-acoes-btn:hover, .pf-card-acoes-btn:focus-visible { background: rgba(21,19,15,0.07); color: var(--vfa-ink); }

/* Popup de ações do card, criado pelo JS e posicionado junto ao botão. */
.pf-menu {
    position: fixed; z-index: 1200; min-width: 11.5rem;
    background: #fff; border: 1px solid var(--vfa-line); border-radius: 0.7rem;
    box-shadow: 0 10px 28px rgba(21,19,15,0.16); padding: 0.3rem;
}
.pf-menu button {
    display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
    border: 0; background: none; padding: 0.62rem 0.7rem; border-radius: 0.5rem;
    font-size: 0.9rem; color: var(--vfa-ink); cursor: pointer;
}
.pf-menu button:hover, .pf-menu button:focus-visible { background: rgba(255,214,10,0.18); }
.pf-menu button.pf-menu-perigo { color: var(--vfa-red); }
.pf-menu button.pf-menu-perigo:hover, .pf-menu button.pf-menu-perigo:focus-visible { background: rgba(179,22,30,0.08); }
.pf-menu i { font-size: 1.05rem; flex: 0 0 auto; }

/* Janela do vídeo de treinamento (player do YouTube embutido). */
.pf-video {
    position: fixed; inset: 0; z-index: 1300;
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.pf-video[hidden] { display: none; }
.pf-video-fundo { position: absolute; inset: 0; background: rgba(10,9,7,0.8); }
.pf-video-caixa { position: relative; z-index: 1; width: min(960px, 100%); }
.pf-video-frame {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    background: #000; border-radius: 0.6rem; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.pf-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pf-video-x {
    position: absolute; top: 0.45rem; right: 0.45rem; z-index: 2;
    width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.pf-video-x:hover, .pf-video-x:focus-visible { background: rgba(0,0,0,0.8); }

.pf-card-topo { display: flex; align-items: baseline; gap: 0.55rem; }
.pf-card-cod {
    flex: 0 0 auto;
    font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--vfa-ink); background: var(--vfa-yellow);
    border-radius: 0.4rem; padding: 0.1rem 0.4rem;
}
.pf-card-titulo {
    margin: 0; font-size: 0.97rem; font-weight: 700; color: var(--vfa-ink);
    line-height: 1.25;
    /* nome longo não empurra o card: corta no fim, começo continua legível */
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}

/* Os demais campos como pares rótulo/valor, embrulhando em linha. */
.pf-card-dados {
    display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem;
    margin-top: 0.45rem;
}
.pf-dado { display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; }
.pf-dado-rot {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--vfa-muted); font-weight: 600;
}
.pf-dado-val { font-size: 0.86rem; color: var(--vfa-ink-soft); font-variant-numeric: tabular-nums; }

/* Linha de rodapé do card (vendedor no pedido): própria linha, com ícone. */
.pf-card-rodape {
    display: flex; align-items: center; gap: 0.35rem;
    margin-top: 0.45rem; font-size: 0.86rem; color: var(--vfa-ink-soft);
}
.pf-card-rodape i { color: var(--vfa-red); font-size: 0.95rem; flex: 0 0 auto; }

.pf-vazio-cel { color: rgba(21,19,15,0.3); }

/* Sentinela do lazy load: o spinner gira enquanto o próximo lote chega. */
.pf-sentinela {
    display: flex; justify-content: center; align-items: center;
    padding: 1.2rem; min-height: 2.5rem;
}
.pf-spinner {
    width: 1.3rem; height: 1.3rem; border-radius: 50%;
    border: 2px solid var(--vfa-line); border-top-color: var(--vfa-ink);
    animation: pf-gira 0.7s linear infinite;
}
.pf-sentinela-erro { font-size: 0.85rem; color: var(--vfa-red); cursor: pointer; }
@keyframes pf-gira { to { transform: rotate(360deg); } }

.pf-selo {
    display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px;
    font-size: 0.78rem; font-weight: 700;
    background: rgba(21,19,15,0.08); color: var(--vfa-muted);
}
.pf-selo.is-ativo { background: rgba(255,214,10,0.3); color: var(--vfa-ink); }

.pf-vazio { text-align: center; padding: 3.5rem 1.5rem; color: var(--vfa-muted); }
.pf-vazio i { font-size: 2.4rem; display: block; margin-bottom: 0.7rem; opacity: 0.5; }
.pf-vazio p { margin: 0.2rem 0; }
.pf-vazio-nota { font-size: 0.85rem; opacity: 0.8; }

.pf-limite { margin-top: 0.9rem; font-size: 0.85rem; color: var(--vfa-muted); }

/* Painel com ação à direita (Criar, em pedidos) e filtros à esquerda. */
.pf-painel-topo {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; flex-wrap: nowrap; margin-bottom: 1rem;
}
.pf-painel-topo .pf-filtros { margin-bottom: 0; }
.pf-painel-acao { flex: 0 0 auto; }
.pf-criar { white-space: nowrap; }
.pf-criar i { margin-right: 0.3rem; }

/* ---- Campos compartilhados (input/select/textarea) ---- */
.pf-input {
    width: 100%; padding: 0.55rem 0.9rem;
    border: 1px solid var(--vfa-line); border-radius: 0.7rem;
    background: #fff; color: var(--vfa-ink); font-size: 1rem; font-family: inherit;
}
.pf-input:focus {
    outline: 0; border-color: var(--vfa-ink);
    box-shadow: 0 0 0 3px rgba(255,214,10,0.35);
}

/* ---- Tela de criar pedido ---- */
/* Cadastro em largura total, como as listas — sem max-width que o encurtasse. */
.pf-cadastro { width: 100%; }
.pf-cad-cab { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pf-voltar { color: var(--vfa-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.pf-voltar:hover { color: var(--vfa-red); }
.pf-cad-titulo { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--vfa-ink); }

/* Abas Informações / Produtos. */
.pf-abas { display: flex; gap: 0.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--vfa-line); }
.pf-aba {
    border: 0; background: none; cursor: pointer;
    padding: 0.6rem 1rem; font-size: 0.95rem; font-weight: 600;
    color: var(--vfa-muted); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.pf-aba:hover { color: var(--vfa-ink); }
.pf-aba.is-ativa { color: var(--vfa-ink); border-bottom-color: var(--vfa-yellow); }

/* Bloco em coluna com gap: espaça os campos de forma uniforme (antes ficavam
   colados). */
.pf-cad-bloco {
    background: #fff; border: 1px solid var(--vfa-line);
    border-radius: 1rem; box-shadow: var(--shadow-card);
    padding: 1.35rem; margin-bottom: 1rem;
    display: flex; flex-direction: column; gap: 1.2rem;
}
.pf-cad-grade { display: flex; gap: 1.2rem; flex-wrap: wrap; }
/* min-width:0 impede que o input date (largura intrínseca grande) estoure a
   coluna flex; o input segue 100% da coluna e não passa para fora da div. */
.pf-cad-grade .pf-campo { flex: 1 1 12rem; min-width: 0; }
.pf-cad-grade .pf-input,
.pf-cad-grade .pf-select { max-width: 100%; }

/* Larguras relativas dos campos dentro da grade (flex). */
.pf-cad-grade .pf-campo-largo { flex: 3 1 16rem; }
.pf-cad-grade .pf-campo-cep   { flex: 1 1 8rem; }
.pf-cad-grade .pf-campo-num   { flex: 1 1 6rem; }
.pf-cad-grade .pf-campo-uf    { flex: 0 1 5rem; }
.pf-cad-grade .pf-campo-tipo  { flex: 1 1 9rem; }

/* Blocos de endereço (faturamento / cobrança / entrega) no cadastro de cliente. */
.pf-end-bloco {
    border: 1px solid var(--vfa-line); border-radius: 0.8rem;
    padding: 0.9rem 1rem 1rem; margin: 0 0 1rem;
}
.pf-end-bloco legend {
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
    text-transform: uppercase; color: var(--vfa-muted); padding: 0 0.4rem;
}
.pf-end-bloco .pf-cad-grade + .pf-cad-grade { margin-top: 0.8rem; }
.pf-end-dica { font-size: 0.82rem; color: var(--vfa-muted); margin: 0.2rem 0 0; }

/* Cliente: [x limpar] + combobox + [lupa modal]. */
.pf-cliente-linha { display: flex; gap: 0.5rem; align-items: stretch; }
.pf-cliente-linha .pf-autocomplete { flex: 1 1 auto; min-width: 0; }
.pf-lupa, .pf-cliente-x {
    flex: 0 0 auto; width: 2.9rem;
    border: 1px solid var(--vfa-line); border-radius: 0.7rem;
    background: #fff; cursor: pointer;
}
.pf-lupa { color: var(--vfa-ink); font-size: 1.1rem; }
.pf-lupa:hover, .pf-lupa:focus { background: var(--vfa-ink); color: #fff; border-color: var(--vfa-ink); }
/* O "x" à esquerda, discreto; vermelho ao passar o mouse (ação de limpar). */
.pf-cliente-x { color: var(--vfa-muted); font-size: 0.95rem; }
.pf-cliente-x:hover, .pf-cliente-x:focus { background: var(--vfa-red); color: #fff; border-color: var(--vfa-red); }

/* Aviso de pedido bloqueado (de outro vendedor). */
.pf-cad-bloqueio {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(179,22,30,0.07); border: 1px solid rgba(179,22,30,0.2);
    color: var(--vfa-red); border-radius: 0.7rem; padding: 0.7rem 0.9rem;
    font-size: 0.9rem; margin-bottom: 1rem;
}
.pf-cad-bloqueio i { flex: 0 0 auto; }

.pf-autocomplete { position: relative; }
.pf-ac-lista {
    position: absolute; z-index: 5; left: 0; right: 0; top: 100%;
    margin-top: 0.25rem; background: #fff;
    border: 1px solid var(--vfa-line); border-radius: 0.7rem;
    box-shadow: var(--shadow-soft); max-height: 16rem; overflow-y: auto;
}
.pf-ac-item {
    display: block; width: 100%; text-align: left; border: 0; background: none;
    padding: 0.5rem 0.75rem; cursor: pointer;
    border-bottom: 1px solid var(--vfa-line);
}
.pf-ac-item:last-child { border-bottom: 0; }
.pf-ac-item:hover, .pf-ac-item:focus { background: rgba(255,214,10,0.15); }
.pf-ac-item strong { display: block; font-size: 0.9rem; font-weight: 600; color: var(--vfa-ink); }
.pf-ac-item small { color: var(--vfa-muted); font-size: 0.78rem; }
.pf-ac-vazio { padding: 0.6rem 0.75rem; color: var(--vfa-muted); font-size: 0.85rem; }

/* Itens em cards verticais (não mais tabela). */
.pf-itens-topo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pf-add-prod { white-space: nowrap; }
.pf-add-prod i { margin-right: 0.3rem; }

.pf-itens-lista { display: flex; flex-direction: column; gap: 0.6rem; }
.pf-item-card {
    border: 1px solid var(--vfa-line); border-radius: 0.8rem;
    background: #fff; padding: 0.7rem 0.85rem;
}
.pf-item-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.pf-item-nome { font-weight: 600; color: var(--vfa-ink); }
.pf-item-x { border: 0; background: none; color: var(--vfa-red); font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.pf-item-grade { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 0.55rem; align-items: flex-end; }
.pf-item-campo { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.9rem; color: var(--vfa-ink-soft); }
.pf-item-campo > span:first-child { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--vfa-muted); font-weight: 700; }
.pf-item-qtd, .pf-item-descu, .pf-item-desct {
    width: 5rem; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.95rem;
    border: 1px solid var(--vfa-line); border-radius: 0.5rem; padding: 0.3rem 0.45rem;
}
.pf-item-unid {
    border: 1px solid var(--vfa-line); border-radius: 0.5rem;
    padding: 0.3rem 0.5rem; font-size: 0.92rem; background: #fff; color: var(--vfa-ink);
}
.pf-item-und { font-weight: 600; }
.pf-item-preco, .pf-item-sub { font-variant-numeric: tabular-nums; }
.pf-item-sub { font-weight: 700; color: var(--vfa-ink); }

/* Desconto sobre o total do pedido, abaixo da lista. */
.pf-pedido-desc { display: flex; justify-content: flex-end; margin-top: 0.9rem; }
.pf-pedido-desc .pf-item-campo { min-width: 13rem; }

.pf-itens-vazio { color: var(--vfa-muted); font-style: italic; margin: 0.3rem 0; }
.pf-itens-total {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 0.3rem; padding-top: 0.9rem; border-top: 1px solid var(--vfa-line);
}
.pf-itens-total span { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--vfa-muted); font-weight: 700; }
.pf-itens-total strong { font-size: 1.2rem; }

/* Modal de busca (cliente / produto). */
.pf-modal { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.pf-modal[hidden] { display: none; }
.pf-modal-fundo { position: absolute; inset: 0; background: rgba(21,19,15,0.5); }
.pf-modal-caixa {
    position: relative; background: #fff; border-radius: 1rem;
    width: 100%; max-width: 34rem; max-height: 85vh;
    display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-soft);
}
.pf-modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--vfa-line); }
.pf-modal-cab h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.pf-modal-x { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--vfa-muted); }
.pf-modal-busca { margin: 0.9rem 1.1rem 0.5rem; }
.pf-modal-lista { overflow-y: auto; padding: 0 0.6rem 0.8rem; }
.pf-modal-item {
    display: block; width: 100%; text-align: left; border: 0; background: none;
    padding: 0.6rem 0.7rem; border-radius: 0.6rem; cursor: pointer;
    border-bottom: 1px solid var(--vfa-line);
}
.pf-modal-item:last-child { border-bottom: 0; }
.pf-modal-item:hover:not(:disabled) { background: rgba(255,214,10,0.15); }
.pf-modal-item strong { display: block; font-size: 0.92rem; font-weight: 600; color: var(--vfa-ink); }
.pf-modal-item small { color: var(--vfa-muted); font-size: 0.8rem; }
.pf-modal-item.is-add { opacity: 0.5; cursor: default; }
.pf-modal-item.is-add strong::after { content: " ✓"; color: #2e7d32; }

.pf-cad-rodape { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1rem; }
/* Padroniza os dois botões do rodapé: um é <a> (Cancelar) e o outro <button>
   (Salvar), que renderizam fonte e linha-base diferentes. Mesma geometria e
   inline-flex centralizado fazem os dois ficarem idênticos em fonte, tamanho e
   alinhamento — só a cor muda. */
.pf-cad-rodape .btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 999px;
    padding: 0.9rem 1.6rem;
    font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2;
    text-decoration: none;
}
/* Cancelar: fundo vermelho sólido (ação de descartar). */
.pf-btn-cancelar { background: var(--vfa-red); color: #fff; }
.pf-btn-cancelar:hover, .pf-btn-cancelar:focus { background: #8f1218; color: #fff; }
.pf-cad-aviso {
    margin-top: 0.85rem; padding: 0.75rem 0.9rem; border-radius: 0.7rem;
    background: rgba(255,214,10,0.18); color: var(--vfa-ink-soft); font-size: 0.9rem;
}
.pf-cad-aviso.is-erro { background: rgba(179,22,30,0.08); color: var(--vfa-red); }

.pf-backdrop {
    position: fixed; inset: 0; background: rgba(21,19,15,0.5); z-index: 1030;
}
/* Regra de autor vence o [hidden] do navegador quando há display explícito —
   mesma armadilha do painel admin do Lotus. */
.pf-backdrop[hidden] { display: none; }

@media (max-width: 991.98px) {
    .pf-sidebar {
        /* Gaveta mais estreita que a tela, para o fundo aparecer e deixar
           claro que é uma sobreposição que fecha ao tocar fora. */
        width: 82vw; max-width: 20rem;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .pf-shell.is-aberto .pf-sidebar { transform: translateX(0); }
    .pf-fechar { display: block; }
    .pf-abrir { display: block; }
    .pf-principal { margin-left: 0; }
    .pf-topo { padding: 0.75rem 1rem; }
    .pf-titulo { font-size: 1.05rem; }
    .pf-conteudo { padding: 0.9rem; }
    .pf-filtros { max-width: none; }
    .pf-painel-topo { flex-direction: column; }
    .pf-painel-acao { width: 100%; }
    .pf-criar { width: 100%; justify-content: center; display: inline-flex; align-items: center; }
    /* Gravar e cancelar lado a lado, cada um ocupando metade da largura. */
    .pf-cad-rodape { flex-direction: row; }
    .pf-cad-rodape .btn { flex: 1 1 0; width: auto; }
}

/* Alvos de toque e tipografia um pouco maiores no telefone, onde a plataforma
   é de fato usada (vendedor em campo). */
@media (max-width: 575.98px) {
    .pf-nav-link { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
    .pf-sair { padding: 0.4rem 0; display: inline-block; }
    .pf-card { padding: 0.8rem 0.9rem; }
    .pf-card-titulo { white-space: normal; }  /* no estreito, deixa quebrar */
    .pf-card-dados { gap: 0.15rem 0.9rem; }
    .pf-busca input { font-size: 16px; }  /* ≥16px evita o zoom automático do iOS */
}

@media (prefers-reduced-motion: reduce) {
    .pf-sidebar { transition: none; }
    .pf-spinner { animation: none; }
}
