.nav-link { display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border-radius: .6rem; font-size: .9rem; color: #cbd5e1; transition: all .15s; }
.nav-link:hover { background: #1e293b; color: #fff; }
.nav-link.active { background: #4f46e5; color: #fff; }

.btn-primary { background: #4f46e5; color: #fff; padding: .5rem 1rem; border-radius: .6rem; font-size: .875rem; font-weight: 500; }
.btn-primary:hover { background: #4338ca; }
.btn-secondary { background: #f1f5f9; color: #334155; padding: .5rem 1rem; border-radius: .6rem; font-size: .875rem; font-weight: 500; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #fee2e2; color: #b91c1c; padding: .5rem 1rem; border-radius: .6rem; font-size: .875rem; font-weight: 500; }
.btn-danger:hover { background: #fecaca; }
.btn-xs { padding: .25rem .5rem; font-size: .75rem; border-radius: .4rem; }

.input, .input-sm, select.input, textarea.input { width: 100%; border: 1px solid #e2e8f0; border-radius: .6rem; padding: .55rem .75rem; font-size: .875rem; background: #fff; outline: none; }
.input:focus, .input-sm:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.input-sm { width: auto; padding: .4rem .6rem; }
label.lbl { display: block; font-size: .75rem; font-weight: 600; color: #64748b; margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .03em; }

.card { background: #fff; border-radius: 1rem; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kpi { padding: 1.1rem 1.25rem; }
.kpi .kpi-label { font-size: .75rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .kpi-value { font-size: 1.5rem; font-weight: 700; margin-top: .25rem; }
.kpi .kpi-sub { font-size: .75rem; color: #94a3b8; margin-top: .2rem; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

table.tbl { width: 100%; font-size: .85rem; }
table.tbl th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; padding: .7rem .75rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; white-space: nowrap; }
table.tbl td { padding: .65rem .75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.tbl tr:hover td { background: #f8fafc; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

.avatar { width: 28px; height: 28px; border-radius: 999px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }

.toast { background: #0f172a; color: #fff; padding: .7rem 1rem; border-radius: .7rem; font-size: .85rem; box-shadow: 0 10px 25px rgba(0,0,0,.2); animation: slidein .2s ease; }
.toast.ok { background: #15803d; } .toast.err { background: #b91c1c; }
@keyframes slidein { from { transform: translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }

.progress { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 999px; }

.toggle { width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; transition: .15s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 999px; transition: .15s; }
.toggle.on { background: #16a34a; } .toggle.on::after { left: 19px; }

.tab { padding: .5rem .9rem; font-size: .85rem; font-weight: 500; color: #64748b; border-bottom: 2px solid transparent; cursor: pointer; }
.tab.active { color: #4f46e5; border-color: #4f46e5; }

@media (max-width: 1023px) { #sidebar.open { transform: translateX(0); } }

/* Impression d'une fiche (modal) */
@media print {
  body.printing > *:not(#modal) { display: none !important; }
  body.printing #modal { position: static !important; }
  body.printing #modal > div:first-child { display: none !important; }
  body.printing #modal-box { box-shadow: none !important; max-width: none !important; margin: 0 !important; border-radius: 0 !important; }
  body.printing .no-print, body.printing button, body.printing [data-close] { display: none !important; }
  body.printing input, body.printing textarea, body.printing select { border: none !important; background: transparent !important; box-shadow: none !important; }
  body.printing input::placeholder { color: transparent; }
}
