:root {
  --navy: #071b3a;
  --navy-2: #031128;
  --blue: #1267ff;
  --cyan: #13c8bd;
  --text: #07142f;
  --muted: #64708a;
  --line: #dfe6f2;
  --panel: #ffffff;
  --page: #f7f9fd;
  --accent: #1267ff;
  --accent-tint: #eaf2ff;
  --green: #16a34a;
  --amber: #f59e0b;
  --red: #ef4444;
  --grey: #94a3b8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--text);
  background: var(--page);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 18px;
  overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent) 42%, transparent), transparent 32%),
    linear-gradient(180deg, var(--navy), var(--navy-2));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 8px 30px;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--accent) 38%, transparent));
}

.brand-title {
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 4px;
  color: #9eb5da;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.nav-list,
.module-subnav {
  display: grid;
  gap: 8px;
}

.nav-item,
.subnav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #e8f0ff;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover,
.subnav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #051b49));
  box-shadow: 0 12px 22px color-mix(in srgb, var(--accent) 28%, transparent);
}

.nav-icon {
  display: grid;
  width: 26px;
  place-items: center;
  font-size: 20px;
}

.subnav-wrap {
  margin: -2px 0 10px 28px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.subnav-item {
  min-height: 36px;
  border-radius: 7px;
  font-size: 14px;
  color: #d6e2f7;
}

.subnav-item::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0.72;
}

.subnav-item.active {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 72%, transparent);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #c4d3ee;
}

.collapse-mark {
  font-size: 28px;
}

.main {
  min-width: 0;
}

.topbar {
  height: 76px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 0 34px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.company-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

.client-logo-shell {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.client-logo-shell img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--navy));
  font-weight: 800;
}

.content {
  padding: 32px 36px 44px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 2px 0 8px;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.subtle {
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 80%, #051b49));
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cards-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: 1fr 1fr;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.stat-card {
  min-height: 142px;
  padding: 20px;
}

.stat-title {
  color: #1d2942;
  font-weight: 800;
}

.stat-body {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.stat-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-tint);
  font-size: 24px;
}

.metric {
  font-size: 32px;
  line-height: 1;
  font-weight: 850;
}

.trend {
  margin-top: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.trend.bad {
  color: var(--red);
}

.module-card {
  padding: 20px;
  border-top: 4px solid var(--accent);
}

.score-ring {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 52%, transparent 53%),
    conic-gradient(var(--accent) calc(var(--score) * 1%), #e8edf5 0);
  font-size: 22px;
  font-weight: 850;
}

.panel {
  padding: 20px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 850;
}

.risk-list {
  display: grid;
  gap: 12px;
}

.risk-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.badge.high,
.badge.eleve,
.badge.expiree {
  color: #dc2626;
  background: #fee2e2;
}

.badge.medium,
.badge.moyen,
.badge.review,
.badge.attente {
  color: #ea580c;
  background: #ffedd5;
}

.badge.low,
.badge.faible,
.badge.active,
.badge.approuve,
.badge.signee,
.badge.publiee {
  color: #15803d;
  background: #dcfce7;
}

.badge.neutral,
.badge.brouillon {
  color: #475569;
  background: #eef2f7;
}

.filterbar {
  display: grid;
  grid-template-columns: 1fr 170px 170px auto;
  gap: 12px;
  margin: 20px 0;
}

.field {
  height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #17213a;
  font-size: 14px;
  font-weight: 850;
}

.language-select {
  margin-bottom: 14px;
}

.table-card {
  overflow: hidden;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: #17213a;
  background: #fbfcff;
  font-weight: 850;
}

td {
  color: #25324c;
}

tr:last-child td {
  border-bottom: 0;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.pagination {
  display: flex;
  gap: 8px;
}

.page-dot {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.page-dot.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.toggle {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
}

.toggle.on {
  background: var(--accent);
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.toggle.on::after {
  left: 23px;
}

.lina-card {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
}

.chat-bubble {
  max-width: 760px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chat-bubble.user {
  margin-left: auto;
  background: #edf4ff;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  text-align: center;
}

.logo-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.logo-preview img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}
