/* freepix-painel — design system v3 PREMIUM
   Dark mode + glass morphism + gradient borders + scroll reveal.
*/

:root {
    /* superficies */
    --bg-page: #050b1a;
    --bg-page-gradient:
        radial-gradient(at 18% 0%, rgba(29, 78, 216, 0.20), transparent 50%),
        radial-gradient(at 85% 5%, rgba(230, 191, 63, 0.12), transparent 45%),
        radial-gradient(at 60% 95%, rgba(99, 102, 241, 0.12), transparent 55%),
        linear-gradient(180deg, #050b1a 0%, #0a1227 55%, #0d0a22 100%);
    --bg-card: rgba(19, 27, 46, 0.72);
    --bg-card-solid: #131b2e;
    --bg-glass: rgba(19, 27, 46, 0.55);
    --panel: #131b2e;

    /* texto */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* brand */
    --brand: #3b82f6;
    --brand-dark: #1d4ed8;
    --brand-light: #60a5fa;
    --brand-soft: rgba(59, 130, 246, 0.16);

    --gold: #e6bf3f;
    --gold-light: #fde68a;
    --gold-soft: rgba(230, 191, 63, 0.16);

    /* feedback */
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.16);

    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.20);
    --border-soft: rgba(255, 255, 255, 0.05);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-2xl: 28px;

    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.30), 0 0 120px rgba(29, 78, 216, 0.18);
    --shadow-glow-gold: 0 0 60px rgba(230, 191, 63, 0.28), 0 0 120px rgba(184, 134, 11, 0.18);

    --section-padding: 96px 0;
    --container-width: 1180px;
    --container-narrow: 820px;

    --reveal-y: 24px;
    --reveal-dur: 700ms;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg-page);
    background-image: var(--bg-page-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection { background: var(--brand-soft); color: var(--text-primary); }

img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}
.container-narrow { max-width: var(--container-narrow); }

/* =====================================================================
   SCROLL REVEAL
   ===================================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(var(--reveal-y));
    transition:
        opacity var(--reveal-dur) cubic-bezier(0.16, 1, 0.3, 1),
        transform var(--reveal-dur) cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal-delay="1"] { transition-delay: 60ms; }
[data-reveal-delay="2"] { transition-delay: 120ms; }
[data-reveal-delay="3"] { transition-delay: 180ms; }
[data-reveal-delay="4"] { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================================
   TOPBAR — glass
   ===================================================================== */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(5, 11, 26, 0.72);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--border);
}
.topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 18px;
}
.brand {
    text-decoration: none;
    display: inline-flex; align-items: center;
    flex-shrink: 0;
    transition: opacity 120ms ease;
}
.brand:hover { opacity: 0.85; }
.brand-logo { height: 30px; width: auto; }
.nav-links {
    display: flex; gap: 28px;
    flex: 1; justify-content: center;
}
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    font-weight: 500; font-size: 0.94rem;
    transition: color 120ms ease;
    position: relative;
}
.nav-links a::after {
    content: ""; position: absolute;
    bottom: -6px; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--brand-light), var(--gold));
    border-radius: 999px;
    transition: width 180ms ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 80%; }
.nav-cta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

@media (max-width: 920px) {
    .topbar-row { height: 64px; }
    .nav-links { display: none; }
}

/* =====================================================================
   BUTTONS — premium
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px;
    font: inherit; font-weight: 700; font-size: 0.92rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer; user-select: none;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    position: relative;
    transition:
        transform 100ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 140ms ease,
        filter 140ms ease,
        background 140ms ease,
        border-color 140ms ease,
        color 140ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 14px; font-size: 0.86rem; }
.btn-lg { padding: 16px 28px; font-size: 1.02rem; border-radius: 12px; }
.btn .ico { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: #fff;
    box-shadow:
        0 8px 24px rgba(29, 78, 216, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
    filter: brightness(1.10);
    box-shadow:
        0 12px 32px rgba(29, 78, 216, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border-color: var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.btn-gold {
    background: linear-gradient(135deg, #b78720, var(--gold), #fef3c7);
    background-size: 200% 100%;
    background-position: 0% 50%;
    color: #1a1500;
    box-shadow:
        0 10px 30px rgba(230, 191, 63, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.30);
    transition: background-position 600ms ease, filter 140ms ease, transform 100ms ease, box-shadow 140ms ease;
}
.btn-gold:hover {
    background-position: 100% 50%;
    box-shadow:
        0 14px 36px rgba(230, 191, 63, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

/* =====================================================================
   HERO PREMIUM
   ===================================================================== */
.hero {
    position: relative;
    padding: 88px 0 64px;
    overflow: hidden;
}
.hero-glow {
    position: absolute; inset: 0;
    background:
        radial-gradient(60% 50% at 80% 30%, rgba(59, 130, 246, 0.18), transparent 70%),
        radial-gradient(40% 40% at 30% 80%, rgba(230, 191, 63, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
    display: grid;
    gap: 64px;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
}
.hero-copy, .hero-visual { min-width: 0; }

.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    padding: 8px 16px;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.32);
    border-radius: 999px;
    color: var(--success);
    margin-bottom: 26px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.dot-success {
    display: inline-block;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.15); } }

.hero h1 {
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}
.grad {
    background: linear-gradient(90deg, var(--brand-light), var(--gold-light), var(--gold));
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: grad-shift 6s ease-in-out infinite;
}
@keyframes grad-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.lead {
    font-size: 1.10rem; color: var(--text-secondary);
    margin: 0 0 30px 0; max-width: 560px;
    line-height: 1.68;
}
.lead strong { color: var(--text-primary); font-weight: 600; }
.hero-cta {
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-bottom: 32px;
}
.hero-cert {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 440px;
}
.cert-badge {
    height: 48px; width: auto;
    background: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}
.hero-cert-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; min-width: 0; }
.hero-cert-text strong { color: var(--text-primary); font-size: 0.92rem; font-weight: 700; }
.hero-cert-text span { color: var(--text-muted); font-size: 0.8rem; }

.hero-photo-wrap {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 1px solid var(--border);
}
.hero-photo-wrap::before {
    content: ""; position: absolute; inset: 0;
    border-radius: var(--radius-2xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.5), rgba(230, 191, 63, 0.3) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}
.hero-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

