:root {
  color-scheme: light;
  --ink: #151513;
  --muted: #6f716d;
  --soft: #a1a39e;
  --line: #e4e5e1;
  --line-strong: #d6d8d2;
  --canvas: #f5f5f2;
  --surface: #fff;
  --surface-soft: #fafaf8;
  --accent: #ff5b1a;
  --accent-dark: #d9460d;
  --accent-soft: #fff0e9;
  --green: #237a50;
  --green-soft: #eaf7f0;
  --blue: #315bdb;
  --blue-soft: #eef2ff;
  --warning: #a36100;
  --warning-soft: #fff5dc;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(18, 18, 16, .04), 0 12px 38px rgba(18, 18, 16, .06);
  --sidebar: 252px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-synthesis: none;
}

.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.language-control { display:inline-flex; align-items:center; gap:7px; color:var(--muted);
  font-size:10px; font-weight:700; white-space:nowrap; }
.language-control select { height:34px; padding:0 28px 0 10px; border:1px solid var(--line);
  border-radius:9px; color:var(--ink); background:var(--surface); font-size:11px; cursor:pointer; }
.language-control-mobile { display:none; }
:lang(zh-Hans) { line-height:1.6; }
:lang(zh-Hans) .eyebrow, :lang(zh-Hans) .nav-label, :lang(zh-Hans) .data-table th {
  letter-spacing:0; text-transform:none;
}
:lang(zh-Hans) .status-pill, :lang(zh-Hans) .micro-badge { white-space:normal; }

* { box-sizing: border-box; }

html { min-width: 320px; overflow-x: hidden; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.console-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 22px 14px 14px;
  border-right: 1px solid var(--line);
  background: #fbfbfa;
  overflow-y: auto;
}

.brand-row {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -.04em;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border-radius: 7px;
  background: var(--ink);
}
.brand-mark i { width: 3px; border-radius: 4px; background: #fff; }
.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 14px; background: var(--accent); }
.brand-mark i:nth-child(3) { height: 10px; }

