/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #067557;
  --primary-hover: #055f46;
  --bg: #f7f4ef;
  --surface: #ffffff;
  --border: #d8e0da;
  --text: #1f2a24;
  --text-muted: #5c625e;
  --danger: #c0392b;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
}
body { font-family: -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; min-height: 100vh; }

/* ── Auth ──────────────────────────────────────────────────────────────────── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { background: var(--surface); border-radius: 12px; padding: 36px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.auth-logo { font-size: 28px; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.auth-form label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 4px; }
.auth-form input { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; transition: border-color .15s; }
.auth-form input:focus { border-color: var(--primary); }

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-brand { font-weight: 800; font-size: 18px; color: var(--primary); text-decoration: none; }
.nav-links { display: flex; gap: 4px; list-style: none; flex: 1; }
.nav-links a { padding: 6px 12px; border-radius: 6px; text-decoration: none; color: var(--text-muted); font-weight: 500; transition: all .15s; }
.nav-links a:hover, .nav-links a.active { background: #e8f4ef; color: var(--primary); }
.nav-user { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }

/* ── Main content ─────────────────────────────────────────────────────────── */
.main-content { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.greeting { color: var(--text-muted); font-size: 15px; }
.section { margin-top: 32px; }
.section h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

/* ── Stats ────────────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-number { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 16px; text-align: left; }
.table th { background: #f0f5f2; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.table tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
.table tr:hover td { background: #f7fbf8; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #c8d4cc; }
.btn-block { width: 100%; justify-content: center; margin-top: 20px; padding: 11px; }
.btn-sm { font-size: 12px; padding: 5px 10px; }

/* ── Badge ────────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #e8f4ef; color: var(--primary); }
.badge-lead { background: #dbeafe; color: #1d4ed8; }
.badge-cliente { background: #dcfce7; color: #15803d; }
.badge-perdido { background: #fee2e2; color: #991b1b; }

/* ── Alert ────────────────────────────────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #fee2e2; color: var(--danger); border: 1px solid #fca5a5; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-box { background: var(--surface); border-radius: 12px; padding: 28px; width: 100%; max-width: 420px; box-shadow: 0 16px 40px rgba(0,0,0,.15); }
.modal-box h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-box label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
.modal-box input { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; }
.modal-box input:focus { border-color: var(--primary); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