@media (max-width: 980px) {
    .hero { padding: 56px 0 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero-photo { aspect-ratio: 16 / 10; }
}

/* =====================================================================
   TRUST STRIP — premium
   ===================================================================== */
.trust-strip {
    padding: 36px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background:
        linear-gradient(180deg, transparent, rgba(29, 78, 216, 0.06), transparent);
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.trust-item {
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.trust-ico {
    width: 30px; height: 30px;
    color: var(--brand-light);
    margin-bottom: 4px;
}
.trust-item strong {
    display: block;
    font-family: "Sora", sans-serif;
    color: var(--text-primary);
    font-size: 1.02rem;
}
.trust-item span { color: var(--text-muted); font-size: 0.86rem; line-height: 1.4; }

@media (max-width: 760px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

/* =====================================================================
   SECTION HEAD
   ===================================================================== */
.section-head {
    text-align: center;
    margin-bottom: 48px;
    max-width: 760px;
    margin-left: auto; margin-right: auto;
}
.section-head .eyebrow {
    display: inline-block;
    font-size: 0.74rem; text-transform: uppercase;
    letter-spacing: 0.16em; font-weight: 700;
    padding: 7px 16px;
    background: var(--brand-soft);
    border: 1px solid rgba(59, 130, 246, 0.32);
    border-radius: 999px;
    color: var(--brand-light);
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.section-head .eyebrow.gold {
    background: var(--gold-soft);
    border-color: rgba(230, 191, 63, 0.32);
    color: var(--gold);
}
.section-head h2 {
    font-family: "Sora", sans-serif; font-weight: 700;
    font-size: clamp(1.7rem, 3.6vw, 2.4rem);
    margin: 0 0 14px 0;
    color: var(--text-primary);
    line-height: 1.18;
    letter-spacing: -0.015em;
}
.section-head p { color: var(--text-secondary); margin: 0; line-height: 1.6; font-size: 1rem; }

/* =====================================================================
   VIDEO PRINCIPAL
   ===================================================================== */
.video-main {
    padding: var(--section-padding);
    border-top: 1px solid var(--border-soft);
}
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow:
        var(--shadow-lg),
        0 0 80px rgba(59, 130, 246, 0.22);
    border: 1px solid var(--border);
    max-width: 960px;
    margin: 0 auto;
}
.video-frame::before {
    content: ""; position: absolute; inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.6), rgba(230, 191, 63, 0.4) 50%, rgba(96, 165, 250, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}
.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: 0;
    z-index: 0;
}

/* =====================================================================
   BENEFICIOS — glass cards com gradient border
   ===================================================================== */
.features {
    padding: var(--section-padding);
    border-top: 1px solid var(--border-soft);
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.feature {
    position: relative;
    padding: 30px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 220ms ease,
                box-shadow 220ms ease;
    overflow: hidden;
}
.feature::before {
    content: ""; position: absolute; inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.0), rgba(96, 165, 250, 0.0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    transition: background 220ms ease;
}
.feature:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: var(--shadow-md), 0 0 40px rgba(59, 130, 246, 0.18);
}
.feature:hover::before {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.55), rgba(230, 191, 63, 0.35) 60%, transparent);
}
.feature-ico {
    display: inline-grid; place-items: center;
    width: 56px; height: 56px;
    border-radius: 14px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.feature-ico svg { width: 28px; height: 28px; }
.ico-bg-green  { background: linear-gradient(135deg, #047857, #10b981); }
.ico-bg-blue   { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.ico-bg-gold   { background: linear-gradient(135deg, #b78720, var(--gold)); color: #1a1500; }
.ico-bg-red    { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.ico-bg-purple { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.ico-bg-teal   { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.feature h3 {
    margin: 0 0 8px 0;
    font-family: "Sora", sans-serif; font-weight: 700;
    color: var(--text-primary);
    font-size: 1.14rem;
    letter-spacing: -0.01em;
}
.feature p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.62;
}

@media (max-width: 920px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   CASOS DE USO — glass
   ===================================================================== */
.use-cases {
    padding: var(--section-padding);
    border-top: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.04), transparent 60%);
}
.case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.case-card {
    padding: 28px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
                border-color 220ms ease,
                box-shadow 220ms ease;
    position: relative;
    overflow: hidden;
}
.case-card:hover {
    transform: translateY(-6px);
    border-color: rgba(230, 191, 63, 0.45);
    box-shadow: var(--shadow-md), 0 0 40px rgba(230, 191, 63, 0.16);
}
.case-emoji {
    display: block;
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 14px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
.case-card h3 {
    margin: 0 0 8px 0;
    font-family: "Sora", sans-serif; font-weight: 700;
    color: var(--text-primary);
    font-size: 1.08rem;
}
.case-card p { margin: 0; color: var(--text-secondary); font-size: 0.94rem; line-height: 1.58; }

@media (max-width: 920px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .case-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   VIDEOS CASE
   ===================================================================== */
.video-cases {
    padding: var(--section-padding);
    border-top: 1px solid var(--border-soft);
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.video-card {
    margin: 0;
    display: flex; flex-direction: column; gap: 16px;
}
.video-card .video-frame-sm {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md), 0 0 50px rgba(59, 130, 246, 0.15);
    border: 1px solid var(--border);
}
.video-card .video-frame-sm::before {
    content: ""; position: absolute; inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.4), rgba(230, 191, 63, 0.25) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}
.video-card .video-frame-sm iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
    z-index: 0;
}
.video-card figcaption {
    font-family: "Sora", sans-serif;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .video-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* =====================================================================
   COMO FUNCIONA — steps
   ===================================================================== */
.how {
    padding: var(--section-padding);
    border-top: 1px solid var(--border-soft);
}
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    position: relative;
}
.step {
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease;
}
.step:hover { transform: translateY(-4px); border-color: rgba(59, 130, 246, 0.32); }
.step-num {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: #fff;
    font-family: "Sora", sans-serif; font-weight: 800;
    font-size: 1.18rem;
    margin-bottom: 16px;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.step h3 {
    margin: 0 0 6px 0;
    font-family: "Sora", sans-serif; font-weight: 700;
    color: var(--text-primary);
    font-size: 1.06rem;
}
.step p { margin: 0; color: var(--text-secondary); font-size: 0.93rem; line-height: 1.56; }

@media (max-width: 920px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* =====================================================================
   FAQ
   ===================================================================== */
.faq {
    padding: var(--section-padding);
    border-top: 1px solid var(--border-soft);
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    transition: border-color 180ms ease, background 180ms ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.faq-item:hover { border-color: rgba(59, 130, 246, 0.22); }
.faq-item[open] { border-color: rgba(59, 130, 246, 0.40); background: var(--bg-card-solid); }
.faq-item summary {
    padding: 20px 22px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-primary);
    font-family: "Sora", sans-serif;
    font-size: 1.02rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    color: var(--brand-light);
    font-weight: 700;
    font-size: 1.5rem;
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--brand-soft);
    border: 1px solid rgba(59, 130, 246, 0.32);
    transition: transform 180ms ease, background 180ms ease;
    flex-shrink: 0;
    line-height: 1;
}
.faq-item[open] summary::after {
    content: "−";
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.faq-item p {
    margin: 0;
    padding: 0 22px 22px 22px;
    color: var(--text-secondary);
    line-height: 1.68;
}

/* =====================================================================
   CTA STRIP — drama
   ===================================================================== */
.cta-strip {
    position: relative;
    padding: 96px 24px;
    text-align: center;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    overflow: hidden;
}
.cta-glow {
    position: absolute; inset: 0;
    background:
        radial-gradient(at 50% 0%, rgba(230, 191, 63, 0.18), transparent 55%),
        radial-gradient(at 30% 100%, rgba(29, 78, 216, 0.18), transparent 60%),
        radial-gradient(at 70% 100%, rgba(99, 102, 241, 0.14), transparent 60%);
    pointer-events: none;
}
.cta-strip .container { position: relative; }
.cta-strip h2 {
    font-family: "Sora", sans-serif; font-weight: 800;
    font-size: clamp(1.8rem, 3.8vw, 2.4rem);
    margin: 0 0 10px 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.cta-strip p { color: var(--text-secondary); margin: 0 0 28px 0; font-size: 1.04rem; }
.cta-strip .phone {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-family: "JetBrains Mono", monospace;
    margin-top: 14px;
    letter-spacing: 0.04em;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
    padding: 56px 0 28px;
    border-top: 1px solid var(--border-soft);
    background: rgba(5, 11, 26, 0.6);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 36px;
    align-items: flex-start;
    margin-bottom: 32px;
}
.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
    max-width: 320px;
    line-height: 1.6;
}
.footer-logo { height: 32px; margin-bottom: 14px; }
.footer-grid > div > strong {
    display: block;
    font-family: "Sora", sans-serif;
    color: var(--text-primary);
    margin-bottom: 14px;
    font-size: 0.94rem;
}
.footer-grid a,
.footer-grid > div > span {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: color 120ms ease;
}
.footer-grid a:hover { color: var(--text-primary); }
.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    text-align: center;
}
.muted { color: var(--text-muted); }
.small { font-size: 0.86rem; }

@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ============================================================
   freepix-app — layout do app (F1+)
   topbar fixa + main + footer fino + formularios de auth
   ============================================================ */

:root {
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.14);
    --input-bg: rgba(15, 23, 42, 0.55);
    --input-bg-focus: rgba(15, 23, 42, 0.80);
}

body.app-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    background: rgba(5, 11, 26, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.app-topbar-brand { display: inline-flex; align-items: center; }
.app-topbar-logo { height: 28px; display: block; }
.app-topbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-topbar-user {
    color: var(--text-muted);
    font-size: 0.86rem;
    margin-right: 6px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---- auth cards ---- */
.auth-wrap {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 56px 24px;
}
.auth-card {
    max-width: 460px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(59, 130, 246, 0.18);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.5), rgba(230, 191, 63, 0.3) 60%, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.auth-kicker {
    display: block;
    text-align: center;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--brand-light);
    margin-bottom: 8px;
    position: relative;
}
.auth-card h1 {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0 0 8px 0;
    color: var(--text-primary);
    text-align: center;
    position: relative;
}
.auth-card p.lead {
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 28px 0;
    font-size: 0.96rem;
    position: relative;
}
.auth-foot {
    text-align: center;
    margin-top: 22px;
    font-size: 0.88rem;
    color: var(--text-muted);
    position: relative;
}
.auth-foot a {
    color: var(--brand-light);
    text-decoration: none;
    font-weight: 600;
}
.auth-foot a:hover { text-decoration: underline; }
.auth-foot-sep { margin: 0 8px; opacity: 0.5; }

/* ---- form fields ---- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-label {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
}
.form-input {
    width: 100%;
    padding: 13px 14px;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.98rem;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
    -webkit-appearance: none;
    appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:hover { border-color: var(--border-strong); }
.form-input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--input-bg-focus);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: rgba(248, 113, 113, 0.5);
}
.form-input[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}
.form-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.form-error {
    color: var(--danger);
    font-size: 0.84rem;
    margin-top: 2px;
}
.form-submit {
    width: 100%;
    margin-top: 6px;
}

/* ---- alerts ---- */
.alert {
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.92rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
    position: relative;
    line-height: 1.45;
}
.alert-error {
    background: var(--danger-soft);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}
.alert-success {
    background: var(--success-soft);
    border-color: rgba(52, 211, 153, 0.35);
    color: #bbf7d0;
}
.alert-warning {
    background: var(--warning-soft);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fef3c7;
}

/* ---- footer fino do app ---- */
footer.app-foot {
    padding: 18px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border-soft);
    background: rgba(5, 11, 26, 0.55);
}
footer.app-foot a {
    color: var(--brand-light);
    text-decoration: none;
}
footer.app-foot a:hover { text-decoration: underline; }

/* ---- dashboard placeholder (F1; F2 substitui pelo real) ---- */
.dash-wrap {
    flex: 1;
    padding: 48px 32px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}
.dash-hero h1 {
    font-family: "Sora", sans-serif;
    font-size: 2rem;
    margin: 4px 0 12px;
    color: var(--text-primary);
}
.dash-hero .lead { margin-bottom: 28px; max-width: 720px; }
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.dash-card-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--brand-light);
}
.dash-card-value {
    font-family: "Sora", sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}
.dash-card-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.dash-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 520px) {
    .app-topbar { padding: 12px 16px; }
    .app-topbar-user { display: none; }
    .auth-card { padding: 32px 22px; }
    .dash-wrap { padding: 32px 18px; }
    .dash-hero h1 { font-size: 1.5rem; }
}

/* ============================================================
   Dashboard (F2) — lojas, placas, empty state, alertas
   ============================================================ */

.dash-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.dash-hero-meta .status-pill {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}
.dash-hero-meta .dot {
    width: 6px; height: 6px; border-radius: 50%;
}
.dash-hero-meta .dot-ok {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}
.dash-hero-meta .dot-warn {
    background: var(--warning);
    box-shadow: 0 0 6px var(--warning);
}
.status-pill-warn {
    color: var(--warning);
    border-color: rgba(251, 191, 36, 0.30);
    background: var(--warning-soft);
}
.status-pill-link {
    color: var(--brand-light) !important;
    text-decoration: none;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}
.status-pill-link:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.dash-card-unit {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.dash-section {
    margin-top: 36px;
}
.dash-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.dash-section-head h2 {
    font-family: "Sora", sans-serif;
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-primary);
}
.dash-section-meta {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.dash-lojas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}
.dash-loja {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dash-loja-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.dash-loja-head h3 {
    font-family: "Sora", sans-serif;
    font-size: 1.04rem;
    margin: 0 0 4px;
    color: var(--text-primary);
}
.dash-loja-addr {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.dash-loja-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    flex-shrink: 0;
}
.dash-pill {
    font-size: 0.78rem;
    padding: 3px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}
.dash-pill strong {
    color: var(--success);
    font-weight: 700;
}

.dash-placas {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dash-placa {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.92rem;
}
.dash-placa:hover { background: rgba(255, 255, 255, 0.04); }
.dash-placa-status {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dash-placa-status-on {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}
.dash-placa-status-off {
    background: var(--text-muted);
    opacity: 0.45;
}
.dash-placa-name {
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-placa-credits {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    font-size: 0.86rem;
}
.dash-placa-empty {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-style: italic;
    margin: 4px 0 0;
}

.dash-empty {
    margin-top: 32px;
}
.dash-empty-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    text-align: center;
    max-width: 580px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.dash-empty-card h2 {
    font-family: "Sora", sans-serif;
    font-size: 1.3rem;
    margin: 0 0 10px;
}
.dash-empty-card p {
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 10px;
}
.dash-empty-card code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.86em;
}
.dash-empty-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-debug {
    background: var(--warning-soft);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: #fef3c7;
}
.dash-debug summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--warning);
}
.dash-debug ul {
    margin: 10px 0 6px;
    padding-left: 18px;
    font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
    font-size: 0.82rem;
}
.dash-debug-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 0;
}

.dash-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}
.dash-foot a {
    color: var(--brand-light);
    text-decoration: none;
}
.dash-foot a:hover { text-decoration: underline; }

@media (max-width: 520px) {
    .dash-loja-stats { align-items: flex-start; }
    .dash-section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ============================================================
   F3 — drill-down lojas/placas: nav, page-head, filtros,
        tabelas, badges, breadcrumb, kv-list, qr
   ============================================================ */

/* Topbar nav (links principais) */
.app-topbar-links {
    display: flex;
    gap: 4px;
    margin-left: 16px;
    flex: 1;
    overflow-x: auto;
}
.app-topbar-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: color 140ms ease, background 140ms ease;
    white-space: nowrap;
}
.app-topbar-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.app-topbar-links a.is-active {
    color: var(--brand-light);
    background: var(--brand-soft);
}

/* Page head (titulo + acoes) */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-head h1 {
    font-family: "Sora", sans-serif;
    font-size: 1.7rem;
    margin: 4px 0 8px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.page-head .lead { margin: 0; }
.page-head-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
    color: var(--text-muted);
    font-size: 0.86rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--brand-light);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { opacity: 0.5; }

/* Filtros */
.filter-bar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    flex: 1;
}
.filter-field > span {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-muted);
}
.filter-field .form-input { padding: 9px 12px; font-size: 0.92rem; }
.filter-bar .btn { flex-shrink: 0; }
.filter-clear {
    color: var(--text-muted);
    font-size: 0.84rem;
    text-decoration: none;
    padding: 0 4px;
}
.filter-clear:hover { color: var(--danger); text-decoration: underline; }

/* Tabela de dados */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(8px);
}
.data-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}
.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.92rem;
    color: var(--text-primary);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.data-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}
