:root {
    --bg: #F4F7F5;
    --card: #FFFFFF;
    --ink: #13231E;
    --muted: #5C6B64;
    --line: #E3EAE6;
    --brand: #065F46;
    --brand-2: #0E7C66;
    --accent: #059669;
    --accent-dark: #047857;
    --accent-soft: #ECFDF5;
    --ok: #047857;
    --alerta: #F97316;
    --alerta-bg: #FFF4ED;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(16,40,32,.10);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    overflow-x: hidden;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: "Poppins", "Inter", system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.2rem; }
.muted { color: var(--muted); }

/* Topbar */
.topbar { background: var(--brand); color: #fff; }
.topbar-inner { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.2rem; }
.brand { display: inline-flex; align-items: center; font-size: 1.45rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.brand .brand-mark { width: 1.7em; height: 1.7em; flex: 0 0 auto; margin-right: .5rem; }
.brand span { color: #6ee7b7; }
.tagline { color: #b9d8cd; font-size: .85rem; }

.topnav { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.topnav a { color: #d7eee5; font-size: .9rem; font-weight: 500; }
.topnav a:hover { color: #fff; }
.topnav-user { color: #9cc3b6; font-size: .82rem; }
.link-btn { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; padding: .35rem .8rem; border-radius: 999px; cursor: pointer; font-size: .85rem; }
.link-btn:hover { background: rgba(255,255,255,.22); }
.sino { position: relative; display: inline-flex; align-items: center; font-size: 1.15rem; line-height: 1; text-decoration: none; }
.sino-badge { position: absolute; top: -.45rem; left: .75rem; background: var(--alerta); color: #fff; font-size: .65rem; font-weight: 700; line-height: 1; padding: .15rem .32rem; border-radius: 999px; min-width: 1rem; text-align: center; }

/* Faixa anti-golpe global */
.faixa-aviso { background: var(--alerta-bg); border-bottom: 1px solid #f6dcc4; color: #9a4a12; font-size: .82rem; }
.faixa-aviso .container { padding-top: .45rem; padding-bottom: .45rem; }
.faixa-aviso a { color: #9a4a12; font-weight: 700; text-decoration: underline; }

/* Hero full-bleed */
.hero {
    width: 100vw; margin-left: calc(50% - 50vw);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 70%, #12a07e 100%);
    color: #fff; padding: 2.6rem 0 2.2rem;
}
.hero-inner { max-width: 1140px; margin: 0 auto; padding: 0 1.2rem; }
.hero h1 { font-size: 2.2rem; font-weight: 800; margin: 0 0 .5rem; letter-spacing: -.02em; line-height: 1.12; }
.hero .sub { color: #d6efe6; font-size: 1.05rem; margin: 0 0 1.4rem; max-width: 640px; }

/* Card de busca */
.search-card { background: var(--card); color: var(--ink); border-radius: 16px; box-shadow: 0 18px 40px rgba(4,30,22,.22); padding: 1.1rem; }
.search-card .filtros { background: transparent; border: none; padding: 0; }
.search-card .sep { height: 1px; background: var(--line); margin: .9rem 0; }
.search-card-label { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: .35rem; }

/* Atalhos de categoria */
.cat-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.cat-chip { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff; padding: .45rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.cat-chip:hover { background: rgba(255,255,255,.28); }

/* Faixa de confiança + alerta */
.trust-band { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.6rem 0 0; }
.trust-item { flex: 1 1 200px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; display: flex; gap: .6rem; align-items: center; font-size: .9rem; }
.trust-item .ic { font-size: 1.3rem; }
.alerta-golpe { margin-top: 1rem; background: var(--alerta-bg); border: 1px solid #f6dcc4; border-left: 4px solid var(--alerta); border-radius: 10px; padding: .8rem 1rem; color: #8a4412; font-size: .9rem; }
.alerta-golpe strong { color: #7a3a0f; }
.alvo-banner { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; margin-top: 1.4rem; background: var(--accent-soft); border: 1px solid #bfe6d6; border-left: 4px solid var(--accent); border-radius: 10px; padding: .8rem 1rem; color: #0c4a37; font-size: .92rem; }
.alvo-banner a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.alvo-banner-erro { background: var(--alerta-bg); border-color: #f6dcc4; border-left-color: var(--alerta); color: #8a4412; }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; gap: .7rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; align-items: end; }
.filtros > div { flex: 1 1 150px; }
.filtros > div.busca { flex: 2 1 220px; }
.filtros > button { flex: 0 0 auto; }
.filtros label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; }
.filtros input, .filtros select { width: 100%; padding: .58rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; background: #fff; color: var(--ink); }
.filtros input:focus, .filtros select:focus, .ac-input:focus, .auth-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filtros button { background: var(--accent); color: #fff; border: none; padding: .62rem 1.4rem; border-radius: 999px; cursor: pointer; font-size: .92rem; font-weight: 600; height: 42px; }
.filtros button:hover { background: var(--accent-dark); }
.filtros button:disabled { opacity: .5; cursor: default; }

.resumo { color: var(--muted); font-size: .92rem; margin: 1.4rem 0 1rem; }
.section-title { font-size: 1.3rem; margin: 1.6rem 0 .2rem; }

/* Grid de cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.2rem; }
.lote-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .14s, box-shadow .14s; }
.lote-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfe7dd; }
.lote-card .foto { aspect-ratio: 4/3; background: #e9efeb center/cover no-repeat; }
.lote-card .corpo { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.lote-card .nome { font-weight: 600; font-size: .98rem; line-height: 1.25; }
.lote-card .valor { font-size: 1.3rem; font-weight: 800; color: var(--ok); font-family: "Poppins", sans-serif; }
.lote-card .meta { color: var(--muted); font-size: .8rem; display: flex; gap: .45rem; flex-wrap: wrap; margin-top: auto; }
.chip { background: var(--accent-soft); border-radius: 999px; padding: .12rem .6rem; font-size: .74rem; color: #2f6b58; }

/* Paginação */
.paginacao { display: flex; gap: .6rem; justify-content: center; align-items: center; margin: 2rem 0; }
.paginacao a, .paginacao span, .paginacao button { padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; font-size: .9rem; }
.paginacao .disabled, .paginacao button:disabled { opacity: .4; cursor: default; }

/* Detalhe */
.detalhe { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; margin: 1.5rem 0; }
.detalhe .foto-grande { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #e9efeb; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 1.2rem; }
.detalhe h1 { margin: 0 0 .5rem; font-size: 1.7rem; }
.detalhe .preco { font-size: 2.1rem; font-weight: 800; color: var(--ok); margin: .3rem 0 1rem; font-family: "Poppins", sans-serif; }
.ficha { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ficha td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ficha td:first-child { color: var(--muted); width: 40%; }
.cta { display: inline-block; margin-top: 1.2rem; background: var(--accent); color: #fff; padding: .85rem 1.7rem; border-radius: 999px; font-weight: 700; }
.cta:hover { background: var(--accent-dark); }
.voltar { display: inline-block; margin: 1rem 0; color: var(--muted); }
.aviso-lote { margin-top: 1rem; background: var(--alerta-bg); border: 1px solid #f6dcc4; border-left: 4px solid var(--alerta); border-radius: 10px; padding: .7rem .9rem; color: #8a4412; font-size: .82rem; }

/* Calculadora de taxas */
.calc-taxas { margin: .4rem 0 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }
.calc-titulo { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 1rem; color: var(--brand); margin-bottom: .7rem; }
.calc-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .7rem; }
.calc-campo label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .25rem; }
.calc-campo input { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font-size: .92rem; background: #fff; color: var(--ink); }
.calc-campo input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.calc-resultado { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.calc-resultado span { color: var(--muted); font-size: .9rem; }
.calc-resultado strong { font-family: "Poppins", sans-serif; font-size: 1.35rem; color: var(--preco); }
.calc-detalhe { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.calc-aviso { font-size: .78rem; color: #8a4412; background: var(--alerta-bg); border-radius: 8px; padding: .55rem .7rem; margin: .8rem 0 0; line-height: 1.5; }

/* Autocomplete */
.ac { position: relative; }
.ac-input { width: 100%; padding: .58rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; background: #fff; color: var(--ink); }
.ac-list { position: absolute; z-index: 60; top: 100%; left: 0; right: 0; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; max-height: 240px; overflow-y: auto; margin: 3px 0 0; padding: .25rem; list-style: none; box-shadow: var(--shadow); }
.ac-item { padding: .45rem .6rem; border-radius: 6px; cursor: pointer; font-size: .9rem; color: var(--ink); }
.ac-item:hover, .ac-item.ativo { background: var(--accent); color: #fff; }

/* Chips de condição (marca/modelo) */
.cond-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.cond-chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: .3rem .7rem; font-size: .82rem; font-weight: 600; }
.cond-chip button { background: none; border: none; color: inherit; cursor: pointer; font-weight: 700; padding: 0; line-height: 1; }

/* Anúncios (placeholders) */
.ad-slot { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #eef2f0, #eef2f0 10px, #e9eeec 10px, #e9eeec 20px); border: 1px dashed #cdd8d2; border-radius: 12px; color: #8a978f; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.ad-leaderboard { min-height: 90px; margin: 1.4rem 0; }
.ad-rodape { min-height: 90px; margin: 0 0 1.5rem; }
.ad-retangulo { min-height: 250px; margin-top: 1.2rem; }
.ad-ingrid { min-height: 220px; grid-column: 1 / -1; }

/* Auth */
.auth-card { max-width: 420px; margin: 2.5rem auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 1.2rem; font-size: 1.5rem; }
.auth-card label { display: block; font-size: .82rem; color: var(--muted); margin: .8rem 0 .25rem; }
.auth-card input { width: 100%; padding: .62rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; }
.auth-card button { width: 100%; margin-top: 1.2rem; background: var(--accent); color: #fff; border: none; padding: .72rem; border-radius: 999px; font-size: .95rem; font-weight: 600; cursor: pointer; }
.auth-card button:hover { background: var(--accent-dark); }
.auth-link { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.auth-erro { background: #fdecea; color: #b42318; border: 1px solid #f5c6c0; border-radius: 8px; padding: .6rem .8rem; font-size: .88rem; }

/* Notificações */
.card-notif { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-top: 1rem; box-shadow: var(--shadow); }
.card-notif h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.grid-notif { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; }
.grid-notif label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; }
.grid-notif input, .grid-notif select { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; background: #fff; }
.ufs { display: flex; flex-wrap: wrap; gap: .4rem; }
.uf-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .82rem; background: #eef2f0; border-radius: 8px; padding: .25rem .5rem; cursor: pointer; }
.toolbar-notif { margin-top: 1.2rem; display: flex; gap: .6rem; }
.toolbar-notif button, .lista-notif button { border: none; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer; font-size: .9rem; }
.toolbar-notif button:first-child { background: var(--accent); color: #fff; }
button.sec { background: #eef2f0; color: var(--ink); }
button.danger { background: #b42318; color: #fff; }
.flash-notif { background: var(--accent-soft); color: var(--accent-dark); border-radius: 8px; padding: .5rem .8rem; margin-bottom: 1rem; font-size: .9rem; }
.lista-notif { display: flex; flex-direction: column; gap: .6rem; }
.item-notif { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.notif-link { text-decoration: none; color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.notif-link:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.notif-link .ver-lote { color: var(--accent); font-weight: 600; white-space: nowrap; }
.tag-novo { display: inline-block; margin-left: .4rem; background: var(--accent-soft); color: var(--accent-dark); font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 999px; vertical-align: middle; }
.row-actions { display: flex; gap: .5rem; }

.vazio { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 3rem; text-align: center; color: var(--muted); }

/* Páginas institucionais */
.inst { max-width: 760px; margin: 1.6rem auto; }
.inst h1 { font-size: 1.8rem; margin: 0 0 1rem; }
.inst h2 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
.inst p, .inst li { line-height: 1.65; color: #2c3a34; }
.inst .destaque { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 8px; padding: .9rem 1.1rem; color: #0c4a37; margin: 1.4rem 0; }
.inst .destaque a { color: #065F46; font-weight: 600; text-decoration: underline; }
.inst .destaque-alerta { background: var(--alerta-bg); border-left-color: var(--alerta); color: #8a4412; }
.inst .destaque-alerta a { color: #7a3a0f; }
.inst .passos { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: 1rem; }
.inst .passos > li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.inst .passos > li > strong { display: block; font-family: "Poppins", sans-serif; font-size: 1.05rem; color: var(--brand); margin-bottom: .3rem; }
.inst .passos > li p { margin: 0; }

/* Footer */
.footer { margin-top: 3rem; background: #0b1f19; color: #b9cbc3; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; padding: 2rem 1.2rem 1.4rem; max-width: 1140px; margin: 0 auto; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin: 0 0 .6rem; }
.footer-grid a { display: block; color: #b9cbc3; font-size: .88rem; padding: .2rem 0; }
.footer-grid a:hover { color: #fff; }
.footer-brand { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 1.3rem; color: #fff; }
.footer-brand span { color: #6ee7b7; }
.footer-bottom { border-top: 1px solid #1c3a30; padding: 1rem 1.2rem; font-size: .8rem; color: #8fa89e; max-width: 1140px; margin: 0 auto; }

@media (max-width: 760px) {
    .detalhe { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.7rem; }
    .footer-grid { grid-template-columns: 1fr; }
}

#blazor-error-ui { background: #b42318; color: #fff; bottom: 0; display: none; left: 0; padding: .8rem 1.2rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .8rem; }
