/* ==========================================================================
   ProcureProfissional - estilo base (responsivo, mobile-first)
   ========================================================================== */

:root {
    --brand: #0f766e;
    --brand-dark: #115e59;
    --brand-light: #ccfbf1;
    --accent: #f97316;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --danger: #dc2626;
    --ok: #16a34a;
    --warn: #d97706;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.05);
    --maxw: 1120px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
p { margin: 0 0 1rem; }
small { color: var(--muted); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* ---------- Botoes ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.25rem; border-radius: 10px; border: 1px solid transparent;
    font-weight: 600; font-size: .97rem; cursor: pointer; transition: .15s;
    background: var(--brand); color: #fff; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #ea580c; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #f1f5f9; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .93rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=datetime-local], input[type=search],
select, textarea {
    width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px;
    font: inherit; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--brand-light); border-color: var(--brand);
}
textarea { min-height: 110px; resize: vertical; }
.field .error { color: var(--danger); font-size: .84rem; margin-top: .3rem; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; font-weight: 400; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; flex: none; }

/* ---------- Cards ---------- */
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- Alertas / flash ---------- */
.alert { padding: .85rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; font-size: .95rem; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #f1f5f9; color: var(--muted); }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-brand { background: var(--brand-light); color: var(--brand-dark); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
table.data th, table.data td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
table.data th { background: #f8fafc; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.data tr:hover td { background: #fafafa; }

/* ---------- Header publico ---------- */
.site-header {
    background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 1.2rem; }
.nav a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, #042f2e 0%, #0f766e 55%, #14b8a6 100%); color: #fff; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; padding-top: 60px; padding-bottom: 60px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.15rem; color: #d1fae5; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.5rem; }
.hero .trust { margin-top: 1.5rem; font-size: .9rem; color: #99f6e4; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.hero-art { filter: drop-shadow(0 20px 40px rgba(0,0,0,.3)); }

.stats-bar { background: #042f2e; color: #99f6e4; }
.stats-bar .container { display: flex; justify-content: space-around; flex-wrap: wrap; padding: 22px 20px; gap: 1rem; text-align: center; }
.stats-bar strong { display: block; font-size: 1.6rem; color: #fff; }

/* ---------- Categorias ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.cat-item {
    background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem .8rem; text-align: center;
    color: var(--ink); font-weight: 600; font-size: .9rem; transition: .15s;
}
.cat-item:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.cat-item .emoji { font-size: 1.8rem; display: block; margin-bottom: .35rem; }

/* ---------- Passos ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.step::before {
    counter-increment: step; content: counter(step);
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: .8rem;
}

/* ---------- Precos ---------- */
.price-card { max-width: 420px; margin: 0 auto; text-align: center; border: 2px solid var(--brand); }
.price-card .price { font-size: 2.8rem; font-weight: 800; color: var(--brand-dark); }
.price-card .price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 1.2rem 0; text-align: left; }
.price-card li { padding: .4rem 0 .4rem 1.7rem; position: relative; }
.price-card li::before { content: "✔"; color: var(--ok); position: absolute; left: 0; font-weight: 700; }

/* ---------- Testemunhos ---------- */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.quote .stars { color: #f59e0b; letter-spacing: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: #042f2e; color: #99f6e4; padding: 40px 0 24px; margin-top: 60px; font-size: .9rem; }
.site-footer a { color: #ccfbf1; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer .disclaimer { border-top: 1px solid #0f766e; margin-top: 24px; padding-top: 18px; font-size: .82rem; color: #5eead4; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.1rem 1.3rem; max-width: 760px; margin: 0 auto;
}
.cookie-banner p { font-size: .9rem; margin-bottom: .8rem; }
.cookie-banner .cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.cookie-cats { display: flex; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 .8rem; font-size: .85rem; }

/* ---------- App shell (logado) ---------- */
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.app-side { background: #042f2e; color: #ccfbf1; padding: 1.2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-side .logo { color: #fff; margin-bottom: 1.5rem; }
.app-side nav { display: flex; flex-direction: column; gap: .15rem; }
.app-side nav a { color: #99f6e4; padding: .6rem .7rem; border-radius: 8px; font-size: .93rem; font-weight: 500; }
.app-side nav a:hover, .app-side nav a.active { background: #0f766e; color: #fff; text-decoration: none; }
.app-side .nav-group { margin-top: 1rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #5eead4; padding: 0 .7rem; }
.app-main { padding: 1.8rem clamp(1rem, 3vw, 2.4rem); max-width: 1000px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.app-mobile-head { display: none; }

/* ---------- Perfil publico ---------- */
.profile-head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.gallery img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: .2rem; font-size: 1.9rem; }
.stars-input input { display: none; }
.stars-input label { color: var(--line); cursor: pointer; }
.stars-input input:checked ~ label,
.stars-input label:hover, .stars-input label:hover ~ label { color: #f59e0b; }

/* ---------- Chat ---------- */
.chat-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; height: calc(100vh - 140px); }
.chat-list { border: 1px solid var(--line); border-radius: var(--radius); overflow-y: auto; background: #fff; }
.chat-list a { display: block; padding: .9rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.chat-list a:hover, .chat-list a.active { background: #f0fdfa; text-decoration: none; }
.chat-panel { border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; background: #f8fafc; }
.msg { max-width: 75%; padding: .55rem .85rem; border-radius: 12px; font-size: .93rem; }
.msg.them { background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: var(--brand); color: #fff; align-self: flex-end; }
.msg .t { display: block; font-size: .7rem; opacity: .7; margin-top: .2rem; }
.chat-form { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; }

/* ---------- KPIs ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.kpi .n { font-size: 1.9rem; font-weight: 800; color: var(--brand-dark); }
.kpi .l { font-size: .85rem; color: var(--muted); }

/* ---------- Progresso ---------- */
.progress { background: var(--line); border-radius: 999px; height: 10px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 960px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-side {
        position: fixed; inset: 0 30% 0 0; z-index: 80; height: 100vh;
        transform: translateX(-100%); transition: transform .2s;
    }
    .app-side.open { transform: translateX(0); }
    .app-mobile-head {
        display: flex; justify-content: space-between; align-items: center;
        background: #042f2e; color: #fff; padding: .8rem 1rem; position: sticky; top: 0; z-index: 50;
    }
    .app-mobile-head .logo { color: #fff; font-size: 1rem; }
    .app-mobile-head button { background: none; border: 0; color: #fff; font-size: 1.5rem; }
    .app-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70; }
}

@media (max-width: 820px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero .cta-row, .hero .trust { justify-content: center; }
    .hero-art { max-width: 360px; margin: 0 auto; order: -1; }
    .steps { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .site-footer .cols { grid-template-columns: 1fr; gap: 1.2rem; }
    .profile-head { grid-template-columns: 1fr; }
    .chat-wrap { grid-template-columns: 1fr; height: auto; }
    .chat-list { max-height: 220px; }
    .chat-panel { height: 65vh; }
    .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 1rem 20px; border-bottom: 1px solid var(--line); gap: .3rem; }
    .nav.open { display: flex; }
    .nav a { padding: .6rem 0; width: 100%; }
    .nav-toggle { display: block; }
}

@media (max-width: 520px) {
    .section { padding: 40px 0; }
    .card { padding: 1.15rem; }
    .btn { width: 100%; }
    .hero .cta-row .btn { width: 100%; }
    .cookie-banner .cookie-actions .btn { width: 100%; }
}
