/* ============================================================
   Radar Instagram Pro — design system (dark / premium SaaS)
   ============================================================ */

:root {
    --bg:        #0a0e1a;
    --bg-2:      #0e1424;
    --panel:     #121a2e;
    --panel-2:   #16203a;
    --border:    rgba(255,255,255,.08);
    --border-2:  rgba(255,255,255,.14);

    --text:      #e7ecf5;
    --muted:     #93a0bd;
    --faint:     #5d6b8a;

    --brand:     #3ddc97;   /* verde-radar */
    --brand-2:   #18b4ff;   /* ciano */
    --accent:    #8b5cff;   /* roxo */

    --green:     #3ddc97;
    --yellow:    #ffcf5c;
    --red:       #ff5d6c;

    --grad:      linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 55%, var(--accent) 100%);
    --radius:    16px;
    --radius-sm: 10px;
    --shadow:    0 20px 60px -25px rgba(0,0,0,.8);
    --ring:      0 0 0 3px rgba(61,220,151,.25);
    --maxw:      1120px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(139,92,255,.18), transparent 60%),
        radial-gradient(800px 500px at 0% 0%, rgba(24,180,255,.14), transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3, .brand__name { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -.02em; }

a { color: inherit; text-decoration: none; }

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

.text-grad {
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Botões ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 600; font-size: 15px; border-radius: 12px;
    padding: 13px 22px; border: 1px solid transparent; cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm  { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn--lg  { padding: 16px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--grad); color: #06121c; box-shadow: 0 12px 30px -12px rgba(61,220,151,.6); }
.btn--primary:hover { box-shadow: 0 16px 36px -10px rgba(61,220,151,.7); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { background: rgba(255,255,255,.05); }
.btn--soft { background: rgba(255,255,255,.06); color: var(--text); border-color: var(--border); }
.btn--soft:hover { background: rgba(255,255,255,.1); }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(10,14,26,.72); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; }
.brand__name { font-weight: 700; }
.brand__name strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__pulse {
    width: 12px; height: 12px; border-radius: 50%; background: var(--brand);
    box-shadow: 0 0 0 0 rgba(61,220,151,.7); animation: pulse 2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(61,220,151,.6); }
    70%  { box-shadow: 0 0 0 10px rgba(61,220,151,0); }
    100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); }
}
.topnav { display: flex; align-items: center; gap: 18px; }
.navlink { color: var(--muted); font-weight: 500; font-size: 15px; }
.navlink:hover { color: var(--text); }
.navuser { color: var(--faint); font-size: 14px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 90px 0 70px; text-align: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--brand);
    border: 1px solid var(--border-2); border-radius: 999px; padding: 7px 14px;
    background: rgba(61,220,151,.06); margin-bottom: 26px;
}
.hero h1 { font-size: clamp(32px, 6vw, 60px); line-height: 1.05; margin: 0 0 20px; font-weight: 800; }
.hero p.sub { font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); max-width: 680px; margin: 0 auto 34px; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Seções ─────────────────────────────────────────────── */
.section { padding: 70px 0; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section__head h2 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 12px; }
.section__head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ── Cards / grid ───────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: linear-gradient(180deg, var(--panel), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow);
}
.card--hover { transition: transform .15s ease, border-color .2s ease; }
.card--hover:hover { transform: translateY(-3px); border-color: var(--border-2); }
.card__icon {
    width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    font-size: 22px; background: rgba(61,220,151,.12); margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── Planos ─────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan--featured { border-color: rgba(61,220,151,.5); box-shadow: 0 24px 70px -30px rgba(61,220,151,.45); }
.plan__tag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--grad); color: #06121c; font-size: 12px; font-weight: 700;
    padding: 5px 14px; border-radius: 999px;
}
.plan__name { font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.plan__price { font-size: 42px; font-weight: 800; font-family: 'Sora'; margin: 8px 0 2px; }
.plan__price small { font-size: 15px; color: var(--faint); font-weight: 500; }
.plan__divider { height: 1px; background: var(--border); margin: 20px 0; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan ul li { color: var(--muted); padding: 7px 0 7px 26px; position: relative; font-size: 15px; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
    border: 1px solid var(--border); border-radius: 12px; padding: 4px 20px;
    margin-bottom: 12px; background: var(--panel);
}
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; color: var(--brand); font-size: 22px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ── CTA final ──────────────────────────────────────────── */
.cta-final {
    text-align: center; border-radius: 24px; padding: 60px 24px;
    background: linear-gradient(150deg, rgba(61,220,151,.14), rgba(139,92,255,.14)), var(--panel);
    border: 1px solid var(--border-2);
}
.cta-final h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 14px; }
.cta-final p { color: var(--muted); margin: 0 0 26px; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
    border: 1px solid transparent;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--green  { color: var(--green);  background: rgba(61,220,151,.12); border-color: rgba(61,220,151,.3); }
.badge--yellow { color: var(--yellow); background: rgba(255,207,92,.12); border-color: rgba(255,207,92,.3); }
.badge--red    { color: var(--red);    background: rgba(255,93,108,.12); border-color: rgba(255,93,108,.3); }
.badge--gray   { color: var(--muted);  background: rgba(255,255,255,.06); border-color: var(--border); }

/* ── Auth (login/cadastro) ──────────────────────────────── */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 26px; margin: 0 0 6px; }
.auth-card .lead { color: var(--muted); margin: 0 0 26px; font-size: 15px; }
.auth-foot { text-align: center; color: var(--muted); margin-top: 22px; font-size: 14px; }
.auth-foot a { color: var(--brand); font-weight: 600; }

/* ── Formulários ────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.input, .select {
    width: 100%; padding: 13px 14px; font-size: 15px; color: var(--text);
    background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 11px;
    outline: none; transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.input:focus, .select:focus { border-color: var(--brand); box-shadow: var(--ring); }
.input::placeholder { color: var(--faint); }
.field__hint { font-size: 13px; color: var(--faint); margin-top: 6px; }
.input-group { display: flex; align-items: stretch; }
.input-group .prefix {
    display: grid; place-items: center; padding: 0 13px; color: var(--muted);
    background: var(--panel-2); border: 1px solid var(--border-2); border-right: 0;
    border-radius: 11px 0 0 11px; font-weight: 600;
}
.input-group .input { border-radius: 0 11px 11px 0; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert { padding: 13px 16px; border-radius: 11px; font-size: 14px; margin-bottom: 20px; border: 1px solid transparent; }
.alert--error   { color: var(--red);   background: rgba(255,93,108,.1);  border-color: rgba(255,93,108,.3); }
.alert--success { color: var(--green); background: rgba(61,220,151,.1);  border-color: rgba(61,220,151,.3); }
.alert--info    { color: var(--brand-2); background: rgba(24,180,255,.1); border-color: rgba(24,180,255,.3); }

/* ── Dashboard ──────────────────────────────────────────── */
.page { padding: 40px 0 70px; }
.page__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; }
.page__head h1 { margin: 0 0 4px; font-size: 30px; }
.page__head .muted { color: var(--muted); margin: 0; }

