/* Dashboard SitePrêt — design SaaS sobre */
:root {
  --c-bg: #FAFAF8;
  --c-surface: #FFFFFF;
  --c-text: #1F1D1A;
  --c-text-soft: #6B6660;
  --c-border: #ECE8E0;
  --c-accent: #87A878;
  --c-accent-dark: #5F7D52;
  --c-warm: #C9856A;
  --c-bad: #D44F4F;
  --c-good: #5BA86F;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);

  --sidebar-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

a { color: var(--c-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar__brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 24px; border-bottom: 1px solid var(--c-border); margin-bottom: 16px; }
.sidebar__brand-mark { width: 36px; height: 36px; background: var(--c-accent); color: #fff; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.sidebar__brand strong { display: block; font-size: 14px; }
.sidebar__brand span { font-size: 11px; color: var(--c-text-soft); }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar__link { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 500; color: var(--c-text); transition: background .15s; }
.sidebar__link:hover { background: var(--c-bg); text-decoration: none; }
.sidebar__link.is-active { background: var(--c-accent); color: #fff; }
.sidebar__icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .9; flex-shrink: 0; }
.sidebar__icon svg { width: 100%; height: 100%; }
.sidebar__footer { font-size: 12px; color: var(--c-text-soft); padding-top: 16px; border-top: 1px solid var(--c-border); }
.sidebar__footer a { color: var(--c-text-soft); }

/* === Main === */
.main { flex: 1; padding: 32px 40px; max-width: 1600px; }
.page-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 26px; font-weight: 600; }
.page-header p { color: var(--c-text-soft); font-size: 13px; }

/* === KPI Cards === */
.kpi-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-bottom: 32px; }
.kpi-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 18px 20px; transition: box-shadow .2s; }
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-card__label { font-size: 12px; font-weight: 500; color: var(--c-text-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.kpi-card__value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.kpi-card__value--money { color: var(--c-warm); }
.kpi-card__hint { font-size: 12px; color: var(--c-text-soft); margin-top: 4px; }

.section { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 24px; margin-bottom: 24px; }
.section h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.section h3 { font-size: 14px; font-weight: 600; color: var(--c-text-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }

/* === Tables === */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-border); }
th { background: var(--c-bg); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-text-soft); }
tbody tr:hover { background: var(--c-bg); }

/* === Badges === */
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.badge--new { background: #ECE8E0; color: #6B6660; }
.badge--enriched { background: #DDE7D5; color: #5F7D52; }
.badge--sent { background: #D7E1F0; color: #4A6790; }
.badge--opened { background: #E8DCD3; color: #C9856A; }
.badge--clicked { background: #F0D8B3; color: #B07733; }
.badge--purchased { background: var(--c-good); color: #fff; }
.badge--blacklisted { background: var(--c-bad); color: #fff; }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); transition: all .15s; }
.btn:hover { background: var(--c-bg); text-decoration: none; }
.btn--primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn--primary:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); }
.btn--danger { color: var(--c-bad); }
.btn--small { padding: 4px 10px; font-size: 12px; }

/* === Filters === */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { padding: 8px 12px; border: 1px solid var(--c-border); border-radius: var(--r-sm); font-family: inherit; font-size: 13px; }

/* === Loading / Empty === */
.loading { text-align: center; padding: 48px; color: var(--c-text-soft); }
.empty { text-align: center; padding: 64px 24px; color: var(--c-text-soft); }
.empty p { font-size: 14px; }

/* === Responsive === */
@media (max-width: 900px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; padding: 16px; }
  .sidebar__nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar__link { flex: 1; justify-content: center; min-width: 100px; }
  .sidebar__footer { display: none; }
  .main { padding: 20px; }
}

/* === Funnel === */
.funnel { display: flex; flex-direction: column; gap: 8px; max-width: 600px; }
.funnel__step { padding: 14px 18px; border-radius: var(--r-sm); display: flex; justify-content: space-between; font-weight: 500; }
.funnel__step:nth-child(1) { background: #DDE7D5; }
.funnel__step:nth-child(2) { background: #D7E1F0; width: 95%; }
.funnel__step:nth-child(3) { background: #E8DCD3; width: 75%; }
.funnel__step:nth-child(4) { background: #F0D8B3; width: 50%; }
.funnel__step:nth-child(5) { background: #C9856A; color: #fff; width: 30%; }
.funnel__step:nth-child(6) { background: var(--c-good); color: #fff; width: 15%; }
.funnel__pct { opacity: .8; font-size: 12px; }