.data-table .muted, .data-table .small { color: var(--text-muted); }
.data-table .small { font-size: 0.82rem; }

.row-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}
.row-link:hover { color: var(--brand-light); }
.row-link-soft {
    color: var(--text-secondary);
    text-decoration: none;
}
.row-link-soft:hover { color: var(--brand-light); text-decoration: underline; }
.row-meta {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 2px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
}
.badge-ok {
    color: var(--success);
    background: var(--success-soft);
    border-color: rgba(52, 211, 153, 0.35);
}
.badge-off {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}
.badge-warn {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: rgba(251, 191, 36, 0.35);
}

/* dash-card-value-text (texto curto, vs numero) */
.dash-card-value-text {
    font-family: "Sora", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

/* Dashboard ajuste: link nas placas */
.dash-placa-more {
    list-style: none;
    text-align: center;
    padding: 6px;
    font-size: 0.82rem;
}
.dash-placa-more a {
    color: var(--brand-light);
    text-decoration: none;
    font-weight: 600;
}
.dash-placa-more a:hover { text-decoration: underline; }

/* KV list (placa detail "dados de pagamento") */
.kv-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin: 0;
    backdrop-filter: blur(8px);
}
.kv-list > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kv-list dt {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-muted);
}
.kv-list dd {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

/* Placa QR image */
.placa-qr {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}
.placa-qr img {
    max-width: 280px;
    max-height: 280px;
    background: #fff;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.placa-qr a { color: var(--brand-light); text-decoration: none; word-break: break-all; }

@media (max-width: 740px) {
    .data-table { font-size: 0.86rem; }
    .data-table thead th, .data-table tbody td { padding: 10px 12px; }
    .filter-bar { padding: 12px; }
    .app-topbar-links { gap: 0; }
    .app-topbar-links a { padding: 6px 10px; font-size: 0.84rem; }
}

@media (max-width: 520px) {
    .page-head h1 { font-size: 1.35rem; }
    /* Esconde colunas menos criticas em mobile */
    .data-table thead th:nth-child(2),
    .data-table tbody td:nth-child(2),
    .data-table thead th:nth-child(4),
    .data-table tbody td:nth-child(4) {
        display: none;
    }
}

/* ============================================================
   F4 — Pagamentos: raw JSON pre + pagination + print stylesheet
   ============================================================ */

.raw-json {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 0.82rem;
    color: #cbd5e1;
    overflow-x: auto;
    max-height: 540px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.45;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin: 18px 0 8px;
}
.pagination-state {
    color: var(--text-muted);
    font-size: 0.86rem;
}
.btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================================
   F5 — Admin: kicker quente + atalhos + impersonate banner
   ============================================================ */

.auth-kicker-warn {
    color: var(--warning) !important;
}

.app-topbar-links a.admin-link {
    color: var(--warning);
    border: 1px dashed rgba(251, 191, 36, 0.4);
}
.app-topbar-links a.admin-link.is-active {
    background: var(--warning-soft);
    color: var(--warning);
}

.impersonate-banner {
    background: var(--warning-soft);
    border-bottom: 2px solid var(--warning);
    color: #fef3c7;
    padding: 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    position: sticky;
    top: 56px;
    z-index: 90;
}
.impersonate-banner strong { color: var(--warning); }
.impersonate-banner .btn {
    background: var(--warning);
    color: #1a1500;
    border: none;
    font-weight: 700;
}
.impersonate-banner .btn:hover { transform: translateY(-1px); }

.admin-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.admin-shortcut {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 140ms ease, transform 140ms ease;
    backdrop-filter: blur(8px);
}
.admin-shortcut:hover {
    border-color: var(--warning);
    transform: translateY(-2px);
}
.admin-shortcut strong {
    font-family: "Sora", sans-serif;
    font-size: 1rem;
    color: var(--warning);
}
.admin-shortcut span {
    color: var(--text-secondary);
    font-size: 0.86rem;
}

/* ============================================================
   F6 — Telemetria real-time: badge + pulse de atualizacao
   ============================================================ */

.telemetria-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
    vertical-align: middle;
}
.telemetria-badge.ok {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.35);
    background: var(--success-soft);
}
.telemetria-badge.warn {
    color: var(--warning);
    border-color: rgba(251, 191, 36, 0.35);
    background: var(--warning-soft);
}
.telemetria-badge.off {
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.30);
    background: var(--danger-soft);
}