.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 34px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; }
.stat__label { font-size: 13px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.stat__value { font-size: 22px; font-weight: 700; font-family: 'Sora'; margin-top: 6px; }

.feature-card { position: relative; }
.feature-card .soon {
    position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700;
    color: var(--accent); background: rgba(139,92,255,.14); border: 1px solid rgba(139,92,255,.3);
    padding: 4px 9px; border-radius: 999px; letter-spacing: .04em;
}
.feature-card .demo-metric { font-size: 26px; font-weight: 800; font-family: 'Sora'; margin: 10px 0 2px; }
.feature-card .demo-trend { font-size: 13px; font-weight: 600; }
.demo-trend.up   { color: var(--green); }
.demo-trend.down { color: var(--red); }

/* ── Tabela admin ───────────────────────────────────────── */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar form { display: flex; gap: 10px; flex: 1; min-width: 240px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
table.data th { color: var(--faint); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; background: var(--bg-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(255,255,255,.02); }
.role-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.role-pill.admin { color: var(--accent); background: rgba(139,92,255,.14); }
.role-pill.user  { color: var(--muted); background: rgba(255,255,255,.05); }
.linklike { color: var(--brand); font-weight: 600; cursor: pointer; background: none; border: 0; font-size: 14px; }

/* edição inline (linha expandida) */
.edit-row td { background: var(--bg-2); }
.edit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .grid--4, .summary { grid-template-columns: repeat(2, 1fr); }
    .grid--3, .plans { grid-template-columns: 1fr; }
    .edit-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .grid--4, .summary, .grid--2 { grid-template-columns: 1fr; }
    .navuser { display: none; }
    .hero { padding: 60px 0 50px; }
    .edit-grid { grid-template-columns: 1fr; }
}