.version-pill,
.env-badge,
.status-pill,
.micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.version-pill { padding: 6px 8px; color: #6d4b36; background: var(--accent-soft); }

.primary-nav { margin-top: 30px; }
.nav-label {
  margin: 0 10px 8px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.nav-label-spaced { margin-top: 26px; }

.nav-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  color: #50514e;
  background: transparent;
  font-size: 13px;
  font-weight: 590;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.nav-item:hover { color: var(--ink); background: #f0f0ed; }
.nav-item.active { color: var(--ink); background: #ecece8; font-weight: 700; }
.nav-item svg,
.workspace-card svg,
.topbar svg,
.icon-button svg,
.button svg,
.inline-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-count {
  min-width: 21px;
  margin-left: auto;
  padding: 4px 6px;
  border-radius: 999px;
  color: #7c7e79;
  background: #deded9;
  font-size: 10px;
  text-align: center;
}

.sidebar-bottom { margin-top: auto; }

.workspace-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.workspace-card:hover { border-color: var(--line-strong); box-shadow: 0 3px 12px rgba(0,0,0,.04); }
.workspace-avatar,
.avatar-button {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #22221f;
  font-size: 11px;
  font-weight: 760;
}
.workspace-copy { display: grid; min-width: 0; gap: 2px; }
.workspace-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy small { color: var(--muted); font-size: 10px; }
.workspace-card > svg { width: 16px; margin-left: auto; color: var(--muted); }

.app-column { min-width: 0; flex: 1; margin-left: var(--sidebar); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid rgba(226, 227, 222, .85);
  background: rgba(245, 245, 242, .88);
  backdrop-filter: blur(16px);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.env-badge { padding: 7px 9px; color: #4f514d; border: 1px solid var(--line); background: rgba(255,255,255,.75); }
.env-badge b { font: inherit; }
.env-badge i { width: 6px; height: 6px; border-radius: 50%; background: #4ab379; box-shadow: 0 0 0 3px #e1f4e8; }
.text-button,
.icon-button,
.avatar-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.text-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 9px;
  color: #4d4f4a;
  font-size: 12px;
  font-weight: 650;
}
.text-button:hover { background: #ebebe7; color: var(--ink); }
.text-button svg { width: 16px; height: 16px; }
.avatar-button { border: 0; }
.mobile-header { display: none; }
.sidebar-scrim { display: none; }

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 22px;
  border-bottom: 1px solid #f0d5c7;
  color: #7b3e25;
  background: #fff2eb;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}
.preview-banner strong { white-space: nowrap; }

/* Bandeau d'emprunt. Il doit se distinguer du bandeau d'information : la
   couleur est le seul rappel permanent qu'on agit dans l'espace de quelqu'un
   d'autre, et qu'aucun geste n'y est anodin. */
.banner-support { gap: 12px; border-bottom-color: #e8c2c2; color: #7b2525; background: #fdecec; }
.banner-support .button { flex: none; padding: 4px 10px; font-size: 10px; }

.page-outlet { width: min(1240px, 100%); margin: 0 auto; padding: 34px 34px 72px; outline: none; }
.login-card { width:min(430px,100%); margin:9vh auto 0; padding:30px; border:1px solid var(--line);
              border-radius:18px; background:var(--surface); box-shadow:var(--shadow); }
body.login-mode .sidebar, body.login-mode .topbar, body.login-mode .mobile-header,
body.login-mode .preview-banner { display:none; }
body.login-mode .app-column { margin-left:0; }
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.eyebrow { margin: 0 0 7px; color: var(--accent-dark); font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.page-title { margin: 0; font-size: clamp(27px, 3vw, 38px); font-weight: 720; letter-spacing: -.045em; line-height: 1.05; }
.page-subtitle { max-width: 680px; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.header-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 710;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: #fff; background: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.button-primary:hover { background: #2a2a27; }
.button-accent { color: #fff; background: var(--accent); box-shadow: 0 5px 14px rgba(255,91,26,.2); }
.button-accent:hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--line-strong); background: var(--surface); color: #333430; }
.button-secondary:hover { background: #fafaf8; }
.button-ghost { color: #4b4c48; background: transparent; }
.button-ghost:hover { background: #efefeb; }
.button-danger { color: var(--danger); border-color: #f0c9c5; background: #fff8f7; }
.button-small { min-height: 33px; padding: 0 11px; border-radius: 8px; font-size: 11px; }
.button[disabled] { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }

.grid { display: grid; gap: 16px; }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-column { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); }
.two-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-stack { display: grid; gap: 18px; }

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0,0,0,.015);
}
.card-pad { padding: 20px; }
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}
.card-header + .card-body { padding-top: 14px; }
.card-body { padding: 20px; }
.card-title { margin: 0; font-size: 14px; font-weight: 730; letter-spacing: -.015em; }
.card-description { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.section-heading { margin: 30px 0 14px; font-size: 16px; letter-spacing: -.02em; }

.metric-card { min-height: 142px; padding: 17px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #575853; background: #f1f1ee; }
.metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metric-value { margin-top: 19px; font-size: 28px; font-weight: 730; letter-spacing: -.045em; }
.metric-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: 10px; }
.trend-up { color: var(--green); font-weight: 700; }

.progress-track { overflow: hidden; height: 7px; border-radius: 999px; background: #ededE9; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.progress-accent > span { background: var(--accent); }
.progress-green > span { background: #45a875; }
.metric-progress { margin-top: 12px; }

.onboarding-card { overflow: hidden; }
.onboarding-lead {
  position: relative;
  overflow: hidden;
  padding: 25px;
  color: #fff;
  background: #1e201d;
}
.onboarding-lead::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -45px;
  bottom: -110px;
  border: 28px solid var(--accent);
  border-radius: 50%;
  opacity: .9;
}
.onboarding-lead h2 { max-width: 440px; margin: 0; font-size: 23px; letter-spacing: -.035em; }
.onboarding-lead p { max-width: 540px; margin: 9px 0 0; color: #babdb7; font-size: 12px; line-height: 1.55; }
.onboarding-progress { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.onboarding-progress .progress-track { width: min(300px, 65%); background: #40423d; }
.onboarding-progress .progress-track span { background: var(--accent); }
.onboarding-progress small { color: #d6d8d2; font-size: 10px; }
.checklist { display: grid; padding: 8px 20px 16px; }
.check-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: 0; }
.check-dot { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; background: #fff; }
.check-dot.done { color: #fff; border-color: var(--green); background: var(--green); }
.check-dot svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.check-copy strong { display: block; font-size: 12px; }
.check-copy small { color: var(--muted); font-size: 10px; }
.inline-action { display: inline-flex; align-items: center; gap: 5px; border: 0; color: #5a5b57; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.inline-action:hover { color: var(--accent-dark); }
.inline-action svg { width: 13px; height: 13px; }

.release-card { display: grid; gap: 18px; }
.release-head { display: flex; align-items: center; gap: 11px; }
.release-logo { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #fff; background: var(--ink); font-size: 13px; font-weight: 800; }
.release-head strong { display: block; font-size: 13px; }
.release-head small { color: var(--muted); font-size: 10px; }
.status-pill { padding: 6px 8px; }
.status-success { color: var(--green); background: var(--green-soft); }
.status-warning { color: var(--warning); background: var(--warning-soft); }
.status-neutral { color: #63645f; background: #efefec; }
.status-blue { color: var(--blue); background: var(--blue-soft); }
.release-list { display: grid; gap: 10px; }
.release-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; }
.release-line strong { color: var(--ink); font-weight: 650; }

.avatar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.avatar-card { overflow: hidden; }
.avatar-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.15 / 1;
  background: #ddd8d1;
}
.avatar-visual video { width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
.avatar-visual::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.42)); pointer-events: none; }
.avatar-visual .status-pill { position: absolute; z-index: 2; top: 12px; left: 12px; }
.avatar-initials { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.68); font-size: 50px; font-weight: 760; letter-spacing: -.08em; }
.avatar-coming-2 { background: #b9c8d8; }
.avatar-coming-3 { background: #d9c4b3; }
.avatar-noise { position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(circle at 30% 20%, #fff 0 1px, transparent 1px), radial-gradient(circle at 70% 65%, #fff 0 1px, transparent 1px); background-size: 17px 17px, 23px 23px; }
.avatar-card-body { padding: 17px; }
.avatar-card-body h3 { margin: 0; font-size: 14px; }
.avatar-card-body p { min-height: 34px; margin: 5px 0 15px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.avatar-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.avatar-id { color: var(--soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.custom-avatar-banner { position: relative; overflow: hidden; padding: 25px; color: #fff; background: #242522; }
.custom-avatar-banner::before { content: ""; position: absolute; width: 230px; height: 230px; right: -75px; top: -90px; border-radius: 50%; background: var(--accent); }
.custom-avatar-banner > * { position: relative; z-index: 1; }
.custom-avatar-banner h2 { max-width: 520px; margin: 0; font-size: 21px; letter-spacing: -.03em; }
.custom-avatar-banner p { max-width: 570px; margin: 8px 0 18px; color: #c5c7c1; font-size: 12px; line-height: 1.55; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #ecece8; }
.tab { flex: 1; min-height: 34px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.tab.active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.code-card { overflow: hidden; border: 1px solid #30312d; border-radius: 13px; background: #1d1e1b; color: #e7e8e3; }
.code-toolbar { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid #343530; color: #a8aaa4; font-size: 10px; }
.code-dots { display: flex; gap: 5px; }
.code-dots i { width: 7px; height: 7px; border-radius: 50%; background: #4d4e49; }
.copy-code { border: 0; color: #b9bbb5; background: transparent; font-size: 10px; cursor: pointer; }
.copy-code:hover { color: #fff; }
pre { overflow: auto; margin: 0; padding: 18px; font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.code-accent { color: #ff9c73; }
.code-blue { color: #8fb8ff; }
.code-green { color: #9adaab; }
.architecture-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-items: stretch; }
.flow-node { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.flow-node:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; z-index: 2; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 11px; transform: translateY(-50%); }
.flow-node strong { display: block; font-size: 11px; }
.flow-node small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.empty-table { padding: 34px 20px; color: var(--muted); text-align: center; font-size: 11px; }

.form-grid { display: grid; gap: 15px; }
.form-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; }
.field label { color: #41423f; font-size: 11px; font-weight: 690; }
.field-hint { margin: -2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.input, .select { height: 41px; padding: 0 12px; font-size: 11px; }
.textarea { min-height: 92px; padding: 11px 12px; font-size: 11px; line-height: 1.5; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #a5a69f; box-shadow: 0 0 0 3px rgba(21,21,19,.06); }
.input::placeholder, .textarea::placeholder { color: #a7a8a3; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.checkbox-row input { margin-top: 2px; accent-color: var(--ink); }

.voice-options { display: grid; gap: 10px; }
.voice-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.voice-option:hover { border-color: #c6c7c1; }
.voice-option.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.provider-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #fff; background: #242522; font-size: 11px; font-weight: 800; }
.provider-icon.azure { background: #0875c9; }
.provider-icon.openai { color: #191a18; background: #e1e9e4; }
.voice-option strong { display: block; font-size: 12px; }
.voice-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.radio-dot { width: 17px; height: 17px; border: 1px solid var(--line-strong); border-radius: 50%; box-shadow: inset 0 0 0 4px #fff; background: #fff; }
.selected .radio-dot { border-color: var(--ink); background: var(--ink); }
.info-note { padding: 13px 14px; border: 1px solid #dce3fc; border-radius: 10px; color: #43527b; background: #f5f7ff; font-size: 10px; line-height: 1.5; }

.chart-card { padding: 20px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.chart-legend { display: flex; gap: 15px; color: var(--muted); font-size: 9px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--ink); }
.legend-dot.accent { background: var(--accent); }
.bar-chart { display: flex; height: 180px; align-items: flex-end; gap: 10px; margin-top: 26px; padding-top: 10px; border-bottom: 1px solid var(--line); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% 45px; }
.bar-group { display: flex; height: 100%; flex: 1; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { width: min(12px, 35%); min-height: 3px; border-radius: 4px 4px 0 0; background: var(--ink); }
.bar.accent { background: var(--accent); }
.bar-labels { display: flex; justify-content: space-around; margin-top: 8px; color: var(--soft); font-size: 8px; }

.plan-grid { grid-template-columns: repeat(5, minmax(180px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
.plan-card { position: relative; display: flex; min-height: 385px; flex-direction: column; padding: 19px; }
.plan-card.featured { color: #fff; border-color: #252622; background: #252622; box-shadow: var(--shadow); }
.plan-card.current::before { content: none; }
.plan-name { font-size: 13px; font-weight: 730; }
.plan-price { min-height: 50px; margin-top: 14px; font-size: 28px; font-weight: 760; letter-spacing: -.05em; }
.plan-price small { color: var(--muted); font-size: 10px; font-weight: 550; letter-spacing: 0; }
.featured .plan-price small, .featured .plan-summary { color: #bfc1bb; }
.plan-summary { min-height: 48px; margin: 5px 0 16px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.plan-features { display: grid; gap: 10px; margin: 0 0 20px; padding: 15px 0 0; border-top: 1px solid var(--line); list-style: none; }
.featured .plan-features { border-color: #454641; }
.plan-features li { display: flex; gap: 7px; font-size: 9px; line-height: 1.4; }
.plan-features li::before { content: "✓"; color: var(--green); font-weight: 900; }
.featured .plan-features li::before { color: #74d79e; }
.plan-card .button { margin-top: auto; }

.settings-list { display: grid; }
.setting-row { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-copy strong { display: block; font-size: 11px; }
.setting-copy small { display: block; max-width: 560px; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.toggle { position: relative; width: 37px; height: 21px; border: 0; border-radius: 999px; background: #d6d7d2; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .18s; }
.toggle.on { background: var(--ink); }
.toggle.on::after { transform: translateX(16px); }

.modal-layer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; }
.modal-layer[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16,16,14,.42); backdrop-filter: blur(4px); }
.modal {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0,0,0,.2);
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 21px 22px 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.modal-close { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: #f2f2ef; font-size: 18px; cursor: pointer; }
.modal-body { padding: 20px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 22px; border-top: 1px solid var(--line); background: #fafaf8; }
.secret-reveal { padding: 14px; border: 1px solid #f0d4c7; border-radius: 10px; background: var(--accent-soft); }
.secret-reveal code { display: block; overflow-wrap: anywhere; color: #6c351f; font: 10px/1.5 ui-monospace, monospace; }
.secret-reveal p { margin: 8px 0 0; color: #8c5d48; font-size: 9px; line-height: 1.45; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; width: min(360px, calc(100vw - 40px)); gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid #d9dad5; border-radius: 11px; background: #fff; box-shadow: var(--shadow); animation: toast-in .2s ease both; }
.toast-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); }
.toast strong { display: block; font-size: 11px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.page-loading { display: grid; gap: 14px; }
.page-loading span { display: block; height: 120px; border-radius: 15px; background: linear-gradient(90deg, #ecece8, #f8f8f6, #ecece8); background-size: 200% 100%; animation: skeleton 1.2s linear infinite; }
.page-loading span:first-child { height: 70px; }
@keyframes skeleton { to { background-position: -200% 0; } }

.muted { color: var(--muted); }
.text-success { color: var(--green); }
.text-danger { color: var(--danger); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --sidebar: 278px; }
  .sidebar { transform: translateX(-102%); box-shadow: 18px 0 60px rgba(0,0,0,.12); transition: transform .2s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(20,20,18,.38); }
  body.menu-open .sidebar-scrim { display: block; }
  .app-column { margin-left: 0; }
  .topbar { display: none; }
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(250,250,248,.92);
    backdrop-filter: blur(14px);
  }
  .language-control-mobile { display:inline-flex; }
  .language-control-mobile select { width:104px; }
  .mobile-header .brand { font-size: 16px; }
  .mobile-header .brand-mark { width: 22px; height: 22px; }
  .icon-button { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: #efefec; }
  .page-outlet { padding: 26px 17px 55px; }
  .preview-banner { align-items: flex-start; padding-inline: 17px; text-align: left; }
  .two-column, .two-equal { grid-template-columns: 1fr; }
  .page-header { align-items: flex-start; }
}

@media (max-width: 600px) {
  .preview-banner { display: grid; gap: 2px; }
  .page-header { display: grid; gap: 18px; }
  .page-title { font-size: 29px; }
  .header-actions { width: 100%; }
  .header-actions .button { flex: 1; }
  .metrics-grid, .avatar-grid, .three-column, .form-two { grid-template-columns: 1fr; }
  .metric-card { min-height: 126px; }
  .avatar-visual { aspect-ratio: 1.5 / 1; }
  .avatar-card-actions { align-items: stretch; flex-direction: column; }
  .avatar-card-actions .button { width: 100%; }
  .architecture-flow { grid-template-columns: 1fr; }
  .flow-node:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -15px; transform: translateX(50%); }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .data-table td { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 9px; padding: 5px 14px; border: 0; }
  .data-table td::before { content: attr(data-label); color: var(--soft); font-size: 8px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
  .data-table td[colspan] { display: block; }
  .data-table td[colspan]::before, .table-actions::before { content: none; }
  .data-table tr:last-child { border-bottom: 0; }
  .table-actions { justify-content: flex-start; padding-top: 7px !important; }
  .check-row { grid-template-columns: 28px minmax(0, 1fr); padding: 8px 0; }
  .check-row .inline-action { grid-column: 2; justify-self: start; padding: 0; }
  .onboarding-lead { padding: 21px; }
  .onboarding-lead h2 { font-size: 20px; }
  .plan-grid { margin-right: -17px; padding-right: 17px; grid-template-columns: repeat(5, 240px); }
  .modal-layer { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 91vh; border-radius: 18px 18px 0 0; }
  .input-row { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