/* Pulse temporario de atualizacao */
@keyframes telemetria-flash {
    0%   { background-color: rgba(96, 165, 250, 0.30); }
    100% { background-color: transparent; }
}
.telemetria-pulse {
    animation: telemetria-flash 700ms ease-out;
}

/* Pra status-dot, faz um halo ao inves de background */
@keyframes telemetria-halo {
    0%   { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.6); }
    100% { box-shadow: 0 0 0 10px rgba(96, 165, 250, 0); }
}
.dash-placa-status.telemetria-pulse {
    animation: telemetria-halo 700ms ease-out;
}

/* ============================================================
   F8 — Soft-launch outreach cards
   ============================================================ */

.outreach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.outreach-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(8px);
}
.outreach-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.outreach-head h3 {
    font-family: "Sora", sans-serif;
    margin: 0 0 2px;
    font-size: 1rem;
}
.outreach-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.kv-list.kv-list-tight {
    padding: 10px 14px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 4px 12px;
    font-size: 0.86rem;
}
.outreach-msg {
    font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    min-height: 130px;
    background: rgba(0, 0, 0, 0.30);
    resize: vertical;
}
.outreach-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.outreach-actions .btn,
.outreach-actions form .btn {
    padding: 8px 12px;
    font-size: 0.84rem;
}

/* ============================================================
   F3.5 — CRUD forms + UX mobile-first
   ============================================================ */

/* Form wrapper — limite de largura amigavel */
.form-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 18px 90px; /* bottom 90px = espaco pro bottom nav mobile */
    width: 100%;
    box-sizing: border-box;
}

/* Forms grandes (inputs touch-friendly) */
.big-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 16px;
}

.form-input-lg {
    min-height: 48px;
    padding: 14px 16px;
    font-size: 16px; /* >= 16px evita zoom no iOS */
    border-radius: var(--radius-md);
}
.form-input.uppercase { text-transform: uppercase; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.form-group-narrow {
    max-width: 140px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
}
.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
}

/* Form card — agrupa secao de form */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 18px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.form-card-title {
    font-family: "Sora", sans-serif;
    font-size: 1.04rem;
    margin: 0 0 4px;
    color: var(--text-primary);
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.form-actions .btn {
    min-height: 48px;
    flex: 1 1 auto;
}
.form-actions-end { justify-content: flex-end; }

/* Botao danger */
.btn-danger {
    background: linear-gradient(135deg, #b91c1c, var(--danger));
    color: #fff;
    border-color: rgba(248, 113, 113, 0.4);
}
.btn-danger:hover { filter: brightness(1.08); }

/* Zona de perigo (exclusao) */
.danger-zone {
    margin-top: 28px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
}
.danger-zone summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--danger);
}
.danger-zone > p { margin: 10px 0; line-height: 1.5; }
.danger-zone code {
    background: rgba(0,0,0,0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.86em;
}

/* Status row (badge + texto inline) */
.status-row {
    display: flex; gap: 10px; align-items: center;
    margin-bottom: 8px; flex-wrap: wrap;
}

.kv-bare {
    list-style: none;
    padding: 0; margin: 8px 0;
    display: flex; flex-direction: column; gap: 8px;
}
.kv-bare li {
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.03);
}
.kv-bare li code {
    background: rgba(0,0,0,0.3);
    padding: 1px 5px; border-radius: 4px;
    font-size: 0.84em;
}

/* FAB — Floating Action Button (mobile primary) */
.fab {
    position: fixed;
    right: 18px;
    bottom: 84px;          /* acima do bottom nav */
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: #fff;
    box-shadow: 0 10px 30px rgba(29, 78, 216, 0.45), 0 4px 8px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 50;
    transition: transform 140ms ease, box-shadow 140ms ease;
}
.fab:hover { transform: translateY(-2px) scale(1.04); }
.fab:active { transform: translateY(0) scale(0.98); }
.fab svg { width: 26px; height: 26px; }

