/* Racine — identité visuelle Axude, reprise de la maquette Caisses.dc.html */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #F6FAF2;
  font-family: 'Onest', -apple-system, 'Segoe UI', sans-serif;
  color: #383838;
}
a { color: #193F2F; text-decoration: none; }
a:hover { color: #112C21; }

.shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; flex-shrink: 0; background: #FFFFFF; border-right: 1px solid #E2F3EB; display: flex; flex-direction: column; padding: 24px 14px; gap: 26px; position: sticky; top: 0; height: 100vh; }
.sidebar-logo { padding: 0 10px; }
.sidebar-logo img { width: 118px; display: block; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: #4A4B4A; cursor: pointer; }
.nav-item svg { flex-shrink: 0; color: #7A8B80; }
.nav-item.active { background: #193F2F; color: #FFFFFF; }
.nav-item.active svg { color: #D8E7BB; }
.nav-item.disabled { opacity: .45; cursor: default; }
.nav-group-label { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9AA39C; padding: 14px 12px 4px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid #E2F3EB; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #193F2F; color: #FAFFE9; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; font-family: 'Signika Negative', sans-serif; }
.profile-name { font-size: 13px; font-weight: 600; color: #1E211F; line-height: 1.2; }
.profile-role { font-size: 11.5px; color: #8A928B; line-height: 1.2; cursor: pointer; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid #E2F3EB; background: #FFFFFF; }
.page-title { font-size: 19px; font-weight: 600; color: #1A1C1A; }
.page-sub { font-size: 12.5px; color: #8A928B; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.btn-primary { display: flex; align-items: center; gap: 6px; background: #193F2F; color: #FAFFE9; border: none; border-radius: 8px; padding: 9px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-primary:hover { background: #112C21; }

.content { flex: 1; padding: 22px 32px 32px; display: flex; flex-direction: column; gap: 18px; }
.tabs { display: flex; gap: 6px; background: #EFF3EC; padding: 4px; border-radius: 10px; width: fit-content; }
.tab { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #6C776E; cursor: pointer; border: none; background: none; font-family: inherit; }
.tab.active { background: #FFFFFF; color: #193F2F; box-shadow: 0 1px 2px rgba(6,15,11,.08); }

.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.card { background: #FFFFFF; border: 1px solid #E2F3EB; border-radius: 14px; padding: 18px 20px; }
.kpi-label { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #8A928B; margin-bottom: 10px; }
.kpi-value { font-family: 'Signika Negative', sans-serif; font-weight: 600; font-size: 25px; color: #1A1C1A; line-height: 1; }
.kpi-sub { font-size: 11.5px; color: #8A928B; margin-top: 6px; }

.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 14.5px; font-weight: 600; color: #1A1C1A; }
.card-meta { font-size: 12px; color: #8A928B; }

.bar-track { display: flex; width: 100%; height: 14px; border-radius: 8px; overflow: hidden; background: #F0F3EE; }
.legend-row-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 16px; }
.legend-item { display: flex; flex-direction: column; gap: 5px; }
.legend-key { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #6C776E; }
.legend-swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.legend-num { font-family: 'Signika Negative', sans-serif; font-weight: 600; font-size: 15px; color: #1A1C1A; }

.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #9AA39C; padding: 0 10px 10px 0; border-bottom: 1px solid #EFF3EC; }
td { font-size: 13px; color: #333533; padding: 11px 10px 11px 0; border-bottom: 1px solid #F3F6F1; }
tr:last-child td { border-bottom: none; }

.client-name { font-weight: 600; color: #1A1C1A; }
.client-sub { font-size: 11.5px; color: #8A928B; margin-top: 1px; }

.status-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.chip-pending { background: #FCF3D6; color: #8A6D1E; }
.chip-scheduled { background: #E5F1FA; color: #1E5F86; }
.chip-completed { background: #EEF4E1; color: #3C6E45; }
.chip-cancelled { background: #F3F6F1; color: #7A8B80; }
.chip-active { background: #EEF4E1; color: #3C6E45; }
.chip-prospect { background: #E5F1FA; color: #1E5F86; }
.chip-blocked { background: #FBE4DC; color: #9A3B22; }
.chip-new { background: #E5F1FA; color: #1E5F86; }
.chip-qualified { background: #FCF3D6; color: #8A6D1E; }
.chip-proposal { background: #EAE1FA; color: #5B3B9A; }
.chip-won { background: #EEF4E1; color: #3C6E45; }
.chip-lost { background: #F3F6F1; color: #7A8B80; }
.chip-draft { background: #F3F6F1; color: #7A8B80; }
.chip-sent { background: #E5F1FA; color: #1E5F86; }
.chip-followed-up { background: #FCF3D6; color: #8A6D1E; }
.chip-accepted { background: #EEF4E1; color: #3C6E45; }
.chip-rejected { background: #FBE4DC; color: #9A3B22; }
.chip-expired { background: #FBE4DC; color: #9A3B22; }

.ref-cell { font-family: 'Signika Negative', sans-serif; font-weight: 600; }

.activity-row { display: flex; align-items: flex-start; gap: 11px; padding: 10px 0; border-bottom: 1px solid #F3F6F1; }
.activity-row:last-child { border-bottom: none; }
.act-icon { width: 28px; height: 28px; border-radius: 8px; background: #F6FAF2; display: flex; align-items: center; justify-content: center; color: #3C9069; flex-shrink: 0; }
.act-title { font-size: 12.5px; font-weight: 600; color: #1A1C1A; }
.act-meta { font-size: 11px; color: #8A928B; margin-top: 2px; }
.act-done { opacity: .5; }

.alert-card { background: #193F2F; border-radius: 14px; padding: 18px 20px; color: #FAFFE9; }
.alert-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: #D8E7BB; }
.alert-text { font-size: 12.5px; line-height: 1.5; color: #EAF3E3; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.type-card { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F3F6F1; }
.type-card:last-child { border-bottom: none; }
.type-icon { width: 38px; height: 38px; border-radius: 9px; background: #F6FAF2; display: flex; align-items: center; justify-content: center; color: #3C9069; flex-shrink: 0; }
.type-name { font-size: 13px; font-weight: 600; color: #1A1C1A; }
.type-meta { font-size: 11.5px; color: #8A928B; margin-top: 2px; }

.empty-state { padding: 32px; text-align: center; color: #8A928B; font-size: 13px; }

.field-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #4A4B4A; }
.field input, .field select { font-family: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid #E2F3EB; border-radius: 8px; background: #F6FAF2; min-width: 160px; }
.field input:focus, .field select:focus { outline: 2px solid #BCE4FA; }
.btn-secondary { background: #F6FAF2; color: #193F2F; border: 1px solid #E2F3EB; border-radius: 8px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; align-self: flex-end; }
.btn-secondary:hover { background: #EFF3EC; }

.toast { position: fixed; bottom: 24px; right: 24px; background: #193F2F; color: #FAFFE9; padding: 12px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.15); opacity: 0; transform: translateY(8px); transition: all .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #9A3B22; }

/* --- login page --- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #F6FAF2; }
.login-card { background: #FFFFFF; border: 1px solid #E2F3EB; border-radius: 16px; padding: 40px; width: 360px; }
.login-card img { width: 130px; margin-bottom: 24px; }
.login-card h1 { font-size: 17px; margin: 0 0 4px; color: #1A1C1A; }
.login-card p.sub { font-size: 12.5px; color: #8A928B; margin: 0 0 24px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card input { font-family: inherit; font-size: 14px; padding: 11px 12px; border: 1px solid #E2F3EB; border-radius: 8px; background: #F6FAF2; }
.login-card .btn-primary { justify-content: center; padding: 11px; font-size: 13.5px; margin-top: 6px; }
.login-error { color: #9A3B22; font-size: 12.5px; min-height: 16px; }
