:root {
  /* 2Empower brand — même palette que Lead Manager */
  --bg:           #f7f7fc;
  --surface:      #ffffff;
  --surface2:     #f1f0f9;
  --border:       #e4e0f5;
  --accent:       #5533da;
  --accent-light: #eceafc;
  --accent-hover: #4526c2;
  --pink:         #9b35c8;
  --pink-light:   #f5e9fd;
  --orange:       #ff6b35;
  --orange-light: #fff1eb;
  --gradient:     linear-gradient(135deg, #4b3ac9 0%, #7b2fbe 50%, #9b35c8 100%);
  --text:         #1a1730;
  --text-muted:   #6b7280;
  --green:        #10b981;
  --green-light:  #d1fae5;
  --red:          #ef4444;
  --red-light:    #fee2e2;
  --amber:        #d97706;
  --amber-light:  #fef3c7;
  --shadow-sm:    0 1px 4px rgba(75,58,201,.07);
  --shadow:       0 4px 20px rgba(75,58,201,.14);
  --radius:       12px;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav (identique à Lead Manager) ─────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px; height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav__brand {
  font-weight: 800; font-size: 17px; color: white;
  background: var(--gradient); padding: 6px 14px;
  border-radius: 8px; margin-right: 12px; white-space: nowrap; letter-spacing: -.2px;
}
.nav__tabs { display: flex; gap: 2px; flex: 1; }
.nav__tab {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 7px 16px; border-radius: 8px;
  font-size: 14px; font-family: var(--font); font-weight: 500;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.nav__tab:hover  { background: var(--surface2); color: var(--accent); text-decoration: none; }
.nav__tab.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.nav__tab--soon  { cursor: default; color: #b7b3c9; }
.nav__tab--soon:hover { background: none; color: #b7b3c9; }
.soon-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  background: var(--surface2); color: var(--text-muted);
  padding: 2px 6px; border-radius: 20px;
}
.nav__logout {
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  text-decoration: none; padding: 7px 12px; border-radius: 8px;
  transition: all .15s; white-space: nowrap;
}
.nav__logout:hover { background: var(--surface2); color: var(--accent); text-decoration: none; }

.main { padding: 28px; max-width: 1200px; margin: 0 auto; }
.table-scroll { overflow-x: auto; }

/* ── Topbar de page ──────────────────────────────────────────────────────── */
.page-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.page-topbar h1 { font-size: 22px; font-weight: 700; }
.page-topbar__actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font-size: 13px;
  font-family: var(--font); font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text);
  cursor: pointer; transition: all .15s;
}
.btn:hover { background: var(--surface2); border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn--primary { background: var(--gradient); border-color: transparent; color: #fff; }
.btn--primary:hover { opacity: .9; border-color: transparent; color: #fff; }

/* ── Filtres ─────────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters-bar select {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text);
  padding: 7px 11px; font-size: 13px;
  font-family: var(--font); outline: none;
  cursor: pointer; transition: border-color .15s;
}
.filters-bar select:focus { border-color: var(--accent); }

/* ── KPIs / totaux ───────────────────────────────────────────────────────── */
.kpi-grid { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 22px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  flex: 0 0 auto;
}
.kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); }
.kpi__value {
  font-size: 26px; font-weight: 700; white-space: nowrap;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.kpi__label { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* ── Data table ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.data-table th, .data-table td { padding: 11px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
.data-table th {
  color: var(--text-muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .6px; background: var(--surface2);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface2); }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-nowrap { white-space: nowrap; }
.data-table .col-truncate {
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Badges statut ───────────────────────────────────────────────────────── */
.badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.badge--attente { background: var(--amber-light); color: var(--amber); }
.badge--accepte { background: var(--accent-light); color: var(--accent); }
.badge--partiel { background: var(--orange-light); color: var(--orange); }
.badge--facture { background: var(--green-light); color: var(--green); }
.badge--refuse  { background: var(--red-light); color: var(--red); }
.badge--defaut  { background: var(--surface2); color: var(--text-muted); }

.missing { color: var(--red); font-style: italic; }

/* ── Cards / formulaires (pages détail, import) ─────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px 22px; margin-bottom: 16px;
}
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 0 0 16px; font-weight: 600; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.field > div, .field > span { font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 9px 12px;
  font-size: 13px; font-family: var(--font); outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface); }
.field button, .card > form > button { margin-top: 4px; }

.back-link { display: inline-block; margin-bottom: 16px; font-size: 13px; font-weight: 500; }

.link-list { list-style: none; padding: 0; margin: 0 0 12px; }
.link-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.link-list button { background: none; border: none; color: var(--red); cursor: pointer; font-size: 12px; font-weight: 500; }

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 36px; width: 100%; max-width: 360px; }
.login-card__brand { font-weight: 800; font-size: 17px; color: white; background: var(--gradient); padding: 6px 14px; border-radius: 8px; display: inline-block; margin-bottom: 20px; }
.login-card h1 { font-size: 19px; margin-bottom: 18px; font-weight: 700; }
.login-card input[type="password"] {
  width: 100%; background: var(--surface2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 14px;
  font-family: var(--font); outline: none; margin-bottom: 14px; transition: border-color .15s;
}
.login-card input[type="password"]:focus { border-color: var(--accent); background: var(--surface); }
.login-card button {
  width: 100%; background: var(--gradient); color: white; border: none;
  border-radius: 8px; padding: 10px 12px; font-size: 14px; font-weight: 600;
  font-family: var(--font); cursor: pointer;
}
.login-card__error { color: var(--red); font-size: 13px; margin-bottom: 12px; background: var(--red-light); padding: 8px 12px; border-radius: 8px; }