/* Bottom Nav mobile — fixo na base */
.app-bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    display: none; /* default desktop */
    background: rgba(5, 11, 26, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    z-index: 49;
    padding-bottom: env(safe-area-inset-bottom);
}
.app-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 120ms ease;
    min-height: 56px;
}
.app-bottom-nav a svg {
    width: 22px; height: 22px;
}
.app-bottom-nav a.is-active {
    color: var(--brand-light);
}
.app-bottom-nav a:hover { color: var(--text-primary); }

/* Hides only on mobile */
.hide-on-mobile { display: initial; }

/* Shows only on mobile */
.show-on-mobile { display: none; }

@media (max-width: 720px) {
    .app-topbar-links { display: none; }
    .app-bottom-nav { display: flex; }
    .app-main, body.app-body { padding-bottom: 70px; }
    .hide-on-mobile { display: none !important; }
    .show-on-mobile { display: flex !important; }
    .form-actions .btn { font-size: 0.92rem; }
    .page-head-actions .btn { font-size: 0.86rem; padding: 8px 12px; }
}

@media (max-width: 520px) {
    .form-wrap { padding: 18px 14px 90px; }
    .form-card { padding: 14px 14px; border-radius: var(--radius-md); }
    .form-row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   F3.6 — Mapa (Leaflet) pra lojas
   ============================================================ */

.loja-map-wrap {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    margin-bottom: 6px;
}
#loja-map, #loja-map-readonly {
    width: 100%;
    height: 360px;
}
.loja-map-wrap-ro #loja-map-readonly {
    height: 280px;
}

.map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.map-actions .btn {
    padding: 8px 12px;
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
}
.map-actions .btn svg { flex-shrink: 0; }

.map-status {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 999px;
    transition: background 200ms ease, color 200ms ease;
}
.map-status.ok {
    color: var(--success);
    background: var(--success-soft);
}
.map-status.warn {
    color: var(--warning);
    background: var(--warning-soft);
}
.map-status.off {
    color: var(--danger);
    background: var(--danger-soft);
}

/* Leaflet overrides pra combinar com o tema */
.leaflet-container {
    font-family: inherit;
    background: var(--bg-card-solid);
}
.leaflet-control-attribution {
    background: rgba(5, 11, 26, 0.72) !important;
    color: var(--text-muted) !important;
    font-size: 0.66rem !important;
    backdrop-filter: blur(6px);
}
.leaflet-control-attribution a { color: var(--brand-light) !important; }
.leaflet-control-zoom a {
    background: rgba(5, 11, 26, 0.85) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--brand-soft) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--bg-card-solid) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

@media (max-width: 520px) {
    #loja-map, #loja-map-readonly { height: 300px; }
}

/* ============================================================
   F3.7 — Maquinas online (cards grandes real-time) + cartao
   ============================================================ */

.online-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.online-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 200ms ease, background 200ms ease, transform 140ms ease;
    position: relative;
}
.online-card-on {
    border-color: rgba(52, 211, 153, 0.35);
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), var(--bg-card) 60%);
}
.online-card-on::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--success), rgba(52, 211, 153, 0.2));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.online-card-off { opacity: 0.7; }
.online-card-off:hover { opacity: 1; }

.online-card-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.online-card-titles {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.online-card-titles a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.online-pulse {
    width: 14px; height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    background: var(--text-muted);
    opacity: 0.4;
    transition: background 200ms ease, opacity 200ms ease;
}
.online-pulse.dash-placa-status-on {
    background: var(--success);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
    animation: online-pulse 2s ease-in-out infinite;
}
@keyframes online-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.online-card-kv {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin: 0;
}
.online-card-kv > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.online-card-kv dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
}
.online-card-kv dd {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.online-count {
    color: var(--success);
    font-weight: 700;
}

/* FAB em form (pra rotas POST como sync de cartao) */
.fab-form {
    position: fixed;
    right: 18px;
    bottom: 84px;
    z-index: 50;
    margin: 0;
}
.fab-form .fab {
    position: static;
}

@media (max-width: 520px) {
    .online-card { padding: 14px 14px; }
    .online-card-kv { grid-template-columns: 1fr; }
    .app-topbar-links { display: none; }
}

/* =====================================================================
   POLISH v1.1 — sistema mais profissional, melhor separacao
   ===================================================================== */

:root {
    /* tokens de espaco */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-10: 56px;
    --space-12: 72px;
    /* divisores */
    --divider-soft: linear-gradient(90deg, transparent, var(--border) 25%, var(--border) 75%, transparent);
}

/* ---- container do app: respira melhor em desktop ---- */
.dash-wrap {
    padding: 40px 32px 80px;
    max-width: 1180px;
}
@media (min-width: 1024px) {
    .dash-wrap { padding: 56px 40px 96px; }
}

/* ---- page-head v2 (substitui auth-kicker reuso) ---- */
.page-head-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-6);
    flex-wrap: wrap;
    padding-bottom: var(--space-7);
    margin-bottom: var(--space-8);
    position: relative;
}
.page-head-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--divider-soft);
}
.page-head-text { min-width: 0; flex: 1 1 320px; }
.page-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    flex-shrink: 0;
}
.page-eyebrow,
.auth-kicker {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--brand-light);
    margin-bottom: 10px;
}
.page-eyebrow {
    background: var(--brand-soft);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.25);
}
.page-head-hero h1 {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-3);
    color: var(--text-primary);
}
.page-head-hero .lead {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0;
    max-width: 640px;
}

/* ---- status pill enhancements ---- */
.status-pill-ok {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.32);
    background: var(--success-soft);
}

/* ---- section divider — separa secoes grandes ---- */
.section-divider {
    margin: var(--space-10) 0 var(--space-7);
    height: 1px;
    background: var(--divider-soft);
    border: 0;
}

/* ---- dash sections com mais respiro ---- */
.dash-section { margin-top: var(--space-10); }
.dash-section-head {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-soft);
}
.dash-section-head h2 {
    font-size: 1.32rem;
    letter-spacing: -0.01em;
}

/* ---- dash cards: hover sutil + accent topo ---- */
.dash-card {
    position: relative;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    overflow: hidden;
}
.dash-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-light), transparent);
    opacity: 0;
    transition: opacity 200ms ease;
}
.dash-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.dash-card:hover::before { opacity: 0.7; }
.dash-card-label {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}
.dash-card-value {
    font-size: 1.85rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.dash-card-hint a {
    color: var(--brand-light);
    text-decoration: none;
    font-weight: 600;
}
.dash-card-hint a:hover { text-decoration: underline; }

/* ---- KPI hero pra pagamentos / valores recebidos ---- */
.kpi-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-5);
    margin: 0 0 var(--space-8);
    padding: var(--space-7) var(--space-7);
    background:
        radial-gradient(at 0% 0%, rgba(230, 191, 63, 0.10), transparent 55%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.10), transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.kpi-hero::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(230, 191, 63, 0.35), rgba(96, 165, 250, 0.20) 60%, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.kpi-hero-main { position: relative; }
.kpi-hero-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-2);
}
.kpi-hero-value {
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}
.kpi-hero-hint {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: var(--space-3) 0 0;
}
.kpi-hero-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-3);
    padding-left: var(--space-6);
    border-left: 1px solid var(--border-soft);
    position: relative;
}
.kpi-hero-aside-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-3);
    font-size: 0.92rem;
}
.kpi-hero-aside-row dt {
    color: var(--text-muted);
    font-weight: 500;
}
.kpi-hero-aside-row dd {
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
    .kpi-hero { grid-template-columns: 1fr; padding: var(--space-6); }
    .kpi-hero-aside {
        padding-left: 0; padding-top: var(--space-5);
        border-left: 0; border-top: 1px solid var(--border-soft);
    }
}

