/* styles.css — re:crm© cockpit. © 2024-2026 7milestone SASU — Proprietary. */
:root {
  --bg: #0f172a; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --blue: #3E8BFF; --green: #24B47E;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f1f5f9; color: var(--ink); }

.topbar { background: var(--bg); display: flex; align-items: center; gap: 28px;
  padding: 12px 28px; position: sticky; top: 0; z-index: 10; }
.topbar .brand { height: 38px; }
.nav-row { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 20px; }
.nav-left { display: flex; gap: 18px; }
.nav-right { display: flex; gap: 12px; align-items: center; }
.nav-link { color: #cbd5e1; text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 2px; }
.nav-link.active { color: #fff; border-bottom: 2px solid var(--blue); }
.nav-right .muted { color: #94a3b8; }

.view { max-width: 1040px; margin: 26px auto; padding: 0 22px; }
h1 { font-size: 24px; margin: 0 0 16px; }
h3 { margin: 0 0 12px; font-size: 15px; }
.muted { color: var(--muted); }
.err { color: #ef4444; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 14px 0; }
.panel { min-height: 40px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.toolbar { margin: 6px 0 2px; }
.toolbar .muted { margin-left: auto; font-size: 13px; }

.input { padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; min-width: 150px; }
.btn { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 9px 15px;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.ghost { background: #f8fafc; }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn:hover { filter: brightness(0.97); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat-value { font-size: 26px; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 2px; }

.pill { display: inline-block; color: #fff; font: 700 11px/1 system-ui; letter-spacing: .03em;
  padding: 5px 10px; border-radius: 999px; margin: 2px 4px 2px 0; text-transform: uppercase; }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.table th { background: #f8fafc; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover { background: #f8fafc; }

.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #eef2f7; }
.kv-label { color: var(--muted); font-size: 13px; }
.block { margin: 10px 0; font-size: 14px; line-height: 1.5; }
.risks { margin: 8px 0; color: #475569; font-size: 13px; }

.lead-head { margin-bottom: 14px; }
.lead-head h1 { margin-bottom: 4px; }
.back { color: var(--muted); text-decoration: none; font-size: 13px; }

.copy-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.copy-text { background: #f8fafc; border-radius: 8px; padding: 10px; font-size: 12px; white-space: pre-wrap;
  max-height: 160px; overflow: auto; margin: 8px 0; }
.gate { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.gate ul { margin: 6px 0; padding-left: 18px; }

.login { max-width: 340px; margin: 60px auto; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.login-brand { height: 46px; align-self: center; margin-bottom: 6px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; z-index: 50; }
.toast.ok { background: #0f172a; } .toast.err { background: #ef4444; }

/* ── Billing dashboard ── */
.section-h { font-size: 16px; margin: 26px 0 12px; }
.billing-top { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 760px) { .billing-top { grid-template-columns: 1fr; } }
.billing-sub .sub-plan-name { font-weight: 800; font-size: 20px; }
.sub-grid { display: flex; gap: 28px; margin-top: 16px; }
.sub-field .sub-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sub-field .sub-value { font-size: 15px; font-weight: 600; margin-top: 2px; }
.headline { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.headline-big { font-size: 38px; font-weight: 800; line-height: 1; }
.headline-label { font-size: 12px; color: var(--muted); margin-top: 8px; max-width: 150px; }
.banner-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; }

.meter { padding: 12px 0; border-bottom: 1px solid var(--line); }
.meter:last-child { border-bottom: 0; }
.meter-primary { background: #faf8ff; margin: 0 -14px; padding: 14px; border-radius: 10px; border-bottom: 0; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.meter-label { font-size: 14px; font-weight: 600; }
.meter-val { font-size: 13px; color: #475569; font-variant-numeric: tabular-nums; }
.moat-tag { font-size: 9px; font-weight: 800; letter-spacing: .1em; color: #fff; background: #735CFF;
  padding: 2px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }
.meter-sub { font-size: 11px; color: var(--muted); margin-top: 5px; }
.bar { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .3s; }

/* ── Prospect search ── */
.fld { margin: 10px 0; }
.fld > label { display: block; margin-bottom: 4px; font-size: 12px; }
.chk { font-size: 13px; color: #334155; display: inline-flex; align-items: center; gap: 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: #64748b; font-weight: 600; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl a { color: var(--blue); text-decoration: none; font-weight: 600; }