/* ---- data-table mais respiravel + hover row ---- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.data-table thead th {
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 0.94rem;
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr {
    transition: background 140ms ease;
}
.data-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.04);
}
.data-table td .badge { vertical-align: middle; }
.data-table .amount {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text-primary);
}
.data-table .amount-ok { color: var(--success); }
.data-table .amount-pending { color: var(--warning); }
.data-table .th-right,
.data-table .td-right { text-align: right; }

/* ---- chips de filtro por protocolo (legacy vs MQTT) — /placas ---- */
.protocol-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 var(--space-4);
}
.protocol-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.protocol-chip:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}
.protocol-chip.is-active {
    border-color: rgba(96, 165, 250, 0.55);
    background: var(--brand-soft);
    color: var(--brand-light);
}
.protocol-chip-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.protocol-chip.is-active .protocol-chip-count {
    background: rgba(96, 165, 250, 0.20);
    color: var(--brand-light);
}
.protocol-chip-legacy.is-active {
    border-color: rgba(96, 165, 250, 0.55);
    background: rgba(96, 165, 250, 0.10);
}
.protocol-chip-mqtt.is-active {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.10);
    color: #10b981;
}
.protocol-chip-mqtt.is-active .protocol-chip-count {
    background: rgba(16, 185, 129, 0.20);
    color: #10b981;
}
.protocol-chip-legacy .protocol-dot { background: var(--brand-light); }
.protocol-chip-mqtt .protocol-dot { background: #10b981; }

.protocol-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Grid 2-col pra detail de placa MQTT (acoes esquerda, info direita) */
.placa-detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-5);
    margin-top: var(--space-5);
}
@media (max-width: 920px) {
    .placa-detail-grid { grid-template-columns: 1fr; }
}
.raw-json-wrap {
    margin-top: 8px;
}
.raw-json-wrap summary {
    cursor: pointer;
    padding: 4px 0;
}
.raw-json {
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
    font-size: 0.82rem;
    color: var(--brand-light);
    overflow-x: auto;
    max-height: 320px;
}

/* Tela de sucesso pos-cadastro placa MQTT */
.mqtt-result-card {
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-7);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.mqtt-result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
}
.mqtt-result-header h2 {
    font-family: "Sora", sans-serif;
    font-size: 1.3rem;
    margin: 0;
    color: var(--text-primary);
}
.mqtt-result-header p {
    margin: 4px 0 0;
    font-size: 0.94rem;
}
.mqtt-result-ico {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.mqtt-result-ico svg { width: 28px; height: 28px; }
.mqtt-section-title {
    font-family: "Sora", sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 22px 0 10px;
}
.mqtt-result-kv code {
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.86rem;
}
.mqtt-result-kv .mqtt-copyable {
    transition: color 160ms ease, background 160ms ease;
}
.mqtt-result-kv .mqtt-copyable:hover {
    background: var(--brand-soft);
    color: var(--brand-light);
}
.mqtt-password-claro {
    background: rgba(0, 158, 230, 0.12) !important;
    border: 1px solid rgba(0, 158, 230, 0.30);
    color: #00b1ea !important;
    font-weight: 700;
    word-break: break-all;
}
.mqtt-result-json {
    margin-top: 22px;
    padding: 12px 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
}
.mqtt-result-json summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.mqtt-result-json pre {
    margin: 14px 0 10px;
    max-height: 360px;
    overflow: auto;
}

/* Badge inline na coluna "Tipo" da tabela */
.badge-protocol {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-protocol-legacy {
    color: var(--brand-light);
    background: var(--brand-soft);
    border-color: rgba(96, 165, 250, 0.30);
}
.badge-protocol-mqtt {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.30);
}
.badge-protocol .protocol-dot {
    width: 6px; height: 6px;
}
.badge-protocol-legacy .protocol-dot { background: var(--brand-light); }
.badge-protocol-mqtt .protocol-dot {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* ---- icones de acao inline em tabelas (ver/editar/excluir) ---- */
.data-table .td-actions { white-space: nowrap; text-align: right; }
.row-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
.row-action-form { display: inline; margin: 0; padding: 0; }
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
    text-decoration: none;
}
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon:hover { transform: translateY(-1px); }
.btn-icon:active { transform: translateY(0); }
.btn-icon:focus-visible {
    outline: 2px solid var(--brand-light);
    outline-offset: 2px;
}
.btn-icon-ghost:hover {
    color: var(--brand-light);
    background: var(--brand-soft);
    border-color: rgba(96, 165, 250, 0.45);
}
.btn-icon-edit:hover {
    color: var(--gold);
    background: var(--gold-soft);
    border-color: rgba(230, 191, 63, 0.45);
}
.btn-icon-danger:hover {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(248, 113, 113, 0.50);
}
@media (max-width: 640px) {
    .btn-icon { width: 32px; height: 32px; }
    .row-actions { gap: 4px; }
}

/* ---- badges refinados ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-ok {
    color: var(--success);
    background: var(--success-soft);
    border-color: rgba(52, 211, 153, 0.32);
}
.badge-warn {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: rgba(251, 191, 36, 0.32);
}
.badge-off {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

/* ---- form-card respiraveis ---- */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    margin-bottom: var(--space-6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 180ms ease;
}
.form-card:hover { border-color: var(--border-strong); }
.form-card-title {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 1.16rem;
    margin: 0 0 var(--space-5);
    color: var(--text-primary);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-soft);
    letter-spacing: -0.01em;
}

/* ---- filter-bar mais profissional ---- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}
.filter-field > span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
.filter-clear {
    color: var(--text-muted);
    font-size: 0.84rem;
    text-decoration: none;
    align-self: center;
    padding: 8px 6px;
    transition: color 140ms ease;
}
.filter-clear:hover { color: var(--danger); }

/* ---- pagination refinement ---- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-7);
    flex-wrap: wrap;
}
.pagination-state {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

/* ---- footer das paginas ---- */
.dash-foot {
    margin-top: var(--space-10);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ---- topbar nav mais elegante ---- */
.app-topbar-links {
    display: flex;
    gap: var(--space-1);
    align-items: center;
    flex: 1;
    justify-content: center;
}
.app-topbar-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 140ms ease, background 140ms ease;
}
.app-topbar-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.app-topbar-links a.is-active {
    color: var(--text-primary);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.30);
}
.app-topbar-links a.admin-link {
    color: var(--gold);
}
.app-topbar-links a.admin-link.is-active {
    background: var(--gold-soft);
    box-shadow: inset 0 0 0 1px rgba(230, 191, 63, 0.40);
}

@media (max-width: 720px) {
    .dash-wrap { padding: 24px 16px 84px; }
    .page-head-hero { padding-bottom: var(--space-5); margin-bottom: var(--space-6); }
    .page-head-hero h1 { font-size: 1.5rem; }
    .form-card { padding: var(--space-5); }
    .data-table thead th,
    .data-table tbody td { padding: 10px 12px; font-size: 0.86rem; }
}

/* =====================================================================
   APP LAUNCHER v1.2 — "Area de trabalho" premium
   ===================================================================== */

.launcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-10);
}

.launcher-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-6);
    background:
        radial-gradient(at 0% 0%, rgba(96, 165, 250, 0.08), transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    text-decoration: none;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    transition:
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
        border-color 260ms ease,
        box-shadow 260ms ease,
        background 260ms ease;
    overflow: hidden;
    min-height: 110px;
}
.launcher-card::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.32), rgba(230, 191, 63, 0.16) 50%, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 260ms ease;
}
.launcher-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(96, 165, 250, 0.10), transparent 60%);
    opacity: 0;
    transition: opacity 260ms ease;
    pointer-events: none;
    border-radius: var(--radius-xl);
}
.launcher-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.45),
        0 0 32px rgba(96, 165, 250, 0.10);
}
.launcher-card:hover::before { opacity: 1; }
.launcher-card:hover::after { opacity: 1; }
.launcher-card:active { transform: translateY(-1px); }

.launcher-card-ico {
    position: relative;
    width: 56px; height: 56px;
    border-radius: var(--radius-lg);
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(29, 78, 216, 0.08));
    border: 1px solid rgba(96, 165, 250, 0.22);
    flex-shrink: 0;
    color: var(--brand-light);
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), background 260ms ease;
}
.launcher-card-ico svg {
    width: 28px; height: 28px;
    stroke: currentColor;
}
.launcher-card:hover .launcher-card-ico {
    transform: scale(1.05) rotate(-2deg);
}

.launcher-card-body { min-width: 0; }
.launcher-card-body h3 {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}
.launcher-card-body p {
    color: var(--text-muted);
    font-size: 0.86rem;
    margin: 0;
    line-height: 1.4;
}
.launcher-card-body p strong {
    color: var(--success);
    font-weight: 700;
}

.launcher-card-arrow {
    color: var(--text-muted);
    font-size: 1.4rem;
    font-weight: 300;
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), color 260ms ease;
    flex-shrink: 0;
}
.launcher-card:hover .launcher-card-arrow {
    color: var(--brand-light);
    transform: translateX(4px);
}

/* Variants */
.launcher-card-primary .launcher-card-ico {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.30), rgba(29, 78, 216, 0.18));
    border-color: rgba(96, 165, 250, 0.40);
    color: var(--brand-light);
    box-shadow: inset 0 0 12px rgba(96, 165, 250, 0.10);
}

.launcher-card-accent .launcher-card-ico {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.28), rgba(20, 137, 92, 0.15));
    border-color: rgba(52, 211, 153, 0.40);
    color: var(--success);
}
.launcher-card-accent .launcher-card-ico-pulse {
    position: absolute;
    inset: -6px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--success);
    opacity: 0;
    animation: launcher-pulse 2.4s ease-out infinite;
}
@keyframes launcher-pulse {
    0%   { transform: scale(0.95); opacity: 0.55; }
    70%  { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1.15); opacity: 0; }
}

.launcher-card-gold .launcher-card-ico {
    background: linear-gradient(135deg, rgba(230, 191, 63, 0.30), rgba(184, 134, 11, 0.18));
    border-color: rgba(230, 191, 63, 0.40);
    color: var(--gold);
    box-shadow: inset 0 0 14px rgba(230, 191, 63, 0.14);
}
.launcher-card-gold::before {
    background: linear-gradient(135deg, rgba(230, 191, 63, 0.40), rgba(96, 165, 250, 0.18) 60%, transparent);
}

.launcher-card-admin {
    border-color: rgba(230, 191, 63, 0.30);
}
.launcher-card-admin .launcher-card-ico {
    background: linear-gradient(135deg, rgba(230, 191, 63, 0.20), rgba(184, 134, 11, 0.10));
    border-color: rgba(230, 191, 63, 0.35);
    color: var(--gold);
}
.launcher-card-admin .launcher-card-body h3 {
    color: var(--gold-light);
}

/* ---- MERCADO PAGO card (sempre destacado) ---- */
.launcher-card-mp {
    /* Borda colorida MP-style */
    border-color: rgba(0, 158, 230, 0.45);
    background:
        radial-gradient(at 0% 0%, rgba(0, 158, 230, 0.14), transparent 60%),
        radial-gradient(at 100% 100%, rgba(255, 230, 0, 0.10), transparent 60%),
        var(--bg-card);
}
.launcher-card-mp::before {
    background: linear-gradient(135deg, rgba(0, 158, 230, 0.55), rgba(255, 230, 0, 0.25) 60%, transparent);
    opacity: 0.75;
}
.launcher-card-mp:hover {
    border-color: rgba(0, 158, 230, 0.80);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.45),
        0 0 32px rgba(0, 158, 230, 0.25);
}
.launcher-card-mp .launcher-card-ico {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    overflow: visible;
}
.launcher-card-mp .launcher-card-ico svg {
    width: 56px; height: 56px;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(0, 158, 230, 0.35);
}
.launcher-card-mp:hover .launcher-card-ico {
    transform: scale(1.06) rotate(-3deg);
}
.launcher-card-mp .launcher-card-body h3 {
    color: #fff;
}

/* Badge de status (canto superior direito do icone MP) */
.launcher-card-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 22px; height: 22px;
    padding: 0 6px;
    display: grid; place-items: center;
    border-radius: 999px;
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
    line-height: 1;
    border: 2px solid var(--bg-card-solid);
}
.launcher-card-badge-ok {
    background: var(--success);
    color: #052e1a;
}
.launcher-card-badge-warn {
    background: var(--warning);
    color: #4a2c00;
    animation: launcher-badge-bounce 1.6s ease-out infinite;
}
@keyframes launcher-badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

/* Conectado: tinta verde sutil + mensagem positiva */
.launcher-card-mp-connected {
    border-color: rgba(52, 211, 153, 0.35);
}
.launcher-card-mp-connected .launcher-card-body p strong {
    color: var(--success);
}

/* Desconectado: pulsa borda azul MP pra chamar atencao */
.launcher-card-mp-disconnected {
    animation: launcher-mp-pulse 2.6s ease-out infinite;
}
@keyframes launcher-mp-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(0, 158, 230, 0.45),
            0 12px 28px rgba(0, 0, 0, 0.35);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(0, 158, 230, 0),
            0 14px 32px rgba(0, 158, 230, 0.30);
    }
}
.launcher-card-mp-disconnected .launcher-card-body p strong {
    color: #ffe066;
}

/* Form wrapper pra renderizar como card clicavel */
.launcher-form {
    margin: 0;
    padding: 0;
    display: contents;
}
.launcher-form button.launcher-card {
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
    /* reset button defaults */
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.launcher-form button.launcher-card:focus-visible {
    outline: 2px solid var(--brand-light);
    outline-offset: 2px;
}

/* ---- emerald variant (pagamentos) ---- */
.launcher-card-emerald .launcher-card-ico {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.12));
    border-color: rgba(16, 185, 129, 0.36);
    color: #10b981;
}

/* =====================================================================
   /configuracao — secao Mercado Pago explicita
   ===================================================================== */

.mp-section { border-color: rgba(0, 158, 230, 0.30); }
.mp-section .form-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mp-section-icon {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 158, 230, 0.30);
    flex-shrink: 0;
}
.mp-section-icon svg { width: 36px; height: 36px; border-radius: 50%; display: block; }

/* status card (ok / warn / etc) */
.mp-state {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    margin: 0 0 18px;
}
.mp-state-ok {
    background: var(--success-soft);
    border-color: rgba(52, 211, 153, 0.40);
    color: #bbf7d0;
}
.mp-state-warn {
    background: var(--warning-soft);
    border-color: rgba(251, 191, 36, 0.45);
    color: #fef3c7;
}
.mp-state-ico {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    line-height: 1;
}
.mp-state-ok .mp-state-ico {
    background: rgba(52, 211, 153, 0.30);
    color: #052e1a;
}
.mp-state-ok .mp-state-ico svg { width: 22px; height: 22px; color: #052e1a; }
.mp-state-warn .mp-state-ico {
    background: rgba(251, 191, 36, 0.40);
    color: #4a2c00;
}
.mp-state-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.mp-state-body strong {
    font-family: "Sora", sans-serif;
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.mp-state-body span {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

/* passo-a-passo */
.mp-steps {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mp-steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.97rem;
}
.mp-steps li strong { color: var(--text-primary); }
.mp-step-n {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #009ee3, #00729f);
    color: #fff;
    display: grid; place-items: center;
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(0, 158, 230, 0.30);
}

/* botao "Clique aqui pra conectar" — GIGANTE e explicito */
.mp-connect-form {
    margin: 22px 0 0;
}
.btn-mp-connect {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #00b1ea 0%, #009ee3 45%, #0084c2 100%);
    color: #fff;
    border: 0;
    border-radius: var(--radius-xl);
    cursor: pointer;
    text-align: left;
    box-shadow:
        0 14px 30px rgba(0, 158, 230, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease, filter 220ms ease;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    font-size: inherit;
}
.btn-mp-connect::before {
    /* brilho leve no fundo */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(at 0% 0%, rgba(255, 230, 0, 0.20), transparent 50%);
    pointer-events: none;
}
.btn-mp-connect:hover {
    transform: translateY(-2px);
    box-shadow:
        0 22px 40px rgba(0, 158, 230, 0.50),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    filter: brightness(1.05);
}
.btn-mp-connect:active { transform: translateY(0); }
.btn-mp-connect:focus-visible {
    outline: 3px solid #ffe600;
    outline-offset: 3px;
}
.btn-mp-connect-ico {
    flex-shrink: 0;
    width: 52px; height: 52px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.btn-mp-connect-ico svg { width: 44px; height: 44px; border-radius: 50%; }
.btn-mp-connect-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.btn-mp-connect-text strong {
    font-family: "Sora", sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.btn-mp-connect-text small {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.86rem;
    font-weight: 500;
}
.btn-mp-connect-arrow {
    flex-shrink: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: #fff;
    opacity: 0.9;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-mp-connect:hover .btn-mp-connect-arrow {
    transform: translateX(6px);
    opacity: 1;
}

/* pulse animation pra chamar atencao quando nao conectado */
.mp-state-warn + .mp-steps + .mp-connect-form .btn-mp-connect {
    animation: btn-mp-pulse 2.8s ease-out infinite;
}
@keyframes btn-mp-pulse {
    0%, 100% {
        box-shadow:
            0 14px 30px rgba(0, 158, 230, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.20),
            0 0 0 0 rgba(0, 158, 230, 0.55);
    }
    50% {
        box-shadow:
            0 14px 30px rgba(0, 158, 230, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.20),
            0 0 0 10px rgba(0, 158, 230, 0);
    }
}

.mp-help {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-soft);
}
.mp-help a {
    color: var(--brand-light);
    text-decoration: none;
    font-weight: 600;
}
.mp-help a:hover { text-decoration: underline; }

/* Tip sutil pra quem ja esta conectado mas pode atualizar (refresh automatico) */
.mp-tip {
    padding: 16px 18px;
    background: rgba(96, 165, 250, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.20);
    border-radius: var(--radius-md);
}
.mp-tip-body strong {
    display: block;
    font-family: "Sora", sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.mp-tip-body span {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Token card: mostra dados completos da conexao MP + acao Renovar */
.mp-token-card {
    margin-top: 18px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.mp-token-title {
    font-family: "Sora", sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 0 0 14px;
}
.mp-token-kv code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.86rem;
}
.mp-token-preview {
    font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.84rem;
    color: var(--text-secondary);
}
.mp-token-full {
    display: none;
    word-break: break-all;
    font-size: 0.78rem;
    margin: 6px 0 0;
    padding: 8px 10px;
    background: rgba(0, 158, 230, 0.08);
    border: 1px solid rgba(0, 158, 230, 0.20);
    border-radius: 4px;
    color: var(--brand-light);
}
.btn-icon-mini {
    margin-left: 6px;
    padding: 3px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    background: var(--brand-soft);
    color: var(--brand-light);
    border: 1px solid rgba(96, 165, 250, 0.30);
    border-radius: 6px;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}
.btn-icon-mini:hover {
    background: rgba(96, 165, 250, 0.20);
    border-color: rgba(96, 165, 250, 0.50);
}
.mp-token-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* Versao compacta do botao MP (pra quando ja esta conectado e oferece upgrade) */
.btn-mp-connect-compact {
    padding: 14px 18px;
    box-shadow:
        0 8px 18px rgba(0, 158, 230, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    /* sem pulse — oferta opcional, nao urgente */
    animation: none !important;
}
.btn-mp-connect-compact .btn-mp-connect-ico {
    width: 40px; height: 40px;
}
.btn-mp-connect-compact .btn-mp-connect-ico svg { width: 32px; height: 32px; }
.btn-mp-connect-compact .btn-mp-connect-text strong { font-size: 1rem; }

@media (max-width: 560px) {
    .btn-mp-connect { padding: 18px 18px; gap: 14px; flex-wrap: wrap; }
    .btn-mp-connect-ico { width: 44px; height: 44px; }
    .btn-mp-connect-ico svg { width: 36px; height: 36px; }
    .btn-mp-connect-text strong { font-size: 1rem; }
    .btn-mp-connect-arrow { display: none; }
}

/* Mini KPI cards (under launcher) — versao compacta dos dash-card */
.dash-card-mini {
    padding: var(--space-4) var(--space-5);
}
.dash-card-mini .dash-card-value {
    font-size: 1.5rem;
}

/* ---- Banner MP "Conecte sua conta Mercado Pago" (top do dashboard) ---- */
.mp-cta-banner {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-7);
    background:
        radial-gradient(at 0% 50%, rgba(0, 158, 230, 0.18), transparent 60%),
        radial-gradient(at 100% 50%, rgba(252, 200, 0, 0.12), transparent 60%),
        rgba(0, 158, 230, 0.10);
    border: 1px solid rgba(0, 158, 230, 0.35);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease, box-shadow 200ms ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.mp-cta-banner:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 158, 230, 0.65);
    box-shadow: 0 16px 36px rgba(0, 158, 230, 0.18);
}
.mp-cta-banner-ico {
    width: 48px; height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #009ee3, #00729f);
    display: grid; place-items: center;
    color: #fff;
}
.mp-cta-banner-ico svg { width: 26px; height: 26px; }
.mp-cta-banner-body {
    display: flex; flex-direction: column;
    gap: 2px; flex: 1; min-width: 0;
}
.mp-cta-banner-body strong {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 1.04rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.mp-cta-banner-body span {
    color: var(--text-secondary);
    font-size: 0.88rem;
}
@media (max-width: 640px) {
    .mp-cta-banner { flex-wrap: wrap; gap: var(--space-3); }
    .mp-cta-banner .btn { width: 100%; justify-content: center; }
}

/* ---- Creditos: preview card + presets ---- */
.creditos-wrap {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
    align-items: start;
}
@media (max-width: 900px) {
    .creditos-wrap { grid-template-columns: 1fr; }
}
.creditos-placa-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: rgba(96, 165, 250, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.20);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}
.creditos-placa-preview > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.creditos-placa-saldo {
    font-family: "Sora", sans-serif;
    font-size: 1.4rem;
    color: var(--success);
    font-variant-numeric: tabular-nums;
}
.creditos-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
}
.creditos-preset {
    padding: var(--space-4) var(--space-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 0.96rem;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.creditos-preset:hover {
    background: var(--brand-soft);
    border-color: rgba(96, 165, 250, 0.45);
    color: var(--brand-light);
    transform: translateY(-1px);
}
.creditos-preset:active { transform: translateY(0); }

@media (max-width: 720px) {
    .launcher-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    .launcher-card {
        padding: var(--space-5);
        min-height: 92px;
    }
    .launcher-card-ico { width: 48px; height: 48px; }
    .launcher-card-ico svg { width: 24px; height: 24px; }
    .launcher-card-body h3 { font-size: 1.02rem; }
}

/* ---- Google login button + divisor "ou com email" ---- */
.btn-google {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-weight: 600;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.btn-google:hover {
    background: #f8fafc;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    color: #111827;
    border-color: #ffffff;
}
.btn-google .ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    padding: 0 14px;
}

