:root {
  --bg: #080808;
  --surface: #0b0b0b;
  --surface-raised: #101010;
  --surface-hover: #141414;
  --border: #1b1b1b;
  --border-strong: #292929;
  --text: #e6e6e6;
  --muted: #94949b;
  --muted-2: #74747c;
  --accent: #7c5cff;
  --accent-hover: #8d73ff;
  --accent-soft: rgba(124, 92, 255, .12);
  --green: #55b98b;
  --yellow: #caa34e;
  --red: #d56b76;
  --radius: 7px;
}

* { box-sizing: border-box; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 400 13px/1.45 "Geist", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 20%, rgba(124,92,255,.11), transparent 36%), var(--bg); }
.auth-card { width: min(100%, 410px); padding: 30px; border: 1px solid var(--border-strong); border-radius: 12px; background: #0d0d0f; box-shadow: 0 24px 80px rgba(0,0,0,.38); }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand > span:last-child strong, .auth-brand > span:last-child small { display: block; }
.auth-brand > span:last-child strong { font-size: 13px; letter-spacing: .08em; }
.auth-brand > span:last-child small { margin-top: 2px; color: var(--muted-2); font-size: 10px; letter-spacing: .14em; }
.auth-copy { margin: 42px 0 24px; }
.auth-copy > span { color: var(--accent-hover); font-size: 10px; font-weight: 600; letter-spacing: .15em; }
.auth-copy h1 { margin: 7px 0 5px; font-size: 25px; font-weight: 600; }
.auth-copy p { margin: 0; color: var(--muted); }
.auth-form { display: grid; gap: 16px; }
.auth-form label span { display: block; margin-bottom: 7px; color: #b8b8be; font-size: 11px; font-weight: 500; }
.auth-form input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #303036; border-radius: 6px; outline: 0; color: var(--text); background: #09090a; }
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,92,255,.1); }
.auth-form .btn { height: 43px; margin-top: 3px; justify-content: center; }
.auth-error { margin: 0; padding: 9px 11px; border: 1px solid rgba(213,107,118,.28); border-radius: 6px; color: #ef9aa4; background: rgba(213,107,118,.08); font-size: 11px; }
.logout-button { height: 32px; display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; }
.logout-button:hover { color: var(--text); background: var(--surface-hover); }
.logout-button svg { width: 14px; height: 14px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection { background: rgba(124, 92, 255, .35); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b2b2b; border-radius: 8px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Application frame */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: 224px;
  display: flex;
  flex-direction: column;
  padding: 20px 12px 14px;
  background: var(--bg);
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 28px; }
.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #3b3b3b;
  border-radius: 6px;
  color: #f5f5f5;
}
.brand-mark::before { content: "L"; font-size: 12px; font-weight: 600; }
.brand-mark span { display: none; }
.brand strong { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.brand small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 11px; font-weight: 500; letter-spacing: .15em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  margin: 0 9px 7px;
  color: #555;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
}
.nav-label-secondary { margin-top: 22px; }
.nav-label-compact { margin-top: 14px; }
.nav-item {
  position: relative;
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  color: #858585;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color .12s ease, background .12s ease;
}
.nav-item:hover { color: #d2d2d2; background: #101010; }
.nav-item.active { color: #e8e8e8; background: rgba(255, 255, 255, .035); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: #8069e8;
}
.nav-item.active svg { color: #9a89eb; }
.nav-item svg { width: 15px; height: 15px; }
.nav-item span { flex: 1; font-size: 12px; font-weight: 400; }
.nav-item em {
  padding: 1px 6px;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  color: #888;
  background: transparent;
  font-size: 11px;
  font-style: normal;
}
.nav-item .soon-pill { color: #858585; background: transparent; font-size: 11px; }
.nav-item .available-pill { border-color: rgba(52,211,153,.24); color: #58dba9; background: rgba(52,211,153,.06); font-size: 11px; }
.nav-item .unavailable-pill {
  padding: 2px 7px;
  border-color: #3a3a42;
  color: #b5b5bd;
  background: #17171b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
}
.support-dot { display: block; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--accent); }
.user-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 14px 7px 3px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #383838;
  border-radius: 50%;
  color: #d8d8d8;
  background: #171717;
  font-size: 11px;
  font-weight: 500;
}
.avatar { width: 29px; height: 29px; }
.user-card > span:nth-child(2) { min-width: 0; flex: 1; }
.user-card strong, .user-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { font-size: 11px; font-weight: 500; }
.user-card small { margin-top: 2px; color: var(--muted-2); font-size: 11px; }
.user-card svg { width: 14px; color: #555; }

.main { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 8, .96);
}
.searchbox {
  width: min(440px, 44vw);
  height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid #292929;
  border-radius: 6px;
  background: #0b0b0b;
}
.searchbox:focus-within { border-color: #5948a8; box-shadow: 0 0 0 2px rgba(124, 92, 255, .08); }
.searchbox svg { width: 14px; color: #686868; }
.searchbox input { min-width: 0; flex: 1; border: 0; outline: 0; color: #ddd; background: transparent; font-size: 11px; }
.searchbox input::placeholder { color: #555; }
.searchbox kbd {
  padding: 1px 5px;
  border: 1px solid #2d2d2d;
  border-radius: 3px;
  color: #6f6f6f;
  background: transparent;
  font: 500 11px "Geist", "Segoe UI", system-ui, sans-serif;
}
.icon-btn { border: 0; background: transparent; cursor: pointer; }
.mobile-menu { display: none; }
.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 36px 40px 64px; }

/* Page composition */
.page-header {
  min-height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.eyebrow {
  margin: 0 0 8px;
  color: #686868;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow span { display: none; }
.page-header h1 { margin: 0; font-size: clamp(23px, 1.8vw, 29px); font-weight: 500; line-height: 1.15; letter-spacing: -.032em; }
.page-header h1 i { color: var(--muted); font-style: normal; font-weight: 400; }
.page-header .subtitle { margin: 7px 0 0; color: #777; font-size: 11px; }
.header-actions { display: flex; gap: 8px; }
.btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #303030;
  border-radius: 6px;
  color: #c8c8c8;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.btn:hover { border-color: #3b3b3b; color: #f2f2f2; background: #111; }
.btn-primary { border-color: #7455f2; color: #fff; background: var(--accent); }
.btn-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.btn-quiet { border-color: transparent; color: #8d8d8d; background: transparent; }
.btn-quiet:hover { border-color: transparent; color: #e1e1e1; background: #111; }
.btn-danger { border-color: rgba(213, 107, 118, .35); color: #e0818b; background: transparent; }
.btn svg { width: 14px; }

/* Overview */
.metric-grid {
  display: grid;
  grid-template-columns: 1fr .86fr .86fr 1.28fr;
  margin-bottom: 22px;
  border-block: 1px solid var(--border);
}
.metric-card {
  position: relative;
  min-height: 64px;
  padding: 8px 22px 7px;
  border-right: 1px solid var(--border);
  background: transparent;
}
.metric-card:first-child { padding-left: 0; }
.metric-card:last-child { padding-right: 0; }
.metric-card:last-child { border-right: 0; }
.metric-card::after { display: none; }
.metric-label { display: flex; align-items: center; gap: 6px; color: #838383; font-size: 11px; }
.metric-icon { width: 14px; height: 14px; display: grid; place-items: center; flex: none; color: #747474; }
.metric-icon svg { width: 14px; height: 14px; stroke-width: 1.5; }
.metric-value { margin: 6px 0 0; font-size: 22px; font-weight: 500; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-card:last-child .metric-value { font-size: 25px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(310px, .72fr); align-items: start; gap: 26px; }
.panel { overflow: hidden; border-block: 1px solid var(--border); background: transparent; }
.panel-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
}
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
.glow-dot { display: none; }
.link-button { display: flex; align-items: center; gap: 5px; padding: 0; border: 0; color: #7e7e7e; background: transparent; font-size: 11px; cursor: pointer; }
.link-button:hover { color: #d5d5d5; }
.link-button svg { width: 11px; }
.activity-panel .panel-head { padding-inline: 14px 8px; border-bottom: 1px solid var(--border); }
.activity-columns {
  min-height: 29px;
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) .9fr .65fr .75fr 24px;
  align-items: center;
  gap: 14px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid #1b1b1b;
  color: #5f5f5f;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.activity-list { padding: 0; }
.activity-row {
  min-height: 57px;
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) .9fr .65fr .75fr 24px;
  align-items: center;
  gap: 14px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid #1c1c1c;
  transition: background .12s ease;
}
.activity-row:hover { background: #0d0d0d; }
.activity-row:last-child { border-bottom: 0; }
.scan-id { min-width: 0; display: flex; align-items: center; gap: 12px; }
.carrier-mark, .carrier-mark.compact {
  position: relative;
  width: 36px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: none;
  overflow: visible;
  color: #d8d8d8;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 0;
  vertical-align: middle;
}
.carrier-mark img, .carrier-mark.compact img {
  width: auto;
  height: auto;
  max-width: 28px;
  max-height: 28px;
  display: block;
  object-fit: contain;
  object-position: center;
}
.carrier-mark.logo-failed::after { content: attr(data-fallback); color: #d8d8d8; font-size: 11px; font-weight: 600; }
.carrier-dhl img, .carrier-fedex img { width: 34px; max-width: 34px; max-height: 20px; }
.scan-id strong, .scan-id small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-id strong { font-size: 11px; font-weight: 500; }
.scan-id small { margin-top: 2px; color: #626262; font-size: 11px; }
.cell-main { color: #c5c5c5; font-size: 11px; }
.cell-sub { display: block; margin-top: 2px; color: #646464; font-size: 11px; }
.status {
  width: max-content;
  min-height: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.status::before { content: ""; width: 4px; height: 4px; flex: none; border-radius: 50%; background: currentColor; }
.status-progress { color: #aa98ff; }
.status-done { color: var(--green); }
.status-waiting { color: var(--yellow); }
.status-cancelled { color: var(--red); }
.row-more { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 4px; color: #6a6a6a; background: transparent; cursor: pointer; }
.row-more:hover { color: #ddd; background: #181818; }
.row-more::after { content: "•••"; font-size: 7px; letter-spacing: 1px; }
.side-stack { display: grid; align-content: start; gap: 20px; }
.side-stack .panel-head { min-height: 40px; }
.chart-wrap { padding: 14px 0 4px; }
.donut-area { min-height: 132px; display: flex; align-items: center; justify-content: flex-start; gap: 26px; }
.donut {
  width: 108px;
  height: 108px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 54%, var(--green) 54% 76%, var(--yellow) 76% 88%, #ef6374 88%);
}
.donut::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--bg); }
.donut-label { position: relative; text-align: center; }
.donut-label strong { display: block; font-size: 21px; font-weight: 500; }
.donut-label small { color: #777; font-size: 11px; }
.legend { display: grid; gap: 10px; }
.legend-item { display: grid; grid-template-columns: 6px 1fr auto; align-items: center; gap: 8px; color: #7a7a7a; font-size: 11px; }
.legend-item span:first-child { width: 5px; height: 5px; border-radius: 1px; }
.legend-item strong { color: #c8c8c8; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.revenue { padding: 14px 0 8px; }
.revenue-total { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.revenue-total strong { font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; }
.revenue-total span { color: var(--green); font-size: 11px; }
.bars {
  height: 92px;
  display: flex;
  align-items: end;
  gap: 6px;
  padding-top: 10px;
  border-bottom: 1px solid #2b2b2b;
  background: repeating-linear-gradient(to top, transparent 0, transparent 29px, #1d1d1d 30px);
}
.bar { flex: 1; min-width: 8px; background: #2b2b2b; transition: background .12s ease; }
.bar.active, .bar:hover { background: var(--accent); }
.bar-labels { display: flex; justify-content: space-between; margin-top: 8px; color: #555; font-size: 11px; }

/* Tables and filters */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.filter-group { display: flex; gap: 3px; flex-wrap: wrap; }
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px 9px;
  border: 1px solid transparent;
  border-radius: 0;
  color: #777;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.filter-btn svg { width: 14px; height: 14px; flex: none; opacity: .62; stroke-width: 1.45; }
.filter-btn span { line-height: 1; }
.filter-btn:hover { color: #c8c8c8; background: transparent; }
.filter-btn.active { border-color: transparent transparent var(--accent); color: #d4ccff; background: transparent; }
.filter-btn.active svg { opacity: 1; }
.toolbar > .btn { margin-bottom: 3px; }
.scan-toolbar { position: relative; }
.scan-toolbar.has-active-filters { margin-bottom: 58px; }
.scan-filter-menu { position: static; display: flex; align-items: center; align-self: stretch; }
.scan-filter-trigger { position: relative; margin-bottom: 3px; }
.scan-filter-trigger.active { border-color: #493d7a; color: #d8d1ff; background: rgba(124,92,255,.08); }
.scan-filter-trigger strong { min-width: 18px; height: 18px; display: grid; place-items: center; margin-left: 2px; padding: 0 5px; border-radius: 9px; color: #fff; background: var(--accent); font-size: 11px; font-weight: 600; }
.scan-filter-panel {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  right: 0;
  width: min(820px, calc(100vw - 64px));
  overflow: hidden;
  border: 1px solid #303036;
  border-radius: 9px;
  background: #0d0d0f;
  box-shadow: 0 22px 60px rgba(0,0,0,.58);
  animation: filterPanelIn .16s ease;
}
.scan-filter-panel[hidden] { display: none; }
.scan-filter-panel header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px; border-bottom: 1px solid #232327; }
.scan-filter-panel header > div { display: flex; align-items: center; gap: 11px; }
.scan-filter-panel header strong, .scan-filter-panel header small { display: block; }
.scan-filter-panel header strong { color: #e5e5e7; font-size: 12px; font-weight: 600; }
.scan-filter-panel header small { margin-top: 2px; color: #6f6f76; font-size: 11px; }
.scan-filter-panel header > button { padding: 6px 8px; border: 0; border-radius: 5px; color: #8d82c8; background: transparent; font-size: 11px; cursor: pointer; }
.scan-filter-panel header > button:hover { color: #c9c0ff; background: rgba(124,92,255,.08); }
.filter-panel-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #333039; border-radius: 7px; color: #a493ff; background: #17151d; }
.filter-panel-icon svg { width: 15px; height: 15px; }
.period-presets { display: flex; gap: 5px; padding: 12px 18px 0; }
.period-presets button { min-height: 29px; padding: 0 10px; border: 1px solid #29292f; border-radius: 5px; color: #7d7d84; background: #111114; font-size: 11px; cursor: pointer; }
.period-presets button:hover { color: #ccc; border-color: #3b3944; }
.period-presets button.active { color: #dcd6ff; border-color: #514485; background: rgba(124,92,255,.1); }
.scan-filter-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; padding: 14px 18px 18px; }
.scan-filter-grid label { min-width: 0; display: grid; grid-column: span 2; gap: 6px; }
.scan-filter-grid label:nth-child(n+4) { grid-column: span 3; }
.scan-filter-grid label > span { color: #797980; font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.scan-filter-grid select, .scan-filter-grid input { width: 100%; height: 35px; padding: 0 10px; border: 1px solid #303038; border-radius: 6px; outline: 0; color: #d7d7dc; background-color: #121216; font-size: 11px; }
.scan-filter-grid select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2385858d' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.scan-filter-grid select:hover, .scan-filter-grid input:hover { border-color: #42424b; }
.scan-filter-grid select:focus, .scan-filter-grid input:focus { border-color: #6d58d2; box-shadow: 0 0 0 2px rgba(124,92,255,.1); }
.scan-filter-grid input::-webkit-calendar-picker-indicator { opacity: .55; filter: invert(1); cursor: pointer; }
.scan-filter-panel footer { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-top: 1px solid #232327; color: #85858d; font-size: 11px; }
.scan-filter-panel footer strong { color: #ddd; font-weight: 600; }
.scan-filter-panel footer small { color: #616168; font-size: 11px; }
.active-filter-bar { position: absolute; top: calc(100% + 10px); left: 0; display: flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; overflow-x: auto; white-space: nowrap; transition: opacity .12s ease; }
.scan-filter-panel:not([hidden]) ~ .active-filter-bar { visibility: hidden; pointer-events: none; }
.active-filter-bar > span { margin-right: 2px; color: #64646b; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.active-filter-bar button { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #302d3d; border-radius: 14px; color: #aaa1d5; background: #111016; font-size: 11px; cursor: pointer; }
.active-filter-bar button:hover { color: #ddd7ff; border-color: #504578; background: #17141f; }
.active-filter-bar button svg { width: 11px; height: 11px; }
.active-filter-bar .clear-filter-link { border-color: transparent; color: #73737a; background: transparent; }
@keyframes filterPanelIn { from { border-color: #202025; } to { border-color: #303038; } }
.table-panel { overflow: auto; }
.records-panel { border: 0; }
.clients-panel, .history-panel { border-top: 1px solid var(--border); }
.data-table { width: 100%; min-width: 850px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th {
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  color: #656565;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { height: 52px; padding: 0 12px; border-bottom: 1px solid #1d1d1d; color: #bcbcbc; font-size: 11px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 20px; }
.data-table tbody tr { transition: background .1s ease; }
.data-table tbody tr:hover { background: #0d0d0d; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-primary { color: #e0e0e0; font-size: 11px; font-weight: 500; }
.table-secondary { display: block; margin-top: 2px; color: #626262; font-size: 11px; }
.table-actions { display: flex; gap: 1px; opacity: .35; transition: opacity .12s ease; }
.data-table tr:hover .table-actions, .table-actions:focus-within { opacity: 1; }
.action-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #707070;
  background: transparent;
  cursor: pointer;
}
.action-btn:hover { color: #eee; background: #191919; }
.action-btn.danger:hover { color: var(--red); background: rgba(213, 107, 118, .08); }
.action-btn svg { width: 13px; }
.select-inline { max-width: 125px; min-height: 30px; padding: 5px 22px 5px 8px; border: 1px solid #2c2c2c; border-radius: 5px; outline: 0; color: #d1d1d1; background: #0d0d0d; font-size: 11px; }
.carrier-cell, .carrier-select-control { min-width: 0; display: flex; align-items: center; gap: 10px; }
.carrier-cell > span:last-child { min-width: 0; display: flex; align-items: center; }
.scans-table .carrier-cell { min-height: 30px; gap: 10px; }
.scans-table .carrier-cell .table-secondary { display: none; }
.carrier-select-control select { flex: 1; }
.service-code { color: #aaa; font-size: 11px; font-weight: 500; white-space: nowrap; }
.scans-table td:nth-child(5) { min-width: 0; overflow: hidden; }
.shop-name { max-width: 100%; display: block; overflow: hidden; color: #ededf0; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.shop-name.needs-review { color: #e6b94f; font-weight: 600; }
.scans-table .carrier-cell .table-primary { overflow: hidden; color: #d9d9d9; font-size: 11px; font-weight: 500; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.pagination { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px; border-top: 1px solid var(--border); color: #656565; font-size: 11px; }
.pages { display: flex; gap: 3px; }
.pages button { width: 25px; height: 25px; border: 0; border-radius: 4px; color: #6f6f6f; background: transparent; font-size: 11px; cursor: pointer; }
.pages button:hover { color: #ddd; background: #151515; }
.pages button.active { color: #d7d0ff; background: var(--accent-soft); }

/* Clients */
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.client-card { position: relative; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: transparent; }
.client-top { display: flex; align-items: flex-start; gap: 10px; }
.client-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #353535;
  border-radius: 50%;
  color: #d5d5d5;
  background: #131313;
  font-size: 11px;
  font-weight: 500;
}
.customer-cell { display: flex; align-items: center; gap: 10px; }
.customer-cell .table-primary, .customer-cell .table-secondary { white-space: nowrap; }
.membership { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 11px; font-weight: 500; }
.membership::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.client-name { min-width: 0; flex: 1; }
.client-name strong, .client-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-name strong { font-size: 11px; font-weight: 500; }
.client-name span { margin-top: 3px; color: #666; font-size: 11px; }
.client-menu { border: 0; color: #666; background: transparent; cursor: pointer; }
.client-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 15px 0; padding: 12px 0; border-block: 1px solid #222; }
.client-meta span { display: block; color: #626262; font-size: 11px; }
.client-meta strong { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; }
.client-bottom { display: flex; align-items: center; justify-content: space-between; }
.balance { color: #777; font-size: 11px; }
.balance strong { color: #ddd; font-size: 11px; font-weight: 500; }
.client-actions { display: flex; gap: 3px; }

/* Finance */
.finance-page .page-header { margin-bottom: 22px; }
.finance-summary {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr .72fr;
  border-block: 1px solid var(--border);
}
.finance-stat {
  min-width: 0;
  min-height: 92px;
  padding: 14px 18px 13px;
  border-right: 1px solid var(--border);
}
.finance-stat:first-child { padding-left: 0; }
.finance-stat:last-child { padding-right: 0; border-right: 0; }
.finance-stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7e7e7e;
  font-size: 11px;
}
.finance-stat-label > span { width: 14px; height: 14px; display: grid; place-items: center; flex: none; color: #707070; }
.finance-stat-label svg { width: 14px; height: 14px; stroke-width: 1.5; }
.finance-stat-content { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.finance-stat-content > strong {
  overflow: hidden;
  color: #ededed;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.finance-stat-main .finance-stat-content > strong { font-size: 24px; }
.finance-actions { display: flex; align-items: center; gap: 3px; flex: none; }
.finance-actions .btn { min-height: 30px; padding-inline: 9px; font-size: 11px; }
.finance-history { margin-top: 24px; }
.finance-history-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.finance-history-head > div { display: flex; align-items: baseline; gap: 9px; }
.finance-history-head h2 { margin: 0; font-size: 12px; font-weight: 500; }
.finance-history-head span { color: #626262; font-size: 11px; }
.finance-toolbar {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.finance-search-note { padding-bottom: 9px; color: #5e5e5e; font-size: 11px; }
.finance-table-wrap { overflow: auto; }
.finance-table th { height: 33px; }
.finance-table td { height: 50px; }
.amount-positive { color: var(--green); }
.amount-negative { color: var(--red); }

/* Settings */
.settings-page .page-header { margin-bottom: 25px; }
.autosave-status { display: inline-flex; align-items: center; gap: 7px; color: #7b7b7b; font-size: 11px; white-space: nowrap; }
.autosave-status i { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--green); }
.autosave-status[data-state="saving"] i { background: var(--yellow); animation: autosavePulse .8s ease-in-out infinite alternate; }
.autosave-status[data-state="error"] { color: #bf737b; }
.autosave-status[data-state="error"] i { background: var(--red); }
@keyframes autosavePulse { to { opacity: .35; } }
.pricing-registry { border-top: 1px solid var(--border); }
.settings-carriers { display: grid; }
.settings-carrier { border-bottom: 1px solid var(--border); }
.settings-carrier > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 10px 0 4px;
  list-style: none;
  cursor: pointer;
  transition: background .12s ease;
}
.settings-carrier > summary::-webkit-details-marker { display: none; }
.settings-carrier > summary:hover { background: #0d0d0d; }
.settings-carrier[open] > summary { background: #0c0c0c; }
.settings-carrier-id { min-width: 0; display: flex; align-items: center; gap: 12px; }
.settings-carrier-id strong { display: block; }
.settings-carrier-id strong { font-size: 13px; font-weight: 500; }
.settings-carrier-meta { display: inline-flex; align-items: center; gap: 12px; color: #808080; font-size: 11px; white-space: nowrap; }
.settings-carrier-meta svg { width: 13px; height: 13px; transform: rotate(90deg); transition: transform .15s ease; }
.settings-carrier[open] .settings-carrier-meta svg { transform: rotate(-90deg); }
.pricing-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding: 0 16px 20px 52px;
  background: #0c0c0c;
}
.pricing-groups.single { grid-template-columns: minmax(0, calc(50% - 14px)); }
.pricing-tier { min-width: 0; border-top: 1px solid #292929; }
.pricing-tier-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pricing-tier-head > div { display: flex; align-items: baseline; gap: 8px; }
.pricing-tier-head h3 { margin: 0; font-size: 12px; font-weight: 500; }
.pricing-tier-head span { color: #737373; font-size: 11px; }
.add-service {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  color: #858585;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.add-service:hover { color: #e6e6e6; background: #181818; }
.add-service svg { width: 12px; height: 12px; }
.pricing-services { display: grid; }
.pricing-service {
  min-height: 49px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 28px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #202020;
  color: #d0d0d0;
  font-size: 11px;
}
.service-name-input {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  outline: 0;
  color: #d8d8d8;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.service-name-input:hover { border-color: #292c31; background: #101115; }
.service-name-input:focus { border-color: #5f50b7; background: #121219; box-shadow: 0 0 0 2px rgba(124, 92, 255, .08); }
.service-name-input.invalid { border-color: var(--red); background: rgba(213, 107, 118, .06); }
.price-input { position: relative; display: block; }
.price-input input {
  width: 100%;
  height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid #32343a;
  border-radius: 5px;
  outline: 0;
  color: #ededed;
  background: #121318;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.price-input input:hover { border-color: #454851; background: #15171c; }
.price-input input:focus { border-color: #745ee0; background: #14131b; box-shadow: 0 0 0 2px rgba(124, 92, 255, .1); }
.price-input small { position: absolute; inset: 0 9px 0 auto; display: flex; align-items: center; color: #898990; font-size: 11px; pointer-events: none; }
.pricing-delete { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; color: #5f5f5f; background: transparent; cursor: pointer; }
.pricing-delete:hover { color: var(--red); background: rgba(213, 107, 118, .08); }
.pricing-delete svg { width: 13px; height: 13px; }
.pricing-empty { min-height: 49px; display: flex; align-items: center; border-top: 1px solid #202020; color: #686868; font-size: 11px; }

/* Empty and upcoming states */
.empty-state { padding: 52px 20px; color: #707070; text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: #d2d2d2; font-weight: 500; }
.coming-soon { min-height: 410px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 48px 24px; text-align: center; }
.coming-icon { margin-bottom: 18px; color: #7c7c7c; }
.coming-icon svg { width: 24px; height: 24px; }
.coming-badge { color: #6f6f6f; font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.coming-soon h2 { margin: 13px 0 6px; font-size: 19px; font-weight: 500; }
.coming-soon p { max-width: 390px; margin: 0; color: #707070; font-size: 11px; line-height: 1.6; }

/* Modals and forms */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; justify-items: center; padding: 24px; background: rgba(0, 0, 0, .84); }
.modal-backdrop.open { display: grid; animation: fade .12s ease; }
.modal { width: min(920px, 100%); max-height: min(760px, 92vh); overflow: auto; border: 1px solid #303030; border-radius: 7px; background: #0a0a0a; animation: modalIn .16s ease; }
.modal-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--border); }
.modal-title-wrap { display: flex; align-items: center; gap: 8px; }
.modal-title-wrap .glow-dot { background: #676767; }
.modal-head h2 { margin: 0; font-size: 13px; font-weight: 500; }
.modal-kicker { display: block; margin-top: 2px; color: #585858; font-size: 11px; letter-spacing: .04em; }
.modal-close { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 4px; color: #737373; background: transparent; cursor: pointer; }
.modal-close:hover { color: #eee; background: #171717; }
.modal-close svg { width: 14px; }
.modal-body { padding: 0; }
.detail-layout, .notification-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); overflow: hidden; }
.detail-pane { min-width: 0; padding: 16px 20px 18px; }
.detail-pane + .detail-pane { border-left: 1px solid var(--border); }
.detail-pane-head { min-height: 30px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; padding-bottom: 9px; border-bottom: 1px solid #202020; }
.detail-pane-title { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; }
.detail-pane-note { color: #626262; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr; }
.field { min-height: 45px; display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid #1f1f1f; }
.field.full { grid-column: auto; }
.field label { color: #747474; font-size: 11px; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 32px; padding: 0 7px; border: 1px solid transparent; border-radius: 4px; outline: 0; color: #ededed; background: transparent; font-size: 11px; font-weight: 400; transition: border-color .12s ease, background .12s ease; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #292929; background: #0e0e0e; }
.field textarea { min-height: 62px; padding-top: 7px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #5e4db0; background: #0e0e0e; box-shadow: 0 0 0 2px rgba(124, 92, 255, .07); }
.readonly-field { cursor: default; }
.readonly-value { min-width: 0; display: flex; align-items: center; color: #e5e5e5; font-size: 11px; }
.readonly-client, .readonly-carrier { min-width: 0; display: flex; align-items: center; gap: 10px; }
.readonly-carrier { min-height: 30px; line-height: 1; }
.readonly-client > span:last-child { min-width: 0; }
.readonly-client strong, .readonly-client small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readonly-client strong, .readonly-carrier strong { font-size: 11px; font-weight: 500; }
.readonly-carrier strong { display: flex; align-items: center; min-height: 30px; line-height: 1.25; }
.readonly-client small { margin-top: 2px; color: #666; font-size: 11px; }
.client-avatar.mini { width: 29px; height: 29px; font-size: 11px; }
.summary-list { display: grid; }
.summary-row { min-height: 42px; display: grid; grid-template-columns: minmax(100px, .9fr) minmax(0, 1.15fr); align-items: center; gap: 12px; border-bottom: 1px solid #1f1f1f; font-size: 11px; }
.summary-row > span:first-child { color: #777; }
.summary-row strong { min-width: 0; overflow: hidden; color: #e4e4e4; font-size: 11px; font-weight: 500; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.summary-row strong.positive { color: var(--green); }
.summary-row strong.negative { color: var(--red); }
.summary-highlight { margin: 13px 0 2px; padding: 12px 0; border-block: 1px solid #252525; }
.summary-highlight span { display: block; color: #777; font-size: 11px; letter-spacing: .05em; }
.summary-highlight strong { display: block; margin-top: 5px; font-size: 21px; font-weight: 500; letter-spacing: -.04em; }
.mini-history { margin-top: 14px; }
.mini-history-title { margin-bottom: 7px; color: #6d6d6d; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.mini-history-row { min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #1f1f1f; font-size: 11px; }
.mini-history-row span { color: #747474; }
.scan-detail-layout { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .5fr); }
.scan-action-pane, .notification-preview { background: #0d0d0d; }
.scan-actions { display: grid; }
.scan-action { min-height: 56px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #1f1f1f; }
.scan-action-icon { display: grid; place-items: center; color: #898989; }
.scan-action-icon svg { width: 15px; }
.scan-action > span:nth-child(2) { min-width: 0; }
.scan-action strong, .scan-action small { display: block; }
.scan-action strong { font-size: 11px; font-weight: 500; }
.scan-action small { margin-top: 3px; overflow: hidden; color: #686868; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.scan-action button { min-height: 25px; padding: 0 5px; border: 0; border-radius: 4px; color: #777; background: transparent; font-size: 11px; cursor: pointer; }
.scan-action button:hover { color: #ddd; background: #181818; }
.scan-action-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 0 0; color: #606060; font-size: 11px; line-height: 1.45; }
.action-empty { min-height: 0; display: block; padding: 18px 0; text-align: left; }
.action-empty .scan-action-icon { display: inline-grid; margin: 0 8px 0 0; vertical-align: middle; }
.action-empty strong { font-size: 11px; font-weight: 500; }
.action-empty p { max-width: 250px; margin: 7px 0 0 26px; color: #686868; font-size: 11px; line-height: 1.55; }
.field.is-editing select { border-color: #6653bd; background: #0e0d13; box-shadow: 0 0 0 2px rgba(124, 92, 255, .08); }

.notification-layout { grid-template-columns: minmax(0, 1.05fr) minmax(310px, .95fr); }
.notification-options { display: grid; }
.notification-option { position: relative; min-height: 56px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 14px; align-items: center; gap: 9px; padding: 7px 8px; border-bottom: 1px solid #202020; cursor: pointer; }
.notification-option:hover { background: #101010; }
.notification-option:has(input:checked) { background: rgba(124, 92, 255, .055); box-shadow: inset 2px 0 var(--accent); }
.notification-option input { position: absolute; opacity: 0; pointer-events: none; }
.notification-option strong, .notification-option small { display: block; }
.notification-option strong { color: #dfdfdf; font-size: 11px; font-weight: 500; }
.notification-option small { margin-top: 3px; color: #676767; font-size: 11px; }
.radio-check { width: 14px; height: 14px; border: 1px solid #494949; border-radius: 50%; }
.notification-option:has(input:checked) .radio-check { border: 4px solid var(--accent); }
.custom-message-field { display: none; margin-top: 12px; }
.custom-message-field.visible { display: grid; }
.custom-message-field label { color: #7e7e7e; font-size: 11px; font-weight: 500; }
.custom-message-field textarea { width: 100%; min-height: 100px; margin-top: 7px; padding: 10px; border: 1px solid #303030; border-radius: 5px; outline: 0; color: #e9e9e9; background: #090909; font-size: 11px; line-height: 1.55; resize: vertical; }
.custom-message-field textarea:focus { border-color: #5e4db0; }
.notification-preview { display: flex; flex-direction: column; }
.preview-meta { display: grid; margin-bottom: 16px; }
.preview-meta .summary-row { min-height: 43px; }
.message-preview { margin-top: 14px; padding: 13px; border-top: 1px solid #272727; background: #0d0d0d; }
.message-preview-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.message-preview-head .client-avatar { width: 31px; height: 31px; font-size: 11px; }
.message-preview-head strong, .message-preview-head small { display: block; }
.message-preview-head strong { font-size: 11px; font-weight: 500; }
.message-preview-head small { margin-top: 2px; color: #626262; font-size: 11px; }
.message-bubble { padding: 10px 11px; border-left: 2px solid #333; color: #cfcfcf; background: #0a0a0a; font-size: 11px; line-height: 1.55; }
.message-preview-foot { display: flex; justify-content: space-between; margin-top: 8px; color: #595959; font-size: 11px; }
.modal-foot { min-height: 48px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 8px 14px; border-top: 1px solid var(--border); }
.modal-foot .btn { min-height: 32px; }

/* Scan record modal */
.modal-scan {
  --modal-control-height: 36px;
  width: min(980px, 100%);
  max-height: min(780px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-inline: auto;
  place-self: center;
}
.modal-scan #modalForm { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.modal-scan .modal-body { min-height: 0; overflow: auto; }
.modal-scan .modal-head {
  min-height: 56px;
  padding: 0 22px;
}
.modal-scan .modal-head h2 { font-size: 14px; }
.modal-scan .scan-detail-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.modal-scan .detail-pane {
  padding: 20px 22px 22px;
}
.modal-scan .detail-pane-head {
  min-height: 35px;
  margin-bottom: 5px;
  padding-bottom: 11px;
}
.modal-scan .detail-pane-title { font-size: 12px; }
.modal-scan .detail-pane-note { font-size: 11px; }
.modal-scan .field {
  min-height: 52px;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
}
.modal-scan .field label {
  color: #717171;
  font-size: 11px;
  line-height: 1.3;
}
.modal-scan .editable-field label { color: #9a9a9a; }
.modal-scan .readonly-value {
  min-height: var(--modal-control-height);
  padding: 0 10px;
  color: #d7d7d7;
  font-size: 12px;
}
.modal-scan .readonly-client,
.modal-scan .readonly-carrier { width: 100%; }
.modal-scan .editable-field > input,
.modal-scan .editable-field > select {
  height: var(--modal-control-height);
  padding: 0 32px 0 10px;
  border: 1px solid #34373d;
  border-radius: 5px;
  color: #f0f0f0;
  background-color: #111318;
  font-size: 12px;
}
.modal-scan .editable-field > input { padding-right: 10px; }
.modal-scan .editable-field > select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23a7a7aa' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.modal-scan .editable-field > input::placeholder { color: #727780; opacity: 1; }
.modal-scan .editable-field > input:hover,
.modal-scan .editable-field > select:hover {
  border-color: #474b54;
  background-color: #15171c;
}
.modal-scan .editable-field > input:focus,
.modal-scan .editable-field > select:focus {
  border-color: #745ee0;
  background-color: #14131b;
  box-shadow: 0 0 0 2px rgba(124, 92, 255, .1);
}
.modal-scan .editable-field > select option {
  color: #ececec;
  background: #111318;
}
.modal-scan .carrier-select-control {
  position: relative;
  width: 100%;
  min-width: 0;
  display: block;
  gap: 0;
}
.modal-scan .carrier-select-trigger {
  width: 100%;
  height: var(--modal-control-height);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #34373d;
  border-radius: 5px;
  color: #f0f0f0;
  background: #111318;
  text-align: left;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.modal-scan .carrier-select-trigger:hover { border-color: #474b54; background: #15171c; }
.modal-scan .carrier-select-trigger:focus-visible,
.modal-scan .carrier-select-control.open .carrier-select-trigger {
  outline: 0;
  border-color: #745ee0;
  background: #14131b;
  box-shadow: 0 0 0 2px rgba(124, 92, 255, .1);
}
.modal-scan .carrier-select-trigger [data-carrier-preview] { width: 36px; height: 30px; display: grid; place-items: center; align-self: center; }
.modal-scan .carrier-select-trigger .carrier-mark,
.modal-scan .carrier-option .carrier-mark { width: 36px; height: 30px; }
.modal-scan .carrier-select-trigger [data-carrier-label] { overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.modal-scan .carrier-select-trigger > svg {
  width: 13px;
  height: 13px;
  color: #a7a7aa;
  transform: rotate(90deg);
  transition: transform .12s ease;
}
.modal-scan .carrier-select-control.open .carrier-select-trigger > svg { transform: rotate(-90deg); }
.modal-scan .carrier-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  width: 100%;
  max-height: 238px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #34373d;
  border-radius: 6px;
  background: #101115;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .42);
}
.modal-scan .carrier-option {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  color: #b9bbc0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.modal-scan .carrier-option:hover,
.modal-scan .carrier-option:focus-visible { outline: 0; color: #f0f0f0; background: #1a1b20; }
.modal-scan .carrier-option[aria-selected="true"] { color: #f0edff; background: rgba(124, 92, 255, .09); }
.modal-scan .carrier-option > span:not(.carrier-mark) { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.modal-scan .carrier-option > svg { width: 13px; height: 13px; justify-self: end; color: var(--accent-hover); opacity: 0; }
.modal-scan .carrier-option[aria-selected="true"] > svg { opacity: 1; }
.modal-scan .carrier-select-control > input[type="hidden"] { display: none; }
.modal-scan .scan-action-pane {
  display: flex;
  flex-direction: column;
  background: #0c0c0d;
}
.modal-scan .scan-actions { width: 100%; }
.modal-scan .scan-action {
  min-height: 64px;
  grid-template-columns: 20px minmax(0, 1fr) 82px;
  gap: 10px;
}
.modal-scan .scan-action-icon { color: #777b83; }
.modal-scan .scan-action strong { color: #dedede; font-size: 11px; }
.modal-scan .scan-action small { color: #666a72; line-height: 1.35; }
.modal-scan .scan-action button {
  width: 82px;
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid #2c2e33;
  color: #a7a9af;
  background: #111216;
  font-size: 11px;
  text-align: center;
}
.modal-scan .scan-action button:hover {
  border-color: #41444c;
  color: #f0f0f0;
  background: #17181d;
}
.modal-scan .scan-action-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #1f1f1f;
}
.label-upload-section { padding: 16px 0 4px; }
.label-upload-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.label-upload-heading span { color: #d4d4d4; font-size: 11px; font-weight: 500; }
.label-upload-heading b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 5px; padding: 0 5px; border-radius: 9px; color: #ddd7ff; background: rgba(124,92,255,.16); font-size: 11px; font-weight: 600; }
.label-upload-heading b[hidden] { display: none; }
.label-upload-heading small { color: #676b73; font-size: 11px; }
.label-dropzone {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #393c44;
  border-radius: 7px;
  color: #aaaeb7;
  background: #101115;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.label-dropzone:hover, .label-dropzone.is-dragging { border-color: #745ee0; color: #e4dfff; background: rgba(124,92,255,.07); }
.label-dropzone.has-file { min-height: 68px; }
.label-dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.label-drop-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border: 1px solid #30333a; border-radius: 6px; background: #15171c; }
.label-drop-icon svg { width: 16px; height: 16px; }
.label-drop-copy { min-width: 0; }
.label-drop-copy strong, .label-drop-copy small { display: block; }
.label-drop-copy strong { color: #dedede; font-size: 11px; font-weight: 500; }
.label-drop-copy small { margin-top: 3px; color: #6e727a; font-size: 11px; line-height: 1.4; }
.label-files-list { max-height: 208px; display: grid; gap: 6px; margin-top: 8px; padding-right: 2px; overflow-y: auto; }
.label-file-card { min-height: 52px; display: grid; grid-template-columns: 20px 38px minmax(0,1fr) 28px; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid #292c32; border-radius: 6px; background: #111216; }
.label-file-order { color: #6d6d76; font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.label-file-preview { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 5px; color: #a99bff; background: #191823; }
.label-file-preview svg { width: 17px; height: 17px; }
.label-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.label-file-copy { min-width: 0; }
.label-file-copy strong, .label-file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label-file-copy strong { color: #dedede; font-size: 11px; font-weight: 500; }
.label-file-copy small { margin-top: 3px; color: #6f737b; font-size: 11px; }
.label-file-card button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 5px; color: #777b84; background: transparent; cursor: pointer; }
.label-file-card button:hover { color: #e5e5e5; background: #1c1d22; }
.label-file-card button svg { width: 14px; height: 14px; }
.modal-scan .label-count-field input[readonly] { color: #cfc8ff; background: #101015; cursor: default; }
.modal-scan .modal-foot {
  min-height: 54px;
  gap: 7px;
  padding: 9px 22px;
  background: #0b0b0c;
}
.modal-scan .modal-foot .btn { min-width: 82px; min-height: 34px; }
.modal-scan .modal-foot .btn-primary { min-width: 156px; }

.toast-stack { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 7px; }
.toast { min-width: 260px; display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid #343434; border-radius: 6px; background: #111; animation: toastIn .2s ease; font-size: 11px; }
.toast::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--green); }
.toast.error::before { background: var(--red); }

@keyframes fade { from { background-color: rgba(0,0,0,.72); } to { background-color: rgba(0,0,0,.78); } }
@keyframes modalIn { from { border-color: #26262c; } to { border-color: #303038; } }
@keyframes toastIn { from { border-color: #2a2a30; } to { border-color: #34343b; } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-card, .metric-card:first-child, .metric-card:last-child { padding-inline: 16px; }
  .metric-card:nth-child(2) { border-right: 1px solid var(--border); }
  .metric-card:nth-child(-n+2) { border-bottom: 0; }
  .dashboard-grid, .deposit-layout { grid-template-columns: 1fr; gap: 24px; }
  .history-panel { grid-column: auto; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .finance-summary { grid-template-columns: 1.35fr 1fr; }
  .finance-stat, .finance-stat:first-child, .finance-stat:last-child { padding-inline: 16px; }
  .finance-stat:nth-child(2) { border-right: 0; }
  .finance-stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { visibility: hidden; pointer-events: none; }
  .sidebar.open { visibility: visible; pointer-events: auto; }
  .main { width: 100%; }
  .topbar { height: 58px; padding: 0 16px; }
  .mobile-menu { width: 30px; height: 30px; display: grid; place-content: center; gap: 4px; margin-right: 9px; border: 0; border-radius: 5px; background: transparent; }
  .mobile-menu:hover { background: #151515; }
  .mobile-menu span { width: 14px; height: 1px; background: #aaa; }
  .searchbox { width: auto; flex: 1; }
  .searchbox kbd { display: none; }
  .content { padding: 28px 16px 40px; }
  .scan-toolbar { align-items: center; }
  .scan-filter-panel { position: fixed; top: 70px; right: 16px; left: 16px; width: auto; max-height: calc(100vh - 86px); overflow-y: auto; }
  .scan-filter-grid { grid-template-columns: 1fr; }
  .scan-filter-grid label, .scan-filter-grid label:nth-child(n+4) { grid-column: auto; }
  .period-presets { overflow-x: auto; }
  .period-presets button { flex: none; }
  .page-header { min-height: 0; align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .finance-page .page-header { margin-bottom: 20px; }
  .client-grid { grid-template-columns: 1fr; }
  .settings-workspace, .detail-layout, .notification-layout { grid-template-columns: 1fr; }
  .modal-scan .scan-detail-layout { grid-template-columns: 1fr; }
  .detail-pane + .detail-pane { border-top: 1px solid var(--border); border-left: 0; }
  .modal-scan .scan-action-foot { margin-top: 12px; }
  .pricing-groups, .pricing-groups.single { grid-template-columns: 1fr; gap: 18px; padding-left: 52px; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: 95vh; }
}

@media (max-width: 620px) {
  .finance-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-stat-main { grid-column: 1 / -1; padding: 13px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .finance-stat:nth-child(n+2) { min-height: 78px; padding: 12px 10px; border-bottom: 0; }
  .finance-stat:nth-child(2) { padding-left: 0; border-right: 1px solid var(--border); }
  .finance-stat:nth-child(4) { padding-right: 0; border-right: 0; }
  .finance-stat-content { margin-top: 11px; }
  .finance-stat-content > strong { font-size: 16px; }
  .finance-stat-main .finance-stat-content > strong { font-size: 22px; }
  .finance-history { margin-top: 20px; }
  .finance-search-note { display: none; }
}

.scan-weight-field[hidden] { display: none; }
.weight-control { min-width: 0; display: grid; gap: 3px; }
.weight-input { position: relative; }
.weight-input input { padding-right: 34px !important; }
.weight-input > span { position: absolute; inset: 0 10px 0 auto; display: flex; align-items: center; color: #94949c; font-size: 11px; pointer-events: none; }
.weight-control > small { color: #71717a; font-size: 11px; }

/* Suivi opérationnel des transmissions Insider. */
.insider-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin-bottom: 18px;
  border-block: 1px solid var(--border);
}
.insider-summary > div { min-height: 72px; display: flex; flex-direction: column; justify-content: center; padding: 0 18px; border-right: 1px solid var(--border); }
.insider-summary > div:first-child { padding-left: 4px; }
.insider-summary > div:last-child { border-right: 0; }
.insider-summary span { color: #85858d; font-size: 11px; }
.insider-summary strong { margin-top: 5px; color: #ededf0; font-size: 22px; font-weight: 600; letter-spacing: -.035em; }
.insider-toolbar { min-height: 52px; justify-content: space-between; }
.insider-toolbar-note { color: #787880; font-size: 11px; }
.insider-table th:nth-child(1) { width: 19%; }
.insider-table th:nth-child(2) { width: 18%; }
.insider-table th:nth-child(3) { width: 21%; }
.insider-table th:nth-child(4) { width: 18%; }
.insider-table th:nth-child(5) { width: 16%; }
.insider-label-link {
  max-width: 190px;
  display: inline-grid;
  grid-template-columns: 30px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  color: #d9d9df;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.insider-label-link > svg { width: 28px; height: 28px; padding: 7px; border: 1px solid #303039; border-radius: 5px; color: #a99cf1; background: #15141b; }
.insider-label-link span { min-width: 0; }
.insider-label-link strong,.insider-label-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insider-label-link strong { font-size: 12px; font-weight: 600; }
.insider-label-link small { margin-top: 2px; color: #73737c; font-size: 11px; }
.insider-label-link:not(:disabled):hover strong { color: #fff; }
.insider-label-link.empty { color: #777780; cursor: default; }
.insider-label-link.empty > svg { color: #6e6e76; background: #111114; }
.insider-check { display: inline-flex; align-items: center; gap: 8px; color: #b2b2ba; cursor: pointer; }
.insider-check input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.insider-check > span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #3a3a43; border-radius: 6px; background: #131316; transition: border-color .14s ease, background .14s ease; }
.insider-check > span svg { width: 12px; color: transparent; }
.insider-check em { font-size: 11px; font-style: normal; font-weight: 500; }
.insider-check:hover > span { border-color: #555560; }
.insider-check input:focus-visible + span { outline: 2px solid rgba(124,108,255,.42); outline-offset: 2px; }
.insider-check.is-sent { color: #67d9af; }
.insider-check.is-sent > span { border-color: rgba(52,211,153,.36); background: rgba(52,211,153,.1); }
.insider-check.is-sent > span svg { color: #58dba9; }
.insider-sent-date { display: block; margin: 4px 0 0 30px; color: #6e6e76; font-size: 11px; }
.insider-table .action-btn:disabled { opacity: .25; cursor: not-allowed; }

@media (max-width: 900px) {
  .insider-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .insider-summary > div:nth-child(2) { border-right: 0; }
  .insider-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .insider-toolbar-note { display: none; }
}

@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card, .metric-card:first-child, .metric-card:last-child { min-height: 70px; padding: 9px 14px 8px; }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .metric-value { margin-top: 8px; font-size: 20px; }
  .activity-row { grid-template-columns: minmax(145px, 1.2fr) minmax(90px, .8fr); gap: 10px; }
  .activity-columns { display: none; }
  .activity-row > :nth-child(3), .activity-row > :nth-child(4), .activity-row > :nth-child(5) { display: none; }
  .donut-area { gap: 18px; }
  .header-actions { width: 100%; }
  .header-actions .btn { flex: 1; }
  .field { grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
  .modal-scan .field { grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
  .modal-scan .detail-pane { padding: 16px; }
  .modal-scan .scan-action { grid-template-columns: 18px minmax(0, 1fr) 74px; }
  .modal-scan .scan-action button { width: 74px; }
  .modal-scan .modal-foot { padding-inline: 14px; }
  .modal-scan .modal-foot .btn-primary { min-width: 132px; }
  .settings-carrier > summary { padding-right: 4px; }
  .settings-carrier-meta { gap: 7px; }
  .pricing-groups, .pricing-groups.single { padding: 0 4px 16px; }
  .pricing-service { grid-template-columns: minmax(0, 1fr) 84px 28px; gap: 7px; }
  .add-service { padding-inline: 5px; }
  .detail-pane { padding: 16px; }
  .toolbar { align-items: flex-start; }
  .toolbar > .btn { padding-inline: 9px; }
}

@media (min-width: 1101px) {
  body { font-size: 15px; }
  .app-shell { grid-template-columns: 236px minmax(0, 1fr); }
  .sidebar { width: 236px; padding: 22px 14px 16px; }
  .brand { padding: 0 8px 30px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 11px; }
  .nav-label { font-size: 11px; }
  .nav-item { height: 40px; gap: 11px; padding-inline: 10px; }
  .nav-item span { font-size: 13px; }
  .nav-item em { font-size: 11px; }
  .avatar { width: 31px; height: 31px; }
  .user-card strong { font-size: 11px; }
  .user-card small { font-size: 11px; }

  .topbar { height: 66px; padding-inline: 44px; }
  .searchbox { width: min(460px, 44vw); height: 36px; padding-inline: 11px; }
  .searchbox input { font-size: 12px; }
  .searchbox kbd { font-size: 11px; }
  .content { max-width: 1560px; padding: 42px 44px 72px; }

  .page-header { min-height: 70px; margin-bottom: 32px; }
  .eyebrow { font-size: 11px; }
  .page-header h1 { font-size: clamp(28px, 2vw, 32px); }
  .page-header .subtitle { color: #8d8d8d; font-size: 13px; }
  .btn { min-height: 35px; padding-inline: 13px; font-size: 12px; }
  .btn svg { width: 15px; height: 15px; }

  .dashboard-page .page-header { min-height: 66px; margin-bottom: 27px; }
  .metric-grid { margin-bottom: 20px; }
  .metric-card { min-height: 69px; padding: 9px 24px 8px; }
  .metric-label { gap: 6px; color: #919191; font-size: 11px; }
  .metric-icon, .metric-icon svg { width: 15px; height: 15px; }
  .metric-value { margin-top: 7px; font-size: 25px; }
  .metric-card:last-child .metric-value { font-size: 28px; }

  .dashboard-grid { grid-template-columns: minmax(0, 1.58fr) minmax(340px, .72fr); gap: 26px; }
  .panel-head { min-height: 50px; }
  .panel-title { font-size: 13px; }
  .link-button { font-size: 12px; }
  .activity-panel .panel-head { min-height: 47px; }
  .activity-columns { min-height: 31px; font-size: 11px; }
  .activity-row { min-height: 62px; }
  .scan-id strong { font-size: 13px; }
  .scan-id small, .table-secondary, .cell-sub { color: #7b7b7b; font-size: 11px; }
  .cell-main { color: #d0d0d0; font-size: 12px; }
  .status { font-size: 11px; }
  .carrier-mark img, .carrier-mark.compact img { max-width: 29px; max-height: 29px; }
  .carrier-dhl img, .carrier-fedex img { width: 34px; max-width: 34px; max-height: 20px; }
  .side-stack .panel-head { min-height: 44px; }
  .chart-wrap { padding-top: 11px; }
  .revenue { padding-top: 11px; }
  .legend-item, .legend-item strong { font-size: 11px; }
  .donut-label strong, .revenue-total strong { font-size: 23px; }
  .donut-label small, .bar-labels { color: #666; font-size: 11px; }

  .toolbar { min-height: 42px; }
  .filter-btn { padding: 9px 10px 10px; font-size: 11px; }
  .scan-filter-panel header strong { font-size: 14px; }
  .scan-filter-panel header small { font-size: 11px; }
  .scan-filter-panel header > button, .period-presets button, .scan-filter-panel footer { font-size: 12px; }
  .scan-filter-grid label > span { font-size: 11px; }
  .scan-filter-grid select, .scan-filter-grid input { height: 40px; font-size: 13px; }
  .active-filter-bar > span { font-size: 11px; }
  .active-filter-bar button { height: 30px; font-size: 11px; }
  .data-table th { height: 40px; padding-inline: 14px; color: #747474; font-size: 11px; }
  .data-table td { height: 62px; padding-inline: 14px; color: #c8c8c8; font-size: 12px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
  .table-primary { color: #e7e7e7; font-size: 13px; }
  .service-code, .membership { color: #b8b8b8; font-size: 11px; }
  .scans-table .carrier-cell .table-primary { font-size: 12px; }
  .scans-table .status { font-size: 11px; }
  .action-btn { width: 28px; height: 28px; }
  .action-btn svg { width: 14px; }
  .pagination { min-height: 46px; font-size: 11px; }
  .pages button { width: 27px; height: 27px; font-size: 11px; }
  .client-avatar { width: 36px; height: 36px; font-size: 11px; }

  .finance-page .page-header { margin-bottom: 26px; }
  .finance-stat { min-height: 100px; padding: 16px 20px 15px; }
  .finance-stat-label { font-size: 11px; }
  .finance-stat-content { margin-top: 15px; }
  .finance-stat-content > strong { font-size: 22px; }
  .finance-stat-main .finance-stat-content > strong { font-size: 27px; }
  .finance-actions .btn { min-height: 34px; padding-inline: 11px; font-size: 11px; }
  .finance-history { margin-top: 28px; }
  .finance-history-head { min-height: 48px; }
  .finance-history-head h2 { font-size: 13px; }
  .finance-history-head span, .finance-search-note { font-size: 11px; }
  .finance-toolbar { min-height: 46px; }
  .finance-table th { height: 37px; }
  .finance-table td { height: 56px; }

  .settings-carrier > summary { min-height: 64px; }
  .autosave-status { font-size: 11px; }
  .settings-carrier-id strong { font-size: 14px; }
  .settings-carrier-meta { font-size: 11px; }
  .pricing-groups { gap: 32px; padding: 0 18px 24px 52px; }
  .pricing-groups.single { grid-template-columns: minmax(0, calc(50% - 16px)); }
  .pricing-tier-head { min-height: 52px; }
  .pricing-tier-head h3 { font-size: 13px; }
  .pricing-tier-head span { font-size: 11px; }
  .add-service { min-height: 30px; font-size: 11px; }
  .pricing-service { min-height: 53px; grid-template-columns: minmax(0, 1fr) 108px 30px; gap: 11px; font-size: 12px; }
  .service-name-input { height: 38px; font-size: 13px; }
  .price-input input { height: 38px; font-size: 13px; }
  .pricing-delete { width: 30px; height: 30px; }
  .toggle-row { min-height: 64px; }
  .toggle-copy strong { font-size: 11px; }
  .toggle-copy span { font-size: 11px; }

  .modal { width: min(960px, 100%); }
  .modal-head { min-height: 56px; padding-inline: 20px; }
  .modal-head h2 { font-size: 15px; }
  .modal-kicker { font-size: 11px; }
  .detail-pane { padding: 20px 24px; }
  .detail-pane-title { font-size: 12px; }
  .detail-pane-note { font-size: 11px; }
  .field { min-height: 52px; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; }
  .field label { font-size: 11px; }
  .field input, .field select, .field textarea { min-height: 36px; padding-inline: 9px; font-size: 12px; }
  .readonly-value { font-size: 12px; }
  .summary-row { min-height: 47px; font-size: 11px; }
  .summary-row strong { font-size: 12px; }
  .modal-foot { min-height: 54px; padding: 9px 18px; }
  .modal-foot .btn { min-height: 35px; }

  .modal-scan { --modal-control-height: 38px; width: min(1000px, 100%); }
  .modal-scan .modal-head { min-height: 60px; padding-inline: 24px; }
  .modal-scan .field { min-height: 56px; grid-template-columns: 136px minmax(0, 1fr); gap: 18px; }
  .modal-scan .field label { font-size: 11px; }
  .modal-scan .readonly-value,
  .modal-scan .editable-field > input,
  .modal-scan .editable-field > select,
  .modal-scan .carrier-select-trigger { font-size: 12px; }
  .modal-scan .carrier-select-trigger [data-carrier-label] { font-size: 12px; }
  .modal-scan .carrier-option { min-height: 39px; }
  .modal-scan .carrier-option > span:not(.carrier-mark) { font-size: 11px; }
  .modal-scan .scan-action { min-height: 68px; }
  .modal-scan .scan-action strong { font-size: 11px; }
  .modal-scan .scan-action small, .modal-scan .scan-action button, .modal-scan .scan-action-foot { font-size: 11px; }
  .modal-scan .modal-foot { min-height: 58px; padding-inline: 24px; }
  .modal-scan .modal-foot .btn { min-height: 36px; }

  /* Comfortable desktop type scale */
  body { font-size: 15px; }
  .brand strong { font-size: 15px; font-weight: 600; }
  .brand small { color: #777; font-size: 11px; }
  .nav-label { color: #707070; font-size: 11px; }
  .nav-item { height: 44px; }
  .nav-item span { font-size: 15px; font-weight: 500; }
  .nav-item em { font-size: 11px; }
  .user-card strong { font-size: 13px; }
  .user-card small { color: #797979; font-size: 11px; }

  .topbar { height: 70px; }
  .searchbox { height: 42px; }
  .searchbox input { font-size: 14px; }
  .searchbox input::placeholder { color: #777; }
  .searchbox kbd { font-size: 11px; }
  .content { padding-top: 44px; }

  .page-header { min-height: 88px; margin-bottom: 34px; }
  .eyebrow { color: #7b7b7b; font-size: 11px; }
  .page-header h1 { font-size: clamp(38px, 2.6vw, 42px); font-weight: 600; letter-spacing: -.038em; }
  .page-header .subtitle { margin-top: 9px; color: #a0a0a0; font-size: 15px; }
  .btn { min-height: 42px; padding-inline: 16px; font-size: 14px; font-weight: 500; }
  .btn svg { width: 16px; height: 16px; }

  .dashboard-page .page-header { min-height: 84px; margin-bottom: 30px; }
  .metric-card { min-height: 76px; padding-block: 10px 9px; }
  .metric-label { gap: 7px; color: #a0a0a0; font-size: 13px; }
  .metric-icon, .metric-icon svg { width: 16px; height: 16px; }
  .metric-value { margin-top: 8px; font-size: 28px; font-weight: 600; }
  .metric-card:last-child .metric-value { font-size: 30px; }

  .panel-title { font-size: 16px; font-weight: 600; }
  .link-button { color: #999; font-size: 13px; }
  .activity-panel .panel-head { min-height: 52px; }
  .activity-columns { min-height: 36px; color: #797979; font-size: 13px; letter-spacing: .045em; }
  .activity-row { min-height: 60px; }
  .scan-id strong { font-size: 15px; font-weight: 600; }
  .scan-id small, .table-secondary, .cell-sub { color: #8f8f8f; font-size: 13px; }
  .cell-main { color: #dedede; font-size: 14px; font-weight: 500; }
  .status { font-size: 13px; }
  .side-stack .panel-head { min-height: 50px; }
  .legend { gap: 11px; }
  .legend-item, .legend-item strong { color: #a0a0a0; font-size: 13px; }
  .legend-item strong { color: #e1e1e1; }
  .donut-label strong, .revenue-total strong { font-size: 26px; font-weight: 600; }
  .donut-label small, .bar-labels { color: #858585; font-size: 11px; }

  .toolbar { min-height: 48px; }
  .filter-btn { padding: 11px 12px 12px; color: #909090; font-size: 14px; }
  .data-table th { height: 42px; color: #8b8b8b; font-size: 13px; font-weight: 500; letter-spacing: .055em; }
  .data-table td { height: 60px; color: #d2d2d2; font-size: 14px; font-weight: 500; }
  .table-primary { color: #f0f0f0; font-size: 15px; font-weight: 600; }
  .service-code, .membership { color: #cdcdcd; font-size: 14px; }
  .scans-table .carrier-cell .table-primary { font-size: 15px; }
  .scans-table .status { font-size: 13px; }
  .pagination { min-height: 48px; color: #898989; font-size: 13px; }
  .pages button { width: 30px; height: 30px; font-size: 13px; }
  .action-btn { width: 32px; height: 32px; }
  .action-btn svg { width: 15px; }

  .finance-stat-label { color: #989898; font-size: 13px; }
  .finance-stat-content > strong { font-size: 25px; font-weight: 600; }
  .finance-stat-main .finance-stat-content > strong { font-size: 30px; }
  .finance-actions .btn { min-height: 38px; font-size: 13px; }
  .finance-history-head { min-height: 54px; }
  .finance-history-head h2 { font-size: 17px; font-weight: 600; }
  .finance-history-head span, .finance-search-note { color: #898989; font-size: 13px; }
  .finance-toolbar { min-height: 52px; }
  .finance-table th { height: 42px; }
  .finance-table td { height: 60px; }

  .autosave-status { color: #929292; font-size: 13px; }
  .settings-carrier > summary { min-height: 68px; }
  .settings-carrier-id strong { font-size: 16px; font-weight: 600; }
  .settings-carrier-meta { font-size: 13px; }
  .pricing-tier-head { min-height: 56px; }
  .pricing-tier-head h3 { font-size: 16px; font-weight: 600; }
  .pricing-tier-head span { font-size: 13px; }
  .add-service { min-height: 34px; font-size: 13px; }
  .pricing-service { min-height: 58px; grid-template-columns: minmax(0, 1fr) 116px 32px; font-size: 14px; }
  .service-name-input { height: 44px; color: #e3e3e3; font-size: 15px; }
  .price-input input { height: 44px; font-size: 15px; font-weight: 600; }
  .pricing-delete { width: 32px; height: 32px; }

  .modal { width: min(1040px, 100%); }
  .modal-head { min-height: 66px; padding-inline: 24px; }
  .modal-head h2 { font-size: 18px; font-weight: 600; }
  .modal-kicker { color: #777; font-size: 11px; }
  .detail-pane-title { font-size: 16px; font-weight: 600; }
  .detail-pane-note { color: #858585; font-size: 13px; }
  .field { min-height: 62px; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
  .field label { color: #9a9a9a; font-size: 14px; }
  .field input, .field select, .field textarea { min-height: 46px; padding-inline: 12px; font-size: 15px; font-weight: 500; }
  .readonly-value { font-size: 15px; }
  .readonly-client strong, .readonly-carrier strong { font-size: 15px; }
  .readonly-client small { color: #888; font-size: 13px; }
  .summary-row { min-height: 52px; color: #a0a0a0; font-size: 13px; }
  .summary-row strong { font-size: 15px; font-weight: 600; }
  .summary-highlight span, .mini-history-title { color: #858585; font-size: 11px; }
  .mini-history-row { min-height: 44px; font-size: 13px; }
  .modal-foot { min-height: 62px; padding: 10px 24px; }
  .modal-foot .btn { min-height: 42px; }

  .modal-scan { --modal-control-height: 46px; width: min(1060px, 100%); }
  .modal-scan .scan-detail-layout { grid-template-columns: minmax(0, 1fr) 380px; }
  .modal-scan .modal-head { min-height: 66px; }
  .modal-scan .modal-head h2 { font-size: 18px; }
  .modal-scan .detail-pane-title { font-size: 16px; }
  .modal-scan .detail-pane-note { font-size: 13px; }
  .modal-scan .field { min-height: 64px; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
  .modal-scan .field label { font-size: 14px; }
  .modal-scan .readonly-value,
  .modal-scan .editable-field > input,
  .modal-scan .editable-field > select,
  .modal-scan .carrier-select-trigger { font-size: 15px; }
  .modal-scan .carrier-select-trigger [data-carrier-label] { font-size: 15px; }
  .modal-scan .carrier-option { min-height: 44px; }
  .modal-scan .carrier-option > span:not(.carrier-mark) { font-size: 14px; }
  .modal-scan .scan-action { min-height: 76px; }
  .modal-scan .scan-action strong { font-size: 14px; }
  .modal-scan .scan-action small, .modal-scan .scan-action button, .modal-scan .scan-action-foot { font-size: 13px; }
  .label-upload-heading span { font-size: 14px; }
  .label-upload-heading small { font-size: 11px; }
  .label-drop-copy strong { font-size: 14px; }
  .label-drop-copy small { font-size: 12px; }
  .label-file-copy strong { font-size: 13px; }
  .label-file-copy small { font-size: 11px; }
  .modal-scan .modal-foot { min-height: 64px; }
  .modal-scan .modal-foot .btn { min-height: 42px; }

  /* Calmer spacing and contrast without changing the type scale */
  .content { padding-bottom: 78px; }
  .page-header { margin-bottom: 38px; }
  .page-header h1 { color: #e8e8e8; }
  .page-header .subtitle { color: #969696; font-weight: 400; }
  .dashboard-page .page-header { margin-bottom: 34px; }
  .metric-grid { margin-bottom: 24px; }
  .metric-value { color: #e8e8e8; font-weight: 600; }
  .metric-label { color: #969696; font-weight: 400; }

  .dashboard-grid { gap: 30px; }
  .panel-head { min-height: 54px; }
  .panel-title { color: #dedede; font-weight: 600; }
  .activity-panel .panel-head { min-height: 54px; }
  .activity-columns { min-height: 38px; color: #747474; font-weight: 500; }
  .activity-row { min-height: 64px; border-bottom-color: #191919; }
  .scan-id strong { color: #e4e4e4; font-weight: 600; }
  .scan-id small, .table-secondary, .cell-sub { color: #898989; font-weight: 400; }
  .cell-main { color: #d5d5d5; font-weight: 500; }
  .side-stack { gap: 24px; }
  .side-stack .panel-head { min-height: 52px; }
  .legend-item { font-weight: 400; }
  .legend-item strong { color: #dedede; font-weight: 600; }
  .donut-label strong, .revenue-total strong { color: #e5e5e5; font-weight: 600; }

  .toolbar { min-height: 52px; margin-bottom: 12px; }
  .filter-btn { font-weight: 400; }
  .data-table th { height: 44px; color: #848484; border-bottom-color: #1d1d1d; }
  .data-table td { height: 64px; color: #cacaca; border-bottom-color: #191919; font-weight: 500; }
  .table-primary { color: #e6e6e6; font-weight: 600; }
  .table-secondary { font-weight: 400; }
  .service-code, .membership { color: #c2c2c2; font-weight: 500; }
  .pagination { min-height: 50px; }

  .finance-summary { margin-bottom: 2px; }
  .finance-stat { min-height: 106px; padding-block: 18px 17px; }
  .finance-stat-label { color: #929292; font-weight: 400; }
  .finance-stat-content > strong { color: #e7e7e7; font-weight: 600; }
  .finance-history { margin-top: 32px; }
  .finance-history-head { min-height: 58px; }
  .finance-history-head h2 { color: #dedede; font-weight: 600; }
  .finance-history-head span, .finance-search-note { color: #858585; font-weight: 400; }
  .finance-toolbar { min-height: 56px; }
  .finance-table td { height: 64px; }

  .settings-page .page-header { margin-bottom: 32px; }
  .settings-carrier > summary { min-height: 72px; }
  .settings-carrier-id strong { color: #e3e3e3; font-weight: 600; }
  .settings-carrier-meta, .autosave-status { color: #898989; font-weight: 400; }
  .pricing-groups { padding-bottom: 28px; }
  .pricing-tier { border-top-color: #242424; }
  .pricing-tier-head { min-height: 60px; }
  .pricing-tier-head h3 { color: #dedede; font-weight: 600; }
  .pricing-tier-head span, .add-service { font-weight: 400; }
  .pricing-service { min-height: 62px; border-top-color: #1d1d1d; }
  .service-name-input { color: #dedede; font-weight: 500; }
  .price-input input { color: #e5e5e5; font-weight: 600; }

  .modal { border-color: #292929; }
  .modal-head { min-height: 68px; }
  .modal-head h2 { color: #e5e5e5; font-weight: 600; }
  .detail-pane { padding-block: 23px 25px; }
  .detail-pane-head { margin-bottom: 7px; padding-bottom: 13px; border-bottom-color: #1d1d1d; }
  .detail-pane-title { color: #dedede; font-weight: 600; }
  .detail-pane-note, .modal-kicker { color: #7f7f7f; font-weight: 400; }
  .field { min-height: 66px; border-bottom-color: #1b1b1b; }
  .field label { color: #949494; font-weight: 400; }
  .field input, .field select, .field textarea { color: #e4e4e4; font-weight: 500; }
  .readonly-value { color: #dcdcdc; font-weight: 500; }
  .summary-row { min-height: 56px; border-bottom-color: #1b1b1b; font-weight: 400; }
  .summary-row strong { color: #dfdfdf; font-weight: 600; }
  .mini-history-row { min-height: 48px; border-bottom-color: #1b1b1b; }
  .modal-foot { min-height: 66px; }

  .modal-scan .modal-head { min-height: 68px; }
  .modal-scan .field { min-height: 68px; }
  .modal-scan .scan-action { min-height: 80px; border-bottom-color: #1b1b1b; }
  .modal-scan .scan-action strong { color: #dcdcdc; font-weight: 600; }
  .modal-scan .scan-action small, .modal-scan .scan-action-foot { color: #858585; font-weight: 400; }
  .modal-scan .modal-foot { min-height: 66px; }

  /* More breathing room on data-heavy pages */
  .content { padding-top: 48px; }
  .page-header { margin-bottom: 42px; }
  .dashboard-page .page-header { margin-bottom: 34px; }
  .settings-page .page-header { margin-bottom: 32px; }
  .page-header + .toolbar { margin-top: 2px; }
  .toolbar { min-height: 58px; margin-bottom: 18px; }
  .filter-group { gap: 6px; }
  .filter-btn { padding: 14px 12px 15px; }
  .toolbar > .btn { margin-bottom: 7px; }
  .data-table th { height: 48px; padding-block: 10px; border-bottom-color: #191919; }
  .data-table td { height: 68px; padding-block: 10px; border-bottom-color: #161616; }
  .table-secondary, .cell-sub { margin-top: 4px; }
  .pagination { min-height: 54px; margin-top: 3px; border-top-color: #181818; }

  .finance-page .page-header { margin-bottom: 34px; }
  .finance-history { margin-top: 38px; }
  .finance-history-head { min-height: 62px; }
  .finance-toolbar { min-height: 60px; }
  .finance-table th { height: 48px; }
  .finance-table td { height: 68px; }

  .clients-panel, .history-panel { border-top-color: #191919; }
  .data-table tbody tr:hover { background: #0c0c0c; }
  .toast { min-width: 280px; padding: 12px 15px; font-size: 11px; }
}

/* Wide desktop dashboard: use the available canvas and keep KPIs content-sized. */
@media (min-width: 1101px) {
  .content { max-width: none; padding-inline: 36px; }

  .dashboard-page .page-header { margin-bottom: 28px; }
  .dashboard-page .metric-grid {
    width: fit-content;
    grid-template-columns: repeat(3, 190px) 270px;
    gap: 12px;
    margin-bottom: 28px;
    border: 0;
  }
  .dashboard-page .metric-card,
  .dashboard-page .metric-card:first-child,
  .dashboard-page .metric-card:last-child {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 15px;
    border: 1px solid #232328;
    border-radius: 8px;
    background: linear-gradient(145deg,#0e0e10 0%,#0b0b0c 100%);
  }
  .dashboard-page .metric-card:hover { border-color: #34313e; background: linear-gradient(145deg,#111114 0%,#0c0c0e 100%); }
  .dashboard-page .metric-label { min-width: 0; flex: 1; gap: 10px; color: #929299; font-size: 12px; line-height: 1.3; }
  .dashboard-page .metric-label > span:last-child { white-space: nowrap; }
  .dashboard-page .metric-icon,
  .dashboard-page .metric-icon svg { width: 32px; height: 32px; }
  .dashboard-page .metric-icon { place-items: center; flex: none; border: 1px solid #292831; border-radius: 7px; color: #9181e8; background: #15141a; }
  .dashboard-page .metric-icon svg { width: 15px; height: 15px; }
  .dashboard-page .metric-value,
  .dashboard-page .metric-card:last-child .metric-value { margin: 0 0 0 auto; color: #ededee; font-size: 26px; font-weight: 600; white-space: nowrap; }
  .dashboard-page .metric-card:last-child { min-width: 270px; }

  .dashboard-page .dashboard-grid { grid-template-columns: minmax(0,1fr) clamp(360px,24vw,430px); gap: 24px; }
}

/* Finance refresh: compact overview and a single, clearly grouped history panel. */
.finance-page .page-header { margin-bottom: 28px; }
.finance-summary {
  display: grid;
  grid-template-columns: minmax(330px,1.45fr) repeat(3,minmax(160px,1fr));
  gap: 12px;
  border: 0;
}
.finance-stat,
.finance-stat:first-child,
.finance-stat:last-child {
  min-width: 0;
  min-height: 104px;
  padding: 17px 18px;
  border: 1px solid #232328;
  border-radius: 9px;
  background: linear-gradient(145deg,#0e0e10 0%,#0b0b0c 100%);
}
.finance-stat:hover { border-color: #34313e; }
.finance-stat-label { color: #929299; font-size: 12px; }
.finance-stat-label > span {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid #292831;
  border-radius: 6px;
  color: #9181e8;
  background: #15141a;
}
.finance-stat-label svg { width: 13px; height: 13px; }
.finance-stat-content { min-width: 0; margin-top: 14px; align-items: center; }
.finance-stat-content > strong { color: #ededee; font-size: 25px; font-weight: 600; white-space: nowrap; }
.finance-stat-main .finance-stat-content > strong { font-size: 29px; }
.finance-actions { align-items: center; gap: 8px; margin-left: 18px; }
.finance-actions .btn {
  min-width: 92px;
  min-height: 38px;
  padding-inline: 14px;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
}
.finance-actions .btn-quiet { border: 1px solid #303037; background: #121216; }
.finance-actions .btn-quiet:hover { border-color: #484653; background: #18171d; }

.finance-history {
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid #232328;
  border-radius: 10px;
  background: #09090a;
}
.finance-history-head {
  min-height: 70px;
  padding: 0 18px;
  border: 0;
}
.finance-history-head > div { display: block; }
.finance-history-head h2 { font-size: 16px; }
.finance-history-head span { display: block; margin-top: 5px; color: #777780; font-size: 11px; }
.finance-history-head .link-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #28282e;
  border-radius: 6px;
  background: #101012;
}
.finance-toolbar {
  min-height: 50px;
  padding: 0 10px 0 8px;
  border-block: 1px solid #202024;
  background: #0c0c0e;
}
.finance-toolbar .filter-btn { padding: 13px 10px 14px; }
.finance-search-note { padding-right: 8px; }
.finance-table-wrap { border: 0; }
.finance-table th { height: 40px; padding-block: 8px; border-bottom: 1px solid #202024; background: #0a0a0b; }
.finance-table td { height: 60px; padding-block: 9px; border-bottom-color: #18181b; }
.finance-table tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 1180px) {
  .finance-summary { grid-template-columns: minmax(330px,1.4fr) repeat(3,minmax(145px,1fr)); gap: 9px; }
  .finance-stat, .finance-stat:first-child, .finance-stat:last-child { padding-inline: 14px; }
  .finance-actions { margin-left: 12px; }
  .finance-actions .btn { min-width: 78px; padding-inline: 11px; }
}

@media (max-width: 900px) {
  .finance-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .finance-stat-main { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .finance-summary { grid-template-columns: 1fr; }
  .finance-stat-main { grid-column: auto; }
  .finance-stat-content { align-items: flex-start; flex-direction: column; gap: 14px; }
  .finance-actions { width: 100%; margin-left: 0; }
  .finance-actions .btn { flex: 1; }
  .finance-history-head { min-height: 64px; padding-inline: 14px; }
  .finance-search-note { display: none; }
}

/* Dashboard composition: one operational flow, followed by balanced analytics. */
.dashboard-page .dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 18px;
}
.dashboard-page .panel {
  border: 1px solid #222228;
  border-radius: 10px;
  background: linear-gradient(145deg,#0c0c0e 0%,#09090a 100%);
}
.dashboard-page .activity-panel .panel-head {
  min-height: 58px;
  padding-inline: 18px 14px;
  border-bottom: 1px solid #202024;
}
.dashboard-page .activity-columns,
.dashboard-page .activity-row {
  grid-template-columns: minmax(250px,1.45fr) minmax(200px,1fr) minmax(140px,.7fr) minmax(140px,.72fr) 28px;
  gap: 18px;
  padding-inline: 18px 14px;
}
.dashboard-page .activity-columns {
  min-height: 36px;
  border-bottom-color: #1d1d20;
  background: #0a0a0c;
}
.dashboard-page .activity-row { min-height: 62px; border-bottom-color: #19191c; }
.dashboard-page .activity-row:hover { background: #0f0f12; }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}
.dashboard-page .analytics-grid .panel { min-height: 252px; }
.dashboard-page .analytics-grid .panel-head {
  min-height: 66px;
  padding: 0 18px;
  border-bottom: 1px solid #202024;
}
.dashboard-page .analytics-grid .panel-head > div { min-width: 0; }
.dashboard-page .analytics-grid .panel-title { font-size: 14px; }
.panel-caption {
  display: block;
  margin-top: 5px;
  color: #72727a;
  font-size: 11px;
  font-weight: 400;
}
.panel-period {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #29292f;
  border-radius: 999px;
  color: #8c8c94;
  background: #111114;
  font-size: 11px;
  white-space: nowrap;
}
.dashboard-page .distribution-panel .chart-wrap { padding: 20px 24px; }
.dashboard-page .donut-area {
  min-height: 145px;
  justify-content: center;
  gap: clamp(38px,5vw,76px);
}
.dashboard-page .donut { width: 132px; height: 132px; flex: none; }
.dashboard-page .donut::before { inset: 15px; background: #0b0b0d; }
.dashboard-page .donut-label strong { color: #eeeeef; font-size: 29px; font-weight: 600; }
.dashboard-page .donut-label small { margin-top: 3px; color: #85858d; font-size: 11px; }
.dashboard-page .legend { width: min(210px,46%); gap: 13px; }
.dashboard-page .legend-item {
  grid-template-columns: 7px minmax(0,1fr) auto;
  gap: 10px;
  color: #a0a0a7;
  font-size: 12px;
}
.dashboard-page .legend-item span:first-child { width: 7px; height: 7px; border-radius: 2px; }
.dashboard-page .legend-item strong { color: #ededee; font-size: 12px; font-weight: 600; }

.dashboard-page .revenue { padding: 18px 22px 16px; }
.dashboard-page .revenue-total { min-height: 48px; align-items: flex-start; margin-bottom: 12px; }
.dashboard-page .revenue-total > div:first-child > span,
.dashboard-page .revenue-average span {
  display: block;
  margin-bottom: 6px;
  color: #777780;
  font-size: 11px;
}
.dashboard-page .revenue-total > div:first-child > strong {
  display: block;
  color: #eeeeef;
  font-size: 27px;
  font-weight: 600;
}
.dashboard-page .revenue-average { padding-top: 2px; text-align: right; }
.dashboard-page .revenue-average strong { color: #bdbdc4; font-size: 13px; font-weight: 600; }
.dashboard-page .bars {
  height: 104px;
  gap: 10px;
  padding: 12px 4px 0;
  border-bottom-color: #303037;
  background: repeating-linear-gradient(to top,transparent 0,transparent 33px,#1d1d21 34px);
}
.dashboard-page .bar { min-width: 12px; border-radius: 3px 3px 0 0; background: #303035; }
.dashboard-page .bar.active { background: linear-gradient(180deg,#8a75ff 0%,#7055f5 100%); }
.dashboard-page .bar-labels { margin-top: 7px; color: #6f6f77; font-size: 11px; }

@media (max-width: 900px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .dashboard-page .activity-columns,
  .dashboard-page .activity-row { grid-template-columns: minmax(190px,1.25fr) minmax(150px,1fr) minmax(105px,.7fr) minmax(105px,.7fr) 28px; gap: 12px; }
}

@media (max-width: 620px) {
  .dashboard-page .activity-columns { display: none; }
  .dashboard-page .activity-row { grid-template-columns: minmax(145px,1.2fr) minmax(90px,.8fr); padding-inline: 14px; }
  .dashboard-page .activity-row > :nth-child(3),
  .dashboard-page .activity-row > :nth-child(4),
  .dashboard-page .activity-row > :nth-child(5) { display: none; }
  .dashboard-page .analytics-grid .panel-head { padding-inline: 14px; }
  .dashboard-page .distribution-panel .chart-wrap { padding-inline: 14px; }
  .dashboard-page .donut-area { gap: 24px; }
  .dashboard-page .donut { width: 112px; height: 112px; }
  .dashboard-page .legend { width: min(180px,50%); }
  .dashboard-page .revenue { padding-inline: 14px; }
}

/* Pricing registry: restrained, contextual accordion for business configuration. */
.pricing-registry { border-top: 0; }
.settings-carriers { gap: 2px; }
.settings-carrier {
  overflow: clip;
  border: 1px solid transparent;
  border-bottom-color: #1d1d21;
  border-radius: 0;
  background: transparent;
  interpolate-size: allow-keywords;
  transition: margin .2s ease, border-color .2s ease, border-radius .2s ease, background .2s ease, box-shadow .2s ease;
}
.settings-carrier[open] {
  margin: 8px 0 12px;
  border-color: #292930;
  border-radius: 9px;
  background: #0b0b0d;
  box-shadow: inset 2px 0 #56489a;
}
.settings-carrier > summary {
  min-height: 66px;
  padding: 0 16px 0 12px;
  outline: 0;
  transition: color .15s ease, background .15s ease;
}
.settings-carrier > summary:hover { background: #0e0e11; }
.settings-carrier > summary:focus-visible { box-shadow: inset 0 0 0 2px rgba(124,108,255,.36); }
.settings-carrier[open] > summary {
  min-height: 72px;
  border-bottom: 1px solid #24242a;
  background: #101012;
}
.settings-carrier-id { gap: 14px; }
.settings-carrier-id .carrier-mark { width: 38px; height: 34px; }
.settings-carrier-copy { min-width: 0; display: block; }
.settings-carrier-copy strong { color: #dedee1; font-size: 14px; font-weight: 600; }
.settings-carrier-copy small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #74747c;
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-carrier-meta { gap: 13px; color: #85858d; font-size: 11px; }
.settings-carrier-count {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #29292f;
  border-radius: 999px;
  background: #111114;
}
.settings-carrier-state { width: 54px; color: #74747c; text-align: right; }
.settings-carrier-state span:last-child { display: none; color: #a498e0; }
.settings-carrier[open] .settings-carrier-state span:first-child { display: none; }
.settings-carrier[open] .settings-carrier-state span:last-child { display: inline; }
.settings-carrier-meta svg { width: 14px; height: 14px; color: #767680; transition: transform .22s ease, color .15s ease; }
.settings-carrier > summary:hover .settings-carrier-meta svg { color: #bbb7cd; }

@supports selector(details::details-content) {
  .settings-carrier::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size .24s cubic-bezier(.22,.75,.25,1), content-visibility .24s allow-discrete;
  }
  .settings-carrier[open]::details-content { block-size: auto; }
}

.pricing-groups,
.pricing-groups.single {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  padding: 16px 18px 18px 60px;
  background: #0b0b0d;
}
.pricing-tier {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #232329;
  border-radius: 7px;
  background: #0d0d10;
}
.pricing-tier-head {
  min-height: 58px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid #222228;
  background: #101013;
}
.pricing-tier-head > .pricing-tier-copy { min-width: 0; display: flex; align-items: center; gap: 10px; }
.pricing-tier-code {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #302e3c;
  border-radius: 6px;
  color: #a99bea;
  background: #17151e;
  font-size: 11px;
  font-weight: 600;
}
.pricing-tier-head h3 { margin: 0; color: #dedee1; font-size: 13px; font-weight: 600; line-height: 1; }
.pricing-tier-head > .pricing-tier-actions { display: flex; align-items: center; gap: 10px; }
.pricing-tier-actions > span { color: #707078; font-size: 11px; white-space: nowrap; }
.add-service {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #2a2a31;
  border-radius: 5px;
  color: #a5a5ad;
  background: #131316;
  font-size: 11px;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.add-service:hover { border-color: #403b59; color: #e4e0f8; background: #18161f; }
.add-service:focus-visible { outline: 2px solid rgba(124,108,255,.42); outline-offset: 2px; }
.pricing-column-head,
.pricing-service {
  display: grid;
  grid-template-columns: minmax(0,1fr) 108px 30px;
  align-items: center;
  gap: 10px;
  padding-inline: 12px 10px;
}
.pricing-column-head {
  min-height: 31px;
  border-bottom: 1px solid #1e1e23;
  color: #64646c;
  background: #0b0b0e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.pricing-column-head span:nth-child(2) { text-align: right; }
.pricing-service {
  min-height: 54px;
  border-top: 0;
  border-bottom: 1px solid #1c1c21;
  transition: background .14s ease;
}
.pricing-service:last-child { border-bottom: 0; }
.pricing-service:hover,
.pricing-service:focus-within { background: #111114; }
.service-name-input,
.price-input input { height: 36px; }
.service-name-input { padding-inline: 8px; font-size: 12px; }
.service-name-input:hover { border-color: #2d2d34; background: #151518; }
.service-name-input:focus { border-color: #6758ba; background: #15141b; }
.price-input input { border-color: #303038; background: #141417; font-size: 12px; text-align: right; }
.price-input input:focus { border-color: #6758ba; }
.pricing-delete {
  width: 30px;
  height: 30px;
  color: #676770;
  opacity: .32;
  transition: opacity .14s ease, color .14s ease, background .14s ease;
}
.pricing-service:hover .pricing-delete,
.pricing-service:focus-within .pricing-delete,
.pricing-delete:focus-visible { opacity: 1; }
.pricing-delete:focus-visible { outline: 2px solid rgba(213,107,118,.36); outline-offset: 1px; }
.pricing-empty { min-height: 54px; padding-inline: 12px; border: 0; }

@media (max-width: 1100px) {
  .pricing-groups,
  .pricing-groups.single { grid-template-columns: 1fr; padding-left: 60px; }
}

@media (max-width: 620px) {
  .settings-carrier > summary,
  .settings-carrier[open] > summary { min-height: 64px; padding-inline: 9px; }
  .settings-carrier-copy small,
  .settings-carrier-state { display: none; }
  .settings-carrier-meta { gap: 8px; }
  .pricing-groups,
  .pricing-groups.single { padding: 10px; }
  .pricing-tier-head { min-height: 60px; padding-inline: 10px 8px; }
  .pricing-tier-actions > span { display: none; }
  .add-service { padding-inline: 7px; }
  .pricing-column-head,
  .pricing-service { grid-template-columns: minmax(0,1fr) 86px 28px; gap: 7px; padding-inline: 9px 7px; }
}

/* Finance operations: explicit deposit/deduction flows and visible controls. */
.modal-finance { width: min(960px,100%); }
.modal-finance .finance-detail-layout { grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr); }
.modal-finance .detail-pane { padding: 22px 24px 26px; }
.modal-finance .finance-summary-pane { background: #0d0d0f; }
.modal-finance .detail-pane-head { min-height: 38px; margin-bottom: 14px; padding-bottom: 12px; }
.modal-finance .detail-pane-title { font-size: 14px; }
.modal-finance .detail-pane-note { color: #85858d; font-size: 11px; }
.finance-operation-note {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #292934;
  border-radius: 7px;
  background: #101015;
}
.finance-operation-note > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #343044;
  border-radius: 6px;
  color: #a090ed;
  background: #18151f;
}
.finance-operation-note.deduction > span { color: #d7a1a8; border-color: #493037; background: #1c1316; }
.finance-operation-note svg { width: 15px; height: 15px; }
.finance-operation-note strong { display: block; color: #dedee2; font-size: 11px; font-weight: 600; }
.finance-operation-note small { display: block; margin-top: 4px; color: #7b7b84; font-size: 11px; line-height: 1.45; }
.modal-finance .field {
  min-height: 68px;
  grid-template-columns: 132px minmax(0,1fr);
  gap: 16px;
  border-bottom-color: #202025;
}
.modal-finance .field label { color: #a0a0a8; font-size: 12px; }
.modal-finance .editable-field > input,
.modal-finance .editable-field > select,
.modal-finance .finance-amount-control input,
.modal-finance .readonly-value {
  min-height: 42px;
  border: 1px solid #393941;
  border-radius: 6px;
  color: #eeeeef;
  background-color: #141419;
  font-size: 13px;
  font-weight: 500;
}
.modal-finance .editable-field > input,
.modal-finance .editable-field > select { padding-inline: 12px; }
.modal-finance .editable-field > select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23a7a7aa' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.modal-finance .editable-field > select option { color: #ededee; background: #141419; }
.modal-finance .editable-field > input:hover,
.modal-finance .editable-field > select:hover,
.modal-finance .finance-amount-control input:hover { border-color: #50505b; background-color: #18181e; }
.modal-finance .editable-field > input:focus,
.modal-finance .editable-field > select:focus,
.modal-finance .finance-amount-control input:focus {
  border-color: #7864df;
  background-color: #17151e;
  box-shadow: 0 0 0 3px rgba(124,108,255,.1);
}
.modal-finance .readonly-value { padding: 0 12px; color: #bebec5; background: #111115; }
.finance-amount-control { position: relative; min-width: 0; }
.modal-finance .finance-amount-control input { width: 100%; padding: 0 58px 0 12px; outline: 0; }
.finance-amount-control > span {
  position: absolute;
  inset: 0 12px 0 auto;
  display: flex;
  align-items: center;
  padding-left: 10px;
  border-left: 1px solid #35353d;
  color: #85858e;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}
.modal-finance .summary-row { min-height: 50px; }
.balance-preview {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  margin: 16px 0 6px;
  padding: 12px;
  border: 1px solid #292930;
  border-radius: 7px;
  background: #101013;
}
.balance-preview > div + div { padding-left: 12px; border-left: 1px solid #2a2a30; }
.balance-preview span { display: block; color: #73737c; font-size: 11px; letter-spacing: .045em; white-space: nowrap; }
.balance-preview strong { display: block; margin-top: 7px; color: #dedee2; font-size: 18px; font-weight: 600; white-space: nowrap; }
.balance-preview > div:last-child strong { color: #b9adf4; }
.balance-preview strong.negative { color: var(--red); }

@media (max-width: 900px) {
  .modal-finance .finance-detail-layout { grid-template-columns: 1fr; }
  .modal-finance .finance-summary-pane { border-top: 1px solid var(--border); border-left: 0; }
}

@media (max-width: 620px) {
  .modal-finance .detail-pane { padding: 17px 15px 20px; }
  .modal-finance .field { grid-template-columns: 100px minmax(0,1fr); gap: 10px; }
  .finance-operation-note { align-items: flex-start; }
  .balance-preview { grid-template-columns: 1fr; }
  .balance-preview > div + div { padding: 10px 0 0; border-top: 1px solid #2a2a30; border-left: 0; }
}

/* Interactive dashboard analytics. */
button.panel-period { font-family: inherit; cursor: pointer; transition: color .14s ease, border-color .14s ease, background .14s ease; }
button.panel-period:hover { border-color: #403b59; color: #d6cff7; background: #17151e; }
button.panel-period:focus-visible { outline: 2px solid rgba(124,108,255,.42); outline-offset: 2px; }
.dashboard-page button.legend-item {
  width: 100%;
  padding: 3px 5px;
  border: 0;
  border-radius: 4px;
  text-align: left;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: color .14s ease, background .14s ease;
}
.dashboard-page button.legend-item:hover { color: #e0e0e4; background: #151519; }
.dashboard-page button.legend-item:focus-visible { outline: 2px solid rgba(124,108,255,.38); outline-offset: 1px; }
.dashboard-page .bar {
  position: relative;
  padding: 0;
  border: 0;
  outline: 0;
  font-family: inherit;
  cursor: pointer;
}
.dashboard-page .bar.empty { background: #222227; }
.dashboard-page .bar:focus-visible { box-shadow: 0 0 0 2px #0b0b0d,0 0 0 4px rgba(124,108,255,.58); }
.bar-tooltip {
  position: absolute;
  z-index: 3;
  bottom: calc(100% + 8px);
  left: 50%;
  width: 96px;
  margin-left: -48px;
  min-width: 86px;
  padding: 7px 8px;
  border: 1px solid #34343c;
  border-radius: 5px;
  color: #8b8b94;
  background: #151519;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
  transition: border-color .12s ease, background-color .12s ease;
}
.bar-tooltip strong { display: block; margin-top: 3px; color: #ededee; font-size: 11px; font-weight: 600; }
.bar:hover .bar-tooltip,
.bar:focus-visible .bar-tooltip { visibility: visible; border-color: #464650; background: #18181d; }

/* Shared status pills. */
.status,
.membership {
  width: max-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.status::before,
.membership::before { display: none; }
.status-progress {
  color: #b8a9ff;
  border-color: rgba(164,143,255,.32);
  background: rgba(124,108,255,.12);
}
.status-done,
.membership {
  color: #5edfaf;
  border-color: rgba(52,211,153,.3);
  background: rgba(52,211,153,.1);
}
.status-waiting {
  color: #f3c85b;
  border-color: rgba(251,191,36,.3);
  background: rgba(251,191,36,.1);
}
.status-cancelled {
  color: #ef8490;
  border-color: rgba(235,99,116,.3);
  background: rgba(213,107,118,.1);
}

/* QR code reader. */
.qr-page .page-header { margin-bottom: 28px; }
.qr-module-shell { position: relative; overflow: hidden; border-radius: 10px; }
.qr-module-shell .qr-workspace { pointer-events: none; user-select: none; }
.qr-workspace { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr); gap: 18px; }
.qr-reader-panel,
.qr-result-panel {
  min-width: 0;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid #24242a;
  border-radius: 10px;
  background: linear-gradient(145deg,#0d0d0f 0%,#09090a 100%);
}
.qr-panel-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid #222227;
  background: #0e0e11;
}
.qr-panel-head > div { min-width: 0; display: flex; align-items: center; gap: 11px; }
.qr-panel-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #312e40;
  border-radius: 7px;
  color: #a695ef;
  background: #17151e;
}
.qr-panel-icon svg { width: 16px; height: 16px; }
.qr-panel-head strong,
.qr-panel-head small { display: block; }
.qr-panel-head strong { color: #e4e4e7; font-size: 13px; font-weight: 600; }
.qr-panel-head small { margin-top: 4px; color: #74747c; font-size: 11px; }
.qr-available {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(52,211,153,.24);
  border-radius: 999px;
  color: #62dcae;
  background: rgba(52,211,153,.08);
  font-size: 11px;
  white-space: nowrap;
}
.qr-available i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.qr-module-label {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #303038;
  border-radius: 999px;
  color: #9a9aa3;
  background: #151518;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.qr-lock-state {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  border: 1px solid #2b2b31;
  border-radius: 10px;
  background: #0b0b0e;
  text-align: center;
}
.qr-lock-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid #383641;
  border-radius: 10px;
  color: #9c91ca;
  background: #151419;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
}
.qr-lock-icon svg { width: 21px; height: 21px; }
.qr-lock-badge {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #3b3a43;
  border-radius: 999px;
  color: #c1c1c8;
  background: #19191d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
}
.qr-lock-state h2 { margin: 14px 0 0; color: #e2e2e5; font-size: 19px; font-weight: 600; }
.qr-lock-state p { max-width: 390px; margin: 7px 0 0; color: #92929a; font-size: 12px; line-height: 1.55; }
.qr-reader-body { padding: 20px; }
.qr-dropzone {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  border: 1px dashed #373740;
  border-radius: 8px;
  background: #0d0d10;
  text-align: center;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.qr-dropzone:hover,
.qr-dropzone.is-dragging { border-color: #6657ae; background: #121118; }
.qr-dropzone:focus-within { box-shadow: 0 0 0 3px rgba(124,108,255,.1); }
.qr-dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.qr-drop-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid #34323f;
  border-radius: 9px;
  color: #aa9bed;
  background: #17151d;
}
.qr-drop-icon svg { width: 20px; height: 20px; }
.qr-drop-copy strong { display: block; color: #e2e2e5; font-size: 13px; font-weight: 600; }
.qr-drop-copy small { display: block; margin-top: 6px; color: #777780; font-size: 11px; }
.qr-drop-action {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 0 11px;
  border: 1px solid #33333b;
  border-radius: 6px;
  color: #bcbcc3;
  background: #151519;
  font-size: 11px;
}
.qr-privacy { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; padding: 0 4px; }
.qr-privacy > span:first-child { color: #58dba9; }
.qr-privacy svg { width: 14px; height: 14px; }
.qr-privacy strong,
.qr-privacy small { display: block; }
.qr-privacy strong { color: #a8a8ae; font-size: 11px; font-weight: 600; }
.qr-privacy small { margin-top: 3px; color: #66666e; font-size: 11px; }
.qr-result-panel { display: grid; }
.qr-result-empty,
.qr-result-loading,
.qr-result-error {
  place-self: center;
  max-width: 330px;
  padding: 36px 24px;
  color: #72727a;
  text-align: center;
}
.qr-result-empty > span,
.qr-result-error > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border: 1px solid #2c2c32;
  border-radius: 8px;
  color: #85858e;
  background: #121215;
}
.qr-result-empty svg,
.qr-result-error svg { width: 18px; height: 18px; }
.qr-result-empty strong,
.qr-result-error strong,
.qr-result-loading strong { display: block; color: #cfcfd3; font-size: 12px; font-weight: 600; }
.qr-result-empty p,
.qr-result-error p { margin: 7px 0 0; color: #6e6e76; font-size: 11px; line-height: 1.6; }
.qr-result-error .btn { margin-top: 16px; }
.qr-result-loading small { display: block; margin-top: 7px; color: #696971; font-size: 11px; }
.qr-loader { width: 24px; height: 24px; display: block; margin: 0 auto 14px; border: 2px solid #303038; border-top-color: #8f7cf0; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qr-result-panel:has(.qr-result-preview) { grid-template-columns: 180px minmax(0,1fr); }
.qr-result-preview {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid #222227;
  background: #0c0c0e;
}
.qr-result-preview img { width: 142px; height: 142px; padding: 8px; border: 1px solid #303037; border-radius: 7px; background: #fff; object-fit: contain; }
.qr-result-preview span { color: #707078; font-size: 11px; }
.qr-result-content { min-width: 0; padding: 20px; }
.qr-result-title { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #222227; }
.qr-result-title span,
.qr-result-title strong { display: block; }
.qr-result-title span { color: #6e6e76; font-size: 11px; letter-spacing: .06em; }
.qr-result-title strong { margin-top: 4px; color: #61dcae; font-size: 11px; font-weight: 600; }
.qr-result-content pre {
  max-height: 150px;
  overflow: auto;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #2a2a31;
  border-radius: 6px;
  color: #e1e1e4;
  background: #111114;
  font: 500 10px/1.55 "Geist Mono",Consolas,monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.qr-result-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qr-open-link { display: inline-flex; align-items: center; gap: 6px; color: #9d91da; font-size: 11px; text-decoration: none; }
.qr-open-link:hover { color: #c8bfff; }
.qr-open-link svg { width: 11px; height: 11px; }
.qr-file-meta { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; margin-top: 18px; padding-top: 13px; border-top: 1px solid #222227; color: #696971; font-size: 11px; }
.qr-file-meta strong { overflow: hidden; color: #aaaab1; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .qr-workspace { grid-template-columns: 1fr; }
  .qr-reader-panel,
  .qr-result-panel { min-height: 360px; }
}

@media (max-width: 620px) {
  .qr-panel-head { padding-inline: 13px; }
  .qr-reader-body { padding: 13px; }
  .qr-dropzone { min-height: 220px; padding-inline: 18px; }
  .qr-result-panel:has(.qr-result-preview) { grid-template-columns: 1fr; }
  .qr-result-preview { border-right: 0; border-bottom: 1px solid #222227; }
}

/* Scan modal readability: keep secondary information visible and consistent. */
.modal-scan .action-empty { padding-block: 20px; }
.modal-scan .action-empty strong { color: #e2e2e5; font-size: 13px; font-weight: 600; }
.modal-scan .action-empty p { max-width: 300px; color: #92929a; font-size: 11px; line-height: 1.55; }
.modal-scan .detail-pane-note { color: #9898a0; }
.modal-scan .scan-action small,
.modal-scan .scan-action-foot { color: #909099; }
.modal-scan .label-upload-heading span { color: #e3e3e6; font-weight: 600; }
.modal-scan .label-upload-heading > span { white-space: nowrap; }
.modal-scan .label-upload-heading small { color: #96969f; line-height: 1.4; text-align: right; }
.modal-scan .label-dropzone { border-color: #454851; color: #c4c4cb; background: #111216; }
.modal-scan .label-drop-copy strong { color: #ededee; font-weight: 600; }
.modal-scan .label-drop-copy small { color: #9696a0; }
.modal-scan .label-file-copy strong { color: #e6e6e9; }
.modal-scan .label-file-copy small,
.modal-scan .label-file-order { color: #90909a; }

/* Desktop type scale: Scans is the reference for every business module. */
@media (min-width: 1101px) {
  /* Dashboard */
  .dashboard-page .metric-label { font-size: 13px; }
  .dashboard-page .metric-value,
  .dashboard-page .metric-card:last-child .metric-value { font-size: 28px; }
  .dashboard-page .analytics-grid .panel-title { font-size: 16px; }
  .panel-caption,
  .panel-period { font-size: 13px; }
  .dashboard-page .donut-label small { font-size: 12px; }
  .dashboard-page .legend-item,
  .dashboard-page .legend-item strong { font-size: 14px; }
  .dashboard-page .revenue-total > div:first-child > span,
  .dashboard-page .revenue-average span { font-size: 12px; }
  .dashboard-page .revenue-average strong { font-size: 15px; }
  .dashboard-page .bar-labels { font-size: 12px; }
  .bar-tooltip { min-width: 100px; font-size: 11px; }
  .bar-tooltip strong { font-size: 13px; }

  /* Deposits and balances */
  .finance-summary { grid-template-columns: minmax(480px,1.55fr) repeat(3,minmax(170px,1fr)); }
  .finance-stat-main .finance-stat-content > strong { flex: none; overflow: visible; }
  .finance-stat-label { font-size: 13px; }
  .finance-actions .btn { font-size: 14px; }
  .finance-history-head h2 { font-size: 17px; }
  .finance-history-head span,
  .finance-search-note { font-size: 13px; }

  /* Carrier pricing */
  .settings-carrier-copy strong { font-size: 15px; }
  .settings-carrier-copy small,
  .settings-carrier-meta { font-size: 13px; }
  .pricing-tier-code { font-size: 11px; }
  .pricing-tier-head h3 { font-size: 15px; }
  .pricing-tier-actions > span { font-size: 12px; }
  .add-service { min-height: 34px; font-size: 13px; }
  .pricing-column-head { font-size: 12px; }
  .service-name-input { font-size: 15px; }
  .price-input input { font-size: 15px; }
  .price-input small { font-size: 11px; }
  .pricing-empty { font-size: 13px; }

  /* Finance modal */
  .modal-finance .detail-pane-title { font-size: 16px; }
  .modal-finance .detail-pane-note { font-size: 13px; }
  .finance-operation-note strong { font-size: 14px; }
  .finance-operation-note small { font-size: 12px; }
  .modal-finance .field label { font-size: 14px; }
  .modal-finance .editable-field > input,
  .modal-finance .editable-field > select,
  .modal-finance .finance-amount-control input,
  .modal-finance .readonly-value { font-size: 15px; }
  .finance-amount-control > span { font-size: 11px; }
  .balance-preview span { font-size: 11px; }
  .balance-preview strong { font-size: 21px; }

  /* Scan modal actions and label upload */
  .modal-scan .action-empty strong { font-size: 14px; }
  .modal-scan .action-empty p { font-size: 13px; }
  .modal-scan .label-upload-heading span { font-size: 14px; }
  .modal-scan .label-upload-heading small { font-size: 12px; }
  .modal-scan .label-drop-copy strong { font-size: 14px; }
  .modal-scan .label-drop-copy small { font-size: 13px; }
  .modal-scan .label-file-copy strong { font-size: 14px; }
  .modal-scan .label-file-copy small,
  .modal-scan .label-file-order { font-size: 12px; }

  /* QR reader */
  .qr-panel-head strong { font-size: 15px; }
  .qr-panel-head small { font-size: 12px; }
  .qr-available { font-size: 12px; }
  .qr-drop-copy strong { font-size: 15px; }
  .qr-drop-copy small { font-size: 13px; }
  .qr-drop-action { font-size: 12px; }
  .qr-privacy strong { font-size: 12px; }
  .qr-privacy small { font-size: 11px; }
  .qr-result-empty strong,
  .qr-result-error strong,
  .qr-result-loading strong { font-size: 14px; }
  .qr-result-empty p,
  .qr-result-error p { font-size: 12px; }
  .qr-result-loading small { font-size: 12px; }
  .qr-result-preview span { font-size: 11px; }
  .qr-result-title span { font-size: 11px; }
  .qr-result-title strong { font-size: 13px; }
  .qr-result-content pre { font-size: 13px; }
  .qr-open-link { font-size: 12px; }
  .qr-file-meta { font-size: 12px; }
}

@media (hover: none) {
  .table-actions { opacity: 1; }
  .pricing-delete { opacity: .72; }
}

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

/* Grille finale des prestations. */
.pricing-column-head,
.pricing-service {
  grid-template-columns: minmax(140px,1fr) 108px 30px;
  gap: 10px;
}
.pricing-column-head span:nth-child(2) { text-align: right; }
.pricing-service > .price-input:nth-child(2) input { padding-right: 28px; }
.pricing-service .pricing-delete { align-self: center; justify-self: center; }

@media (max-width: 620px) {
  .pricing-column-head,
  .pricing-service { grid-template-columns: minmax(110px,1fr) 86px 28px; gap: 7px; }
}

/* Toasts métier : nets, contrastés et lisibles. */
.toast-stack {
  right: 24px;
  bottom: 24px;
  width: min(360px,calc(100vw - 32px));
  gap: 10px;
}
.toast {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  overflow: hidden;
  border: 1px solid #34343b;
  border-radius: 9px;
  color: #ededf0;
  background: #121216;
  box-shadow: 0 14px 38px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.025);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.01em;
  animation: none;
  transition: border-color .18s ease, background-color .18s ease;
}
.toast::before { display: none; }
.toast.visible { border-color: #414149; }
.toast.leaving { border-color: #2b2b31; }
.toast-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(52,211,153,.25);
  border-radius: 7px;
  color: #62dfb0;
  background: rgba(52,211,153,.08);
}
.toast-icon svg { width: 14px; height: 14px; stroke-width: 2; }
.toast-copy { min-width: 0; color: inherit; overflow-wrap: anywhere; }
.toast.success { border-color: #343a38; }
.toast.error { border-color: rgba(213,107,118,.36); background: #151113; }
.toast.error .toast-icon { border-color: rgba(235,99,116,.3); color: #f08a96; background: rgba(213,107,118,.1); }

@media (max-width: 620px) {
  .toast-stack { right: 16px; bottom: 16px; }
  .toast { min-height: 56px; padding: 12px 14px; font-size: 14px; }
}

/* Lisibilité et actions de la liste Insider. */
.insider-table .insider-carrier-cell { gap: 11px; }
.insider-table .carrier-cell > .insider-carrier-copy {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 3px;
}
.insider-table .insider-carrier-copy .table-primary,
.insider-table .insider-carrier-copy .table-secondary { display: block; }
.insider-table .insider-label-link.empty { cursor: pointer; }
.insider-table .insider-label-link.empty:hover strong { color: #ededf0; }
.insider-table .insider-label-link.empty:hover > svg { border-color: #454550; color: #a99cf1; background: #15141b; }
.insider-table .insider-check em {
  color: #e7e7e7;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.insider-table .insider-check.is-sent em { color: #67d9af; }

/* Synthèse rapide de l'onglet Scans. */
.scan-summary {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  margin-bottom: 18px;
  border-block: 1px solid var(--border);
}
.scan-summary-item {
  position: relative;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--border);
  color: #ededf0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease;
}
.scan-summary-item:first-child { padding-left: 4px; }
.scan-summary-item:last-child { border-right: 0; }
.scan-summary-item:hover { background: #0c0c0e; }
.scan-summary-item:focus-visible { z-index: 1; outline: 2px solid rgba(124,108,255,.42); outline-offset: -2px; }
.scan-summary-item::after { content: ''; position: absolute; right: 18px; bottom: -1px; left: 18px; height: 2px; border-radius: 2px; background: transparent; }
.scan-summary-item:first-child::after { left: 4px; }
.scan-summary-item.active::after { background: #7c6cff; }
.scan-summary-item span { color: #85858d; font-size: 11px; font-weight: 500; }
.scan-summary-item strong { color: #ededf0; font-size: 22px; font-weight: 600; line-height: 1; letter-spacing: -.035em; }
.scan-summary-item.summary-progress.active::after { background: #7c6cff; }
.scan-summary-item.summary-waiting.active::after { background: #fbbf24; }
.scan-summary-item.summary-done.active::after { background: #34d399; }
.scan-summary-item.summary-cancelled.active::after { background: #ef6374; }
.scan-summary-item.summary-cancelled strong { color: #ef8490; }
.scan-summary-item.summary-pending.active::after { background: #fbbf24; }
.scan-summary-item.summary-sent.active::after { background: #34d399; }
.scan-summary-item.summary-pending.active strong { color: #f3c85b; }
.scan-summary-item.summary-sent.active strong { color: #5edfaf; }
.insider-toolbar .insider-filter-pending.active { color: #f3c85b; }
.insider-toolbar .insider-filter-pending.active::after { background: #fbbf24; }
.insider-toolbar .insider-filter-sent.active { color: #5edfaf; }
.insider-toolbar .insider-filter-sent.active::after { background: #34d399; }

@media (max-width: 850px) {
  .scan-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .scan-summary-item:nth-child(3) { border-right: 0; }
  .scan-summary-item:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
}

/* Passe de finition produit : hiérarchie, précision et états cohérents. */
body {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { letter-spacing: normal; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; color: #696970; border-color: #28282e; background-color: #101013; }
button:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(141,115,255,.72);
  outline-offset: 2px;
}

.sidebar { border-right-color: #202024; }
.nav-item { border-radius: 7px; color: #929298; }
.nav-item:hover { color: #e1e1e4; background: #111114; }
.nav-item.active { color: #f0eefb; background: #14131a; }
.nav-item.active::before { height: 18px; background: #8975ed; }
.nav-item.active svg { color: #ad9fff; }
.nav-item em { border-color: #34343b; color: #a0a0a7; background: #101013; }
.user-card { color: #d8d8dc; transition: background .14s ease; }
.user-card:hover { background: #0f0f12; }

.topbar { border-bottom-color: #202024; background: rgba(8,8,10,.96); }
.searchbox { border-color: #303037; background: #0d0d10; transition: border-color .14s ease, background .14s ease, box-shadow .14s ease; }
.searchbox:hover { border-color: #3a3a43; background: #101013; }
.searchbox:focus-within { border-color: #6d5ac7; background: #111116; box-shadow: 0 0 0 3px rgba(124,92,255,.09); }
.searchbox input::placeholder { color: #77777e; }

.eyebrow { color: #85858c; font-weight: 500; }
.page-header h1 { color: #eeeeF0; font-weight: 600; }
.page-header .subtitle { max-width: 680px; color: #98989f; line-height: 1.55; }
.header-actions { align-items: center; gap: 10px; }
.btn {
  border-color: #35353d;
  border-radius: 7px;
  color: #d3d3d8;
  background: #101013;
  font-weight: 500;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.btn:hover { border-color: #484852; color: #f5f5f6; background: #16161a; }
.btn-primary { border-color: #765ee1; color: #fff; background: #765ee1; }
.btn-primary:hover { border-color: #8973eb; background: #8973eb; }
.btn-primary:active { background: #6c55d4; }
.btn-quiet { border-color: transparent; color: #aaaab1; background: transparent; }
.btn-quiet:hover { border-color: transparent; color: #eeeef0; background: #141417; }

.panel-title,
.finance-history-head h2,
.detail-pane-title,
.modal-head h2,
.settings-carrier-id strong,
.pricing-tier-head h3 { font-weight: 600; }
.panel, .pricing-registry, .clients-panel, .history-panel { border-color: #202024; }
.panel-head { border-color: #202024; }
.link-button { color: #9999a0; }
.link-button:hover { color: #ededf0; }

.toolbar { border-bottom-color: #242429; }
.filter-group { align-items: center; }
.filter-btn {
  position: relative;
  color: #95959c;
  font-weight: 500;
  transition: color .14s ease, background .14s ease;
}
.filter-btn:hover { color: #dedee2; background: rgba(255,255,255,.018); }
.filter-btn.active { color: #d8d1ff; }
.filter-btn:focus-visible { outline-offset: -2px; }
.filter-btn svg { opacity: .72; }

.table-panel { scrollbar-color: #34343b transparent; }
.data-table { border-spacing: 0; }
.data-table th { color: #898990; font-weight: 500; letter-spacing: .045em; }
.data-table td { color: #d0d0d4; font-weight: 500; vertical-align: middle; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #0f0f12; }
.table-primary { color: #eeeeef; font-weight: 600; }
.table-secondary, .cell-sub { color: #8d8d94; font-weight: 400; line-height: 1.35; }
.table-actions { gap: 3px; opacity: .58; }
.action-btn { border-radius: 6px; color: #898990; transition: color .14s ease, background .14s ease; }
.action-btn:hover { color: #f0f0f2; background: #1a1a1f; }
.action-btn:focus-visible { outline-offset: -1px; }
.pagination { color: #8d8d94; border-top-color: #202024; }
.pages button { border-radius: 6px; }
.pages button:hover { color: #ededf0; background: #18181c; }
.pages button.active { color: #ded8ff; background: rgba(124,92,255,.14); }

.scan-summary, .insider-summary { border-color: #232328; }
.scan-summary-item { min-height: 68px; border-right-color: #232328; }
.scan-summary-item:hover { background: #0e0e11; }
.scan-summary-item span { color: #94949b; }
.scan-summary-item strong { font-weight: 600; }

.modal-backdrop { background: rgba(0,0,0,.82); }
.modal {
  border-color: #34343c;
  border-radius: 10px;
  background: #0b0b0e;
  box-shadow: 0 28px 80px rgba(0,0,0,.58);
}
.modal-head {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom-color: #242429;
  background: rgba(11,11,14,.97);
}
.modal-head h2 { color: #efeff1; }
.modal-kicker { color: #83838a; font-weight: 500; }
.modal-close { border: 1px solid transparent; border-radius: 6px; color: #96969d; }
.modal-close:hover { border-color: #34343b; color: #f0f0f2; background: #17171b; }
.detail-pane + .detail-pane { border-left-color: #242429; }
.detail-pane-head { border-bottom-color: #242429; }
.detail-pane-title { color: #e8e8eb; }
.detail-pane-note { color: #8c8c93; }
.field { border-bottom-color: #202025; }
.field label { color: #a0a0a7; font-weight: 500; }
.field input, .field select, .field textarea { color: #eeeeef; caret-color: #9d8aff; }
.field input::placeholder, .field textarea::placeholder { color: #686870; }
.editable-field > input,
.editable-field > select,
.finance-amount-control,
.modal-scan .carrier-select-trigger {
  border-color: #34343d;
  background: #111116;
}
.editable-field > input:hover,
.editable-field > select:hover,
.finance-amount-control:hover,
.modal-scan .carrier-select-trigger:hover { border-color: #484852; background: #141419; }
.editable-field > input:focus,
.editable-field > select:focus,
.modal-scan .carrier-select-trigger:focus-visible {
  border-color: #765fd8;
  background: #14131a;
  box-shadow: 0 0 0 3px rgba(124,92,255,.09);
}
.readonly-value { color: #dedee1; font-weight: 500; }
.summary-row { border-bottom-color: #202025; }
.summary-row > span:first-child { color: #96969d; }
.summary-row strong { color: #e8e8ea; font-weight: 600; }
.modal-foot {
  position: sticky;
  z-index: 5;
  bottom: 0;
  border-top-color: #242429;
  background: rgba(11,11,14,.97);
}
.label-dropzone { border-color: #3a3a43; background: #101014; }
.label-dropzone:hover, .label-dropzone.is-dragging { border-color: #6655bd; background: #14121b; }

.toast { border-color: #3a3a42; background: #131318; box-shadow: 0 16px 42px rgba(0,0,0,.42); }
.toast-copy { font-weight: 500; }

@media (min-width: 1101px) {
  .panel-title { font-size: 15px; }
  .data-table th { font-size: 12px; }
  .data-table td { font-size: 14px; }
  .table-primary { font-size: 15px; }
  .modal-head h2 { font-size: 17px; }
  .detail-pane-title { font-size: 15px; }
  .field label { font-size: 13px; }
  .field input, .field select, .field textarea, .readonly-value { font-size: 14px; }
}

@media (max-width: 700px) {
  .modal-backdrop { padding: 10px; }
  .modal { border-radius: 8px; }
  .page-header { gap: 18px; }
  .header-actions { width: 100%; }
  .header-actions .btn { flex: 1; }
}

/* Finition du registre tarifaire : sobre, contextuel et moins imbriqué. */
.settings-page .pricing-registry { border-top: 0; }
.settings-page .settings-carriers { gap: 10px; }
.settings-page .settings-carrier {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #242429;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.settings-page .settings-carrier[open] {
  margin: 4px 0 10px;
  border: 1px solid #292930;
  border-radius: 8px;
  background: #0b0b0d;
  box-shadow: none;
}
.settings-page .settings-carrier > summary { min-height: 66px; padding-inline: 12px 14px; }
.settings-page .settings-carrier[open] > summary {
  min-height: 68px;
  border-bottom-color: #222227;
  background: #0e0e11;
}
.settings-page .settings-carrier > summary:hover { background: #0e0e11; }
.settings-page .settings-carrier-count {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #8d8d94;
  background: transparent;
  font-weight: 500;
}
.settings-page .settings-carrier-meta { gap: 10px; }
.settings-page .settings-carrier-meta svg { color: #8a8a92; }
.settings-page .settings-carrier-copy small { color: #85858c; }

.settings-page .pricing-groups,
.settings-page .pricing-groups.single {
  gap: 22px;
  padding: 20px 20px 22px 58px;
  background: transparent;
}
.settings-page .pricing-tier {
  border: 0;
  border-top: 1px solid #303037;
  border-radius: 0;
  background: transparent;
}
.settings-page .pricing-tier-head {
  min-height: 58px;
  padding-inline: 2px 0;
  border-bottom: 0;
  background: transparent;
}
.settings-page .pricing-tier-head > .pricing-tier-copy { gap: 0; }
.settings-page .pricing-tier-head h3 { color: #ebebed; }
.settings-page .pricing-tier-actions { gap: 12px; }
.settings-page .pricing-tier-actions > span { color: #85858d; }
.settings-page .add-service {
  min-height: 34px;
  padding-inline: 11px;
  border-color: #403a55;
  border-radius: 6px;
  color: #d2cbed;
  background: #15131b;
  font-weight: 500;
}
.settings-page .add-service:hover {
  border-color: #5a4c86;
  color: #f0edff;
  background: #1a1723;
}
.settings-page .pricing-column-head {
  min-height: 34px;
  padding-inline: 9px 7px;
  border-block: 1px solid #202025;
  color: #7d7d85;
  background: transparent;
}
.settings-page .pricing-service {
  min-height: 58px;
  padding-inline: 4px 3px;
  border-bottom-color: #202025;
  background: transparent;
}
.settings-page .pricing-service:hover,
.settings-page .pricing-service:focus-within { background: #101014; }
.settings-page .service-name-input {
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
}
.settings-page .service-name-input:hover { border-color: #303037; background: #141418; }
.settings-page .service-name-input:focus { border-color: #6553b4; background: #15131b; }
.settings-page .price-input input {
  border-color: #323239;
  border-radius: 6px;
  background: #111115;
  box-shadow: none;
}
.settings-page .price-input input:hover { border-color: #44444d; background: #141419; }
.settings-page .price-input input:focus { border-color: #6c59c5; background: #15131b; box-shadow: 0 0 0 3px rgba(124,92,255,.08); }
.settings-page .pricing-delete {
  color: #8a8a92;
  opacity: 0;
  transition: opacity .14s ease, color .14s ease, background .14s ease;
}
.settings-page .pricing-service:hover .pricing-delete,
.settings-page .pricing-service:focus-within .pricing-delete { opacity: .72; }
.settings-page .pricing-delete:hover,
.settings-page .pricing-delete:focus-visible { color: #ef8490; opacity: 1; background: rgba(213,107,118,.09); }

@media (max-width: 1100px) {
  .settings-page .pricing-groups,
  .settings-page .pricing-groups.single { padding-left: 20px; }
}
@media (max-width: 620px) {
  .settings-page .settings-carriers { gap: 6px; }
  .settings-page .pricing-groups,
  .settings-page .pricing-groups.single { gap: 18px; padding: 14px 10px 18px; }
  .settings-page .pricing-tier-actions > span { display: none; }
}
@media (hover: none) {
  .settings-page .pricing-delete { opacity: .65; }
}

/* Netteté typographique : dimensions natives, graisses réelles et contraste stable. */
body,
button,
input,
select,
textarea {
  font-family: "Geist", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

.brand small,
.nav-label,
.user-card small,
.eyebrow,
.data-table th,
.activity-columns,
.pricing-column-head,
.modal-kicker {
  color: #85858d;
}

.table-secondary,
.cell-sub,
.scan-id small,
.detail-pane-note,
.readonly-client small,
.scan-action small,
.label-upload-heading small,
.label-drop-copy small,
.label-file-copy small,
.finance-operation-note small {
  color: #929299;
}

@media (max-width: 1100px) {
  body { font-size: 14px; }
  .brand small { font-size: 11px; }
  .nav-label, .eyebrow { font-size: 11px; }
  .nav-item span { font-size: 14px; }
  .nav-item em, .nav-item .soon-pill, .nav-item .available-pill { font-size: 11px; }
  .user-card strong { font-size: 12px; }
  .user-card small { font-size: 11px; }
  .page-header .subtitle { font-size: 14px; }
  .metric-label, .link-button { font-size: 12px; }
  .panel-title { font-size: 14px; }
  .activity-columns, .data-table th, .pricing-column-head { font-size: 11px; }
  .data-table td, .cell-main { font-size: 13px; }
  .table-primary, .scan-id strong { font-size: 14px; }
  .table-secondary, .cell-sub, .scan-id small { font-size: 12px; }
  .status, .membership, .service-code { font-size: 12px; }
  .pagination, .pages button { font-size: 11px; }
  .filter-btn, .scan-filter-panel header > button, .period-presets button { font-size: 12px; }
  .scan-filter-grid label > span, .scan-filter-panel footer, .active-filter-bar > span { font-size: 11px; }
  .scan-filter-grid select, .scan-filter-grid input, .active-filter-bar button { font-size: 12px; }
  .modal-head h2 { font-size: 16px; }
  .modal-kicker { font-size: 11px; }
  .detail-pane-title { font-size: 14px; }
  .detail-pane-note { font-size: 12px; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea, .readonly-value { font-size: 14px; }
  .summary-row, .mini-history-row { font-size: 12px; }
  .summary-row strong { font-size: 14px; }
  .scan-action strong, .label-upload-heading span, .label-drop-copy strong { font-size: 13px; }
  .scan-action small, .scan-action button, .scan-action-foot,
  .label-upload-heading small, .label-drop-copy small, .label-file-copy strong, .label-file-copy small { font-size: 11px; }
  .finance-history-head span, .finance-search-note, .autosave-status { font-size: 12px; }
  .settings-carrier-meta, .pricing-tier-head span, .pricing-tier-actions > span { font-size: 11px; }
}

/* Densité desktop native équivalente à un zoom navigateur de 90 %. */
@media (min-width: 1101px) {
  body { font-size: 14px; }

  .app-shell { grid-template-columns: 212px minmax(0,1fr); }
  .sidebar { width: 212px; padding: 20px 13px 14px; }
  .brand { padding: 0 7px 27px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 11px; }
  .nav-label { margin-inline: 8px; font-size: 11px; }
  .nav-label-secondary { margin-top: 20px; }
  .nav-item { height: 40px; gap: 10px; padding-inline: 9px; }
  .nav-item span { font-size: 14px; }
  .nav-item em { font-size: 11px; }
  .avatar { width: 28px; height: 28px; }
  .user-card { padding-top: 13px; }
  .user-card strong { font-size: 12px; }
  .user-card small { font-size: 11px; }

  .topbar { height: 63px; padding-inline: 40px; }
  .searchbox { width: min(414px,44vw); height: 38px; padding-inline: 10px; }
  .searchbox input { font-size: 13px; }
  .content { max-width: none; padding: 40px 32px 70px; }

  .page-header { min-height: 79px; margin-bottom: 34px; }
  .eyebrow { font-size: 11px; }
  .page-header h1 { font-size: clamp(34px,2.35vw,38px); }
  .page-header .subtitle { margin-top: 8px; font-size: 14px; }
  .btn { min-height: 38px; padding-inline: 14px; font-size: 13px; }
  .btn svg { width: 15px; height: 15px; }

  .dashboard-page .page-header { min-height: 76px; margin-bottom: 30px; }
  .metric-grid { margin-bottom: 22px; }
  .metric-card { min-height: 68px; }
  .metric-label { font-size: 12px; }
  .metric-value,
  .dashboard-page .metric-value,
  .dashboard-page .metric-card:last-child .metric-value { font-size: 25px; }
  .dashboard-page .metric-grid { grid-template-columns: repeat(3,171px) 243px; gap: 11px; margin-bottom: 25px; }
  .dashboard-page .metric-card,
  .dashboard-page .metric-card:first-child,
  .dashboard-page .metric-card:last-child { min-height: 65px; gap: 13px; padding: 11px 14px; }
  .panel-head { min-height: 47px; }
  .panel-title, .dashboard-page .analytics-grid .panel-title { font-size: 14px; }
  .panel-caption, .panel-period, .link-button { font-size: 12px; }
  .activity-row { min-height: 54px; }
  .activity-columns, .data-table th { font-size: 11px; }
  .data-table th { height: 38px; padding-inline: 13px; }
  .data-table td { height: 54px; padding-inline: 13px; font-size: 13px; }
  .table-primary { font-size: 14px; }
  .table-secondary, .cell-sub, .scan-id small { font-size: 12px; }
  .scan-id strong, .cell-main { font-size: 13px; }
  .status, .membership, .service-code { font-size: 12px; }
  .toolbar { min-height: 43px; }
  .filter-btn { padding: 10px 11px; font-size: 13px; }
  .pagination { min-height: 43px; font-size: 11px; }
  .pages button { width: 27px; height: 27px; font-size: 11px; }

  .finance-stat { min-height: 90px; padding: 14px 18px; }
  .finance-stat-label { font-size: 12px; }
  .finance-stat-content { margin-top: 13px; }
  .finance-stat-content > strong { font-size: 23px; }
  .finance-stat-main .finance-stat-content > strong { font-size: 27px; }
  .finance-actions .btn { min-height: 34px; font-size: 13px; }
  .finance-history { margin-top: 25px; }
  .finance-history-head { min-height: 49px; }
  .finance-history-head h2 { font-size: 15px; }
  .finance-history-head span, .finance-search-note { font-size: 12px; }
  .finance-toolbar { min-height: 47px; }

  .settings-page .page-header { margin-bottom: 30px; }
  .settings-page .settings-carriers { gap: 9px; }
  .settings-page .settings-carrier > summary { min-height: 59px; padding-inline: 11px 13px; }
  .settings-carrier-id { gap: 13px; }
  .settings-carrier-id .carrier-mark { width: 34px; height: 31px; }
  .settings-carrier-copy strong { font-size: 14px; }
  .settings-carrier-copy small, .settings-carrier-meta { font-size: 12px; }
  .settings-carrier-count { min-height: 23px; padding-inline: 7px; }
  .settings-page .pricing-groups,
  .settings-page .pricing-groups.single { gap: 17px; padding: 14px 16px 16px 54px; }
  .settings-page .pricing-tier-head { min-height: 52px; }
  .pricing-tier-head h3 { font-size: 14px; }
  .pricing-tier-actions > span, .pricing-column-head { font-size: 11px; }
  .settings-page .add-service { min-height: 31px; padding-inline: 10px; font-size: 12px; }
  .settings-page .pricing-column-head { min-height: 31px; }
  .settings-page .pricing-service { min-height: 52px; }
  .pricing-service { grid-template-columns: minmax(0,1fr) 104px 29px; gap: 10px; font-size: 13px; }
  .service-name-input, .price-input input { height: 40px; font-size: 14px; }
  .pricing-delete { width: 29px; height: 29px; }

  .modal { width: min(936px,100%); max-height: min(760px,92vh); }
  .modal-head { min-height: 59px; padding-inline: 22px; }
  .modal-head h2 { font-size: 16px; }
  .modal-kicker { font-size: 11px; }
  .detail-pane { padding: 18px 22px; }
  .detail-pane-title { font-size: 14px; }
  .detail-pane-note { font-size: 12px; }
  .field { min-height: 56px; grid-template-columns: 135px minmax(0,1fr); gap: 16px; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea, .readonly-value { min-height: 41px; font-size: 13px; }
  .summary-row { min-height: 47px; font-size: 12px; }
  .summary-row strong { font-size: 13px; }
  .modal-foot { min-height: 56px; padding: 9px 22px; }
  .modal-foot .btn { min-height: 38px; }
  .modal-scan { --modal-control-height: 41px; width: min(954px,100%); }
  .modal-scan .scan-detail-layout { grid-template-columns: minmax(0,1fr) 342px; }
  .modal-scan .field { min-height: 58px; grid-template-columns: 135px minmax(0,1fr); gap: 16px; }

  .toast-stack { width: min(324px,calc(100vw - 32px)); }
  .toast { min-height: 52px; grid-template-columns: 27px minmax(0,1fr); gap: 11px; padding: 12px 14px; font-size: 13px; }
  .toast-icon { width: 27px; height: 27px; }
}

/* KPIs et compteurs : alignement optique et chiffres nets. */
.metric-value,
.scan-summary-item strong,
.insider-summary strong,
.nav-item em {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-synthesis: none;
}

.metric-value {
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

.nav-item > span { min-width: 0; }
.nav-item em {
  width: 20px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

@media (min-width: 1101px) {
  .dashboard-page .metric-grid {
    grid-template-columns: 200px 190px 170px 270px;
    gap: 10px;
  }
  .dashboard-page .metric-card,
  .dashboard-page .metric-card:first-child,
  .dashboard-page .metric-card:last-child {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) max-content;
    align-items: center;
    column-gap: 12px;
    padding-inline: 14px;
  }
  .dashboard-page .metric-label {
    min-width: 0;
    display: grid;
    grid-template-columns: 32px minmax(0,1fr);
    align-items: center;
    gap: 10px;
  }
  .dashboard-page .metric-label > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-page .metric-value,
  .dashboard-page .metric-card:last-child .metric-value {
    min-width: 20px;
    margin: 0;
    justify-self: end;
    color: #f1f1f3;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }
}

/* Sélecteur de compte de la barre latérale. */
.user-card {
  min-height: 62px;
  gap: 9px;
  padding: 12px 7px 7px;
  border-top-color: #26262b;
  border-radius: 0;
  color: #dedee2;
  transition: color .14s ease, background-color .14s ease;
}
.user-card:hover { color: #f3f3f5; background: #0e0e11; }
.user-card:focus-visible {
  outline: 2px solid rgba(141,115,255,.68);
  outline-offset: -2px;
}
.user-card .avatar {
  width: 32px;
  height: 32px;
  border-color: #3a3a42;
  color: #eeeeF1;
  background: #151519;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.user-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.user-card strong {
  color: #ededf0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.user-card small {
  margin: 0;
  color: #85858d;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}
.user-card > svg {
  width: 28px;
  height: 28px;
  padding: 6px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #707078;
  transition: color .14s ease, border-color .14s ease, background-color .14s ease;
}
.user-card:hover > svg {
  border-color: #303037;
  color: #b4b4bc;
  background: #17171b;
}

/* Registre tarifaire compact : une carte par transporteur, deux listes simples. */
.settings-page .page-header { margin-bottom: 24px; }
.settings-page .settings-carriers { gap: 8px; }
.settings-page .settings-carrier,
.settings-page .settings-carrier[open] {
  margin: 0;
  overflow: clip;
  border: 1px solid #24242a;
  border-radius: 8px;
  background: #0a0a0c;
  box-shadow: none;
}
.settings-page .settings-carrier[open] { border-color: #303038; background: #0b0b0e; }
.settings-page .settings-carrier > summary,
.settings-page .settings-carrier[open] > summary {
  min-height: 54px;
  padding: 0 12px;
  border: 0;
  background: transparent;
}
.settings-page .settings-carrier > summary:hover { background: #0e0e11; }
.settings-page .settings-carrier-id { gap: 10px; }
.settings-page .settings-carrier-id .carrier-mark {
  width: 30px;
  height: 28px;
}
.settings-page .settings-carrier-copy { display: flex; align-items: center; }
.settings-page .settings-carrier-copy strong {
  color: #eeeeF0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.settings-page .settings-carrier-meta { gap: 9px; }
.settings-page .settings-carrier-count {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #2e2e35;
  border-radius: 999px;
  color: #9999a1;
  background: #111114;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.settings-page .settings-carrier-meta svg { width: 13px; height: 13px; }

.settings-page .pricing-groups,
.settings-page .pricing-groups.single {
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: start;
  gap: 12px;
  padding: 0 12px 12px;
  background: transparent;
}
.settings-page .pricing-tier {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #0e0e11;
}
.settings-page .pricing-tier-head {
  min-height: 44px;
  padding: 0 8px 0 12px;
  border: 0;
  background: transparent;
}
.settings-page .pricing-tier-head > .pricing-tier-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-page .pricing-tier-head h3 {
  color: #e7e7ea;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.settings-page .pricing-tier-count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #96969f;
  background: #1a1a1f;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.settings-page .add-service {
  min-height: 28px;
  padding: 0 8px;
  border-color: transparent;
  border-radius: 5px;
  color: #aaa3ce;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
}
.settings-page .add-service:hover {
  border-color: #383244;
  color: #e4defb;
  background: #17151d;
}
.settings-page .add-service svg { width: 12px; height: 12px; }
.settings-page .pricing-column-head { display: none; }
.settings-page .pricing-services {
  display: grid;
  gap: 2px;
  padding: 0 6px 6px;
}
.settings-page .pricing-service {
  min-height: 44px;
  grid-template-columns: minmax(0,1fr) 88px 28px;
  gap: 6px;
  padding: 0 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}
.settings-page .pricing-service:hover,
.settings-page .pricing-service:focus-within { background: #141419; }
.settings-page .service-name-input,
.settings-page .price-input input {
  height: 36px;
  font-size: 13px;
}
.settings-page .service-name-input {
  padding-inline: 8px;
  border-color: transparent;
  background: transparent;
  font-weight: 500;
}
.settings-page .service-name-input:hover { border-color: #2d2d35; background: #111115; }
.settings-page .service-name-input:focus { border-color: #5f50aa; background: #121117; }
.settings-page .price-input input {
  padding-inline: 8px 25px;
  border-color: #2d2d34;
  background: #121216;
  font-weight: 600;
  text-align: right;
}
.settings-page .price-input small { right: 8px; color: #85858d; }
.settings-page .pricing-delete { width: 28px; height: 28px; }
.settings-page .pricing-empty {
  min-height: 44px;
  padding: 0 9px;
  border: 0;
  color: #7f7f87;
}

@media (max-width: 1100px) {
  .settings-page .pricing-groups,
  .settings-page .pricing-groups.single { grid-template-columns: 1fr; padding: 0 10px 10px; }
}

@media (max-width: 620px) {
  .settings-page .settings-carrier > summary,
  .settings-page .settings-carrier[open] > summary { min-height: 52px; padding-inline: 9px; }
  .settings-page .settings-carrier-count { padding-inline: 6px; }
  .settings-page .pricing-service { grid-template-columns: minmax(0,1fr) 82px 28px; }
}

/* Aperçu verrouillé du décryptage QR. */
.nav-item .unavailable-pill {
  width: auto;
  min-width: 54px;
  height: 22px;
  padding: 0 7px;
  border-color: #393943;
  border-radius: 999px;
  color: #aaaab3;
  background: #151519;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
}
.nav-item:has(.unavailable-pill) > span { white-space: nowrap; }
.nav-item:hover .unavailable-pill,
.nav-item.active .unavailable-pill {
  border-color: #484754;
  color: #c7c7ce;
  background: #19191e;
}

.qr-module-shell .qr-workspace {
  pointer-events: none;
  user-select: none;
}
.qr-lock-state {
  cursor: not-allowed;
  padding: 24px;
  border-color: #2b2b31;
  background: rgba(5,5,7,.42);
}
.qr-lock-card {
  width: min(440px,calc(100% - 32px));
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 24px 26px;
  border: 1px solid #373740;
  border-radius: 10px;
  background: #101014;
  box-shadow: 0 22px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.025);
}
.qr-lock-card .qr-lock-icon {
  width: 42px;
  height: 42px;
  margin: 0 0 12px;
  border-radius: 8px;
  box-shadow: none;
}
.qr-lock-card .qr-lock-icon svg { width: 19px; height: 19px; }
.qr-lock-card .qr-lock-badge {
  min-height: 24px;
  padding-inline: 9px;
  color: #bdbdc5;
  font-size: 11px;
  letter-spacing: .055em;
}
.qr-lock-card h2 {
  margin-top: 13px;
  color: #eeeeF0;
  font-size: 17px;
}
.qr-lock-card p {
  max-width: 370px;
  margin-top: 7px;
  color: #9a9aa2;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .nav-item .unavailable-pill { min-width: 52px; padding-inline: 6px; }
  .qr-lock-state { padding: 12px; }
  .qr-lock-card { width: min(390px,calc(100% - 16px)); padding: 20px; }
}

.brand { padding-bottom: 34px; }

/* Modale de notification alignée sur les autres flux métier. */
.modal-notification {
  width: min(936px,100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-notification #modalForm {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.modal-notification .modal-body {
  min-height: 0;
  overflow: auto;
}
.modal-notification .notification-layout {
  grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr);
}
.modal-notification .detail-pane { padding: 18px 22px 20px; }
.modal-notification .notification-preview { background: #0d0d0f; }
.modal-notification .detail-pane-head {
  min-height: 38px;
  margin-bottom: 12px;
  padding-bottom: 12px;
}
.modal-notification .detail-pane-title {
  color: #e9e9ec;
  font-size: 14px;
  font-weight: 600;
}
.modal-notification .detail-pane-note {
  color: #85858d;
  font-size: 11px;
}
.modal-notification .notification-options {
  display: grid;
  gap: 5px;
}
.modal-notification .notification-option {
  min-height: 54px;
  grid-template-columns: 30px minmax(0,1fr) 16px;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  transition: color .14s ease, border-color .14s ease, background-color .14s ease;
}
.modal-notification .notification-option:hover {
  border-color: #2b2b32;
  background: #101014;
}
.modal-notification .notification-option:has(input:checked) {
  border-color: #40375c;
  background: #15131c;
  box-shadow: none;
}
.modal-notification .notification-option > .scan-action-icon {
  width: 30px;
  height: 30px;
  border: 1px solid #30303a;
  border-radius: 6px;
  color: #9b8ce4;
  background: #17151e;
}
.modal-notification .notification-option > .scan-action-icon svg {
  width: 14px;
  height: 14px;
}
.modal-notification .notification-option strong {
  color: #e4e4e7;
  font-size: 13px;
  font-weight: 600;
}
.modal-notification .notification-option small {
  margin-top: 3px;
  color: #85858d;
  font-size: 11px;
  line-height: 1.35;
}
.modal-notification .radio-check {
  width: 16px;
  height: 16px;
  border-color: #50505a;
  background: #0f0f12;
}
.modal-notification .notification-option:has(input:checked) .radio-check {
  border: 4px solid #8069e8;
  background: #17131f;
}
.modal-notification .custom-message-field {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #242429;
}
.modal-notification .custom-message-field label {
  color: #929299;
  font-size: 11px;
  letter-spacing: .04em;
}
.modal-notification .custom-message-field textarea {
  min-height: 108px;
  margin-top: 8px;
  padding: 11px 12px;
  border-color: #393941;
  border-radius: 6px;
  color: #eeeeF0;
  background: #121216;
  font-size: 13px;
}
.modal-notification .custom-message-field textarea:hover { border-color: #4a4a54; }
.modal-notification .custom-message-field textarea:focus {
  border-color: #765fd8;
  box-shadow: 0 0 0 3px rgba(124,92,255,.09);
}
.modal-notification .preview-meta {
  margin: 0 0 14px;
}
.modal-notification .preview-meta .summary-row {
  min-height: 44px;
  font-size: 12px;
}
.modal-notification .preview-meta .summary-row strong { font-size: 13px; }
.modal-notification .message-preview {
  margin: 0;
  padding: 14px;
  border: 1px solid #292930;
  border-radius: 7px;
  background: #101013;
}
.modal-notification .message-preview-head {
  gap: 10px;
  margin-bottom: 12px;
}
.modal-notification .message-preview-head .client-avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
}
.modal-notification .message-preview-head strong {
  color: #e6e6e9;
  font-size: 12px;
  font-weight: 600;
}
.modal-notification .message-preview-head small {
  margin-top: 3px;
  color: #85858d;
  font-size: 11px;
}
.modal-notification .message-bubble {
  padding: 11px 12px;
  border-left-color: #6654b9;
  color: #dedee2;
  background: #0c0c10;
  font-size: 12px;
  line-height: 1.55;
}
.modal-notification .message-preview-foot {
  margin-top: 9px;
  color: #7f7f87;
  font-size: 11px;
}
.modal-notification .modal-foot {
  min-height: 56px;
  gap: 8px;
  padding: 9px 22px;
}
.modal-notification .modal-foot .btn { min-height: 38px; }

@media (max-width: 800px) {
  .modal-notification .notification-layout { grid-template-columns: 1fr; }
  .modal-notification .notification-preview {
    border-top: 1px solid #242429;
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .modal-notification .detail-pane { padding: 16px 14px 18px; }
  .modal-notification .detail-pane-note { display: none; }
  .modal-notification .notification-option { padding-inline: 8px; }
  .modal-notification .modal-foot { padding-inline: 14px; }
}

/* Densité et lisibilité des champs tarifaires. */
.settings-page .pricing-tier { background: transparent; }
.settings-page .pricing-tier-head {
  min-height: 42px;
  padding-inline: 8px 5px;
}
.settings-page .pricing-services {
  gap: 3px;
  padding: 0 2px 4px;
}
.settings-page .pricing-service {
  min-height: 42px;
  grid-template-columns: minmax(0,1fr) 96px 28px;
  gap: 7px;
  padding-inline: 4px 2px;
}
.settings-page .service-name-input,
.settings-page .price-input input { height: 34px; }
.settings-page .service-name-input {
  color: #e1e1e4;
  font-size: 13px;
}
.settings-page .price-input input {
  padding: 0 26px 0 10px;
  border-color: #45454f;
  color: #f1f1f3;
  background: #17171c;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  cursor: text;
}
.settings-page .price-input input:hover {
  border-color: #595965;
  background: #1a1a20;
}
.settings-page .price-input input:focus {
  border-color: #8069e8;
  background: #181620;
  box-shadow: 0 0 0 3px rgba(124,92,255,.1), inset 0 1px 0 rgba(255,255,255,.035);
}
.settings-page .price-input small {
  right: 9px;
  color: #a0a0a8;
  font-size: 11px;
  font-weight: 500;
}

@media (min-width: 1101px) {
  .settings-page .pricing-tier-head,
  .settings-page .pricing-services { width: min(100%,520px); }
}

@media (max-width: 620px) {
  .settings-page .pricing-service {
    grid-template-columns: minmax(0,1fr) 88px 28px;
    gap: 5px;
  }
}

/* Colonnes de traitement Insider. */
.insider-table { min-width: 1100px; table-layout: fixed; }
.insider-table th:nth-child(1) { width: 18%; }
.insider-table th:nth-child(2) { width: 18%; }
.insider-table th:nth-child(3) { width: 22%; }
.insider-table th:nth-child(4) { width: 12%; }
.insider-table th:nth-child(5) { width: 17%; }
.insider-table th:nth-child(6) { width: 9%; }
.insider-table th:nth-child(7) { width: 4%; }
.insider-table .insider-check,
.insider-table .insider-check em {
  white-space: nowrap;
}

/* Lecture rapide des prestations et actions rattachées à leur section. */
.settings-page .pricing-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.settings-page .pricing-tier-head > .pricing-tier-copy {
  min-width: 0;
  flex: 1;
}
.settings-page .pricing-tier-head > .add-service {
  min-height: 30px;
  margin-left: auto;
  padding-inline: 9px;
  flex: none;
  border-color: #373242;
  color: #c2b9e6;
  background: #141219;
}
.settings-page .pricing-tier-head > .add-service:hover {
  border-color: #51466d;
  color: #eee9ff;
  background: #191620;
}
.settings-page .service-name-input {
  border-color: #25252c;
  border-radius: 6px;
  background: rgba(25,25,31,.64);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}
.settings-page .service-name-input:hover {
  border-color: #34343d;
  background: rgba(29,29,36,.78);
}
.settings-page .service-name-input:focus {
  border-color: #6555b7;
  background: #17151e;
  box-shadow: 0 0 0 3px rgba(124,92,255,.08), inset 0 1px 0 rgba(255,255,255,.02);
}

/* Ouverture des dossiers et actions explicites. */
.record-row { cursor: pointer; }
.record-row:focus-visible {
  outline: 2px solid rgba(141,115,255,.65);
  outline-offset: -2px;
}
.action-label { display: none; }
.row-more::after { display: none; }
.row-more svg { width: 14px; height: 14px; display: block; }
.modal-scan-detail { width: min(820px,100%); }
.modal-scan-detail .scan-view-layout { grid-template-columns: minmax(0,1fr) minmax(310px,.78fr); }
.modal-scan-detail .detail-pane { padding: 20px 22px 22px; }
.modal-scan-detail .scan-view-summary { background: #0d0d0f; }
.modal-scan-detail .scan-view-actions { display: grid; gap: 7px; margin-top: 16px; }
.modal-scan-detail .scan-view-actions .btn { justify-content: flex-start; }
.modal-scan-detail .summary-row .status { margin-left: auto; }

/* Expérience téléphone, isolée de la version desktop. */
@media (max-width: 700px) {
  body { min-width: 0; font-size: 14px; }
  .app-shell { display: block; }
  .main { width: 100%; }
  button,
  .record-row { touch-action: manipulation; }

  .sidebar {
    z-index: 80;
    width: min(300px,86vw);
    padding: 20px 14px 16px;
    border-right-color: #2a2a30;
    background: #0a0a0c;
    box-shadow: 18px 0 55px rgba(0,0,0,.58);
  }
  .sidebar .nav-item { min-height: 44px; }
  .sidebar .user-card { min-height: 64px; }

  .topbar {
    height: 68px;
    padding: 0 14px;
    gap: 10px;
    background: rgba(8,8,10,.98);
  }
  .mobile-menu {
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 8px;
  }
  .mobile-menu:active { border-color: #34343b; background: #141417; }
  .mobile-menu span { width: 18px; }
  .searchbox {
    width: auto;
    height: 44px;
    flex: 1;
    padding-inline: 12px;
    border-radius: 8px;
  }
  .searchbox input { min-width: 0; font-size: 14px; }

  .content { padding: 26px 16px calc(48px + env(safe-area-inset-bottom)); }
  .page-header {
    min-height: 0;
    gap: 22px;
    margin-bottom: 26px;
  }
  .page-header .eyebrow { display: none; }
  .page-header h1 { font-size: 30px; line-height: 1.08; letter-spacing: -.035em; }
  .page-header .subtitle { max-width: 100%; margin-top: 9px; font-size: 14px; line-height: 1.5; }
  .header-actions { width: 100%; display: flex; gap: 10px; }
  .header-actions .btn { min-width: 0; min-height: 46px; flex: 1; padding-inline: 12px; font-size: 14px; }
  .header-actions .btn-primary { flex: 1.35; }
  .btn { min-height: 44px; }

  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 20px; }
  .metric-card,
  .metric-card:first-child,
  .metric-card:last-child { min-height: 82px; padding: 13px 12px; }
  .metric-label { font-size: 12px; }
  .metric-value, .metric-card:last-child .metric-value { margin-top: 9px; font-size: 24px; }
  .dashboard-page .dashboard-grid { grid-template-columns: 1fr; gap: 16px; }
  .dashboard-page .activity-panel,
  .dashboard-page .analytics-grid .panel { border: 1px solid #24242a; border-radius: 10px; background: #0b0b0e; }
  .dashboard-page .activity-list { display: grid; gap: 0; }
  .dashboard-page .activity-row {
    min-height: 84px;
    grid-template-columns: minmax(0,1fr) minmax(110px,.8fr) 40px;
    gap: 10px;
    padding: 13px 12px;
    border-bottom-color: #222227;
  }
  .dashboard-page .activity-row > :nth-child(3),
  .dashboard-page .activity-row > :nth-child(4) { display: none; }
  .dashboard-page .activity-row > :nth-child(5) { display: grid; }
  .dashboard-page .row-more {
    width: 40px;
    height: 40px;
    align-self: center;
    border: 1px solid #303038;
    border-radius: 7px;
    color: #aaa0dc;
    background: #14131a;
  }
  .dashboard-page .row-more::after { display: none; }
  .dashboard-page .row-more svg { width: 16px; height: 16px; display: block; }
  .dashboard-page .analytics-grid { grid-template-columns: 1fr; gap: 16px; }
  .dashboard-page .donut-area { justify-content: space-between; }

  .scan-summary,
  .insider-summary { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 18px; }
  .scan-summary-item { min-height: 78px; padding: 12px; }
  .scan-summary-item:first-child { padding-left: 12px; }
  .scan-summary-item strong { font-size: 23px; }
  .scan-summary-item:nth-child(3) { border-right: 0; }
  .scan-summary-item:nth-child(-n+3) { border-bottom: 1px solid #232328; }

  .scan-toolbar,
  .insider-toolbar {
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: end;
    gap: 8px;
    margin-bottom: 12px;
  }
  .scan-toolbar.has-active-filters { margin-bottom: 58px; }
  .scan-toolbar .filter-group,
  .insider-toolbar .filter-group {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  .scan-toolbar .filter-group::-webkit-scrollbar,
  .insider-toolbar .filter-group::-webkit-scrollbar { display: none; }
  .filter-btn { min-height: 44px; flex: none; padding: 10px 11px; font-size: 13px; }
  .scan-filter-trigger { min-height: 42px; margin-bottom: 1px; }
  .scan-filter-panel {
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 92px);
    border-radius: 10px;
  }
  .scan-filter-panel header { padding-inline: 14px; }
  .scan-filter-grid { grid-template-columns: 1fr; padding: 14px; }
  .scan-filter-grid label, .scan-filter-grid label:nth-child(n+4) { grid-column: auto; }
  .scan-filter-grid select, .scan-filter-grid input { height: 44px; font-size: 14px; }
  .period-presets { padding-inline: 14px; overflow-x: auto; }
  .period-presets button { min-height: 38px; flex: none; }
  .active-filter-bar { gap: 7px; }
  .active-filter-bar button { height: 34px; }

  .records-panel,
  .finance-table-wrap { overflow: visible; background: transparent; }
  .data-table,
  .insider-table {
    min-width: 0;
    display: block;
    table-layout: auto;
  }
  .data-table thead { display: none; }
  .data-table tbody { display: grid; gap: 10px; }
  .data-table tbody tr {
    width: 100%;
    display: grid;
    gap: 11px 14px;
    padding: 14px;
    border: 1px solid #292930;
    border-radius: 10px;
    background: #0c0c0f;
  }
  .data-table tbody tr:hover { background: #0e0e12; }
  .data-table tbody td,
  .data-table tbody td:first-child {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 13px;
  }
  .data-table tbody td::before {
    display: block;
    margin-bottom: 5px;
    color: #7f7f88;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .055em;
    line-height: 1;
    text-transform: uppercase;
  }
  .data-table .table-primary { font-size: 14px; }
  .data-table .table-secondary { margin-top: 4px; font-size: 12px; }
  .data-table .table-actions {
    width: 100%;
    min-height: 48px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    padding-top: 10px;
    border-top: 1px solid #24242a;
    opacity: 1;
  }
  .data-table .action-btn {
    width: 42px;
    height: 42px;
    border: 1px solid #303038;
    border-radius: 7px;
    color: #aaaab2;
    background: #121216;
  }
  .data-table .mobile-labeled-action {
    width: auto;
    display: inline-flex;
    gap: 7px;
    padding-inline: 12px;
    color: #d9d3f7;
    border-color: #40375b;
    background: #15131c;
  }
  .data-table .action-label { display: inline; font-size: 12px; font-weight: 500; }

  .scans-table tbody tr { grid-template-columns: minmax(0,1fr) auto; }
  .scans-table td:nth-child(1) { grid-column: 1; }
  .scans-table td:nth-child(8) { grid-column: 2; grid-row: 1; justify-self: end; }
  .scans-table td:nth-child(2) { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid #24242a; }
  .scans-table td:nth-child(3) { grid-column: 1; }
  .scans-table td:nth-child(4) { grid-column: 2; text-align: right; }
  .scans-table td:nth-child(5) { grid-column: 1; }
  .scans-table td:nth-child(6) { grid-column: 2; text-align: right; }
  .scans-table td:nth-child(7) { grid-column: 1; }
  .scans-table td:nth-child(9) { grid-column: 1 / -1; }
  .scans-table td:nth-child(2)::before { content: "Client"; }
  .scans-table td:nth-child(3)::before { content: "Transporteur"; }
  .scans-table td:nth-child(4)::before { content: "Prestation"; }
  .scans-table td:nth-child(5)::before { content: "Boutique"; }
  .scans-table td:nth-child(6)::before { content: "Montant"; }
  .scans-table td:nth-child(7)::before { content: "Création"; }

  .insider-table tbody tr { grid-template-columns: minmax(0,1fr) auto; }
  .insider-table td:nth-child(1) { grid-column: 1; }
  .insider-table td:nth-child(7) { grid-column: 2; grid-row: 1; justify-self: end; }
  .insider-table td:nth-child(2),
  .insider-table td:nth-child(3) { grid-column: 1 / -1; }
  .insider-table td:nth-child(4) { grid-column: 1; }
  .insider-table td:nth-child(5) { grid-column: 2; text-align: right; }
  .insider-table td:nth-child(6) { grid-column: 1; }
  .insider-table td:nth-child(8) { grid-column: 1 / -1; }
  .insider-table td:nth-child(2)::before { content: "Client"; }
  .insider-table td:nth-child(3)::before { content: "Transporteur / prestation"; }
  .insider-table td:nth-child(4)::before { content: "Montant"; }
  .insider-table td:nth-child(5)::before { content: "Date"; text-align: left; }
  .insider-table td:nth-child(6)::before { content: "Labels"; text-align: left; }
  .insider-table .insider-check > span { width: 30px; height: 30px; }
  .insider-table .insider-check em { font-size: 13px; }
  .insider-table .insider-label-link { max-width: 145px; }

  .clients-table tbody tr { position: relative; grid-template-columns: minmax(0,1fr) auto; }
  .clients-table td:nth-child(1),
  .clients-table td:nth-child(2),
  .clients-table td:nth-child(6) { grid-column: 1 / -1; }
  .clients-table td:nth-child(3) { grid-column: 1; }
  .clients-table td:nth-child(4) { grid-column: 2; text-align: right; }
  .clients-table td:nth-child(5) { position: absolute; top: 14px; right: 14px; }
  .clients-table td:nth-child(2)::before { content: "Contact"; }
  .clients-table td:nth-child(3)::before { content: "Scans"; }
  .clients-table td:nth-child(4)::before { content: "Crédit disponible"; }

  .finance-table tbody tr { grid-template-columns: minmax(0,1fr) auto; }
  .finance-table td:nth-child(1) { grid-column: 1; }
  .finance-table td:nth-child(6) { grid-column: 2; grid-row: 1; justify-self: end; }
  .finance-table td:nth-child(2) { grid-column: 1 / -1; }
  .finance-table td:nth-child(3) { grid-column: 1; }
  .finance-table td:nth-child(4) { grid-column: 2; text-align: right; }
  .finance-table td:nth-child(5) { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #24242a; text-align: right; }
  .finance-table td:nth-child(2)::before { content: "Client"; }
  .finance-table td:nth-child(3)::before { content: "Méthode"; }
  .finance-table td:nth-child(4)::before { content: "Date"; }
  .finance-table td:nth-child(5)::before { content: "Montant"; text-align: left; }

  .data-table tbody tr:has(.empty-state) { display: block; }
  .data-table tbody tr:has(.empty-state) td { display: block; }
  .pagination { min-height: 52px; padding-inline: 4px; }
  .pages button { width: 40px; height: 40px; }

  .finance-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
  .finance-stat-main { grid-column: 1 / -1; }
  .finance-stat { min-height: 92px; }
  .finance-stat:nth-child(3) { border-right: 0; }
  .finance-stat:nth-child(4) { grid-column: 1 / -1; border-top: 1px solid #232328; }
  .finance-stat-main .finance-stat-content { align-items: flex-start; flex-direction: column; gap: 14px; }
  .finance-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .finance-actions .btn { min-height: 44px; }

  .pricing-groups,
  .pricing-groups.single,
  .settings-page .pricing-groups,
  .settings-page .pricing-groups.single { grid-template-columns: 1fr; gap: 12px; padding: 0 10px 10px; }
  .settings-page .pricing-tier-head,
  .settings-page .pricing-services { width: 100%; }
  .settings-page .pricing-service { grid-template-columns: minmax(0,1fr) 88px 36px; }
  .settings-page .pricing-delete { width: 36px; height: 36px; opacity: .65; }

  .modal-backdrop {
    place-items: end center;
    padding: 0;
    background: rgba(0,0,0,.86);
  }
  .modal,
  .modal-scan,
  .modal-finance,
  .modal-notification,
  .modal-scan-detail {
    width: 100%;
    max-height: 100dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }
  .modal-head { min-height: 64px; padding-inline: 16px; }
  .modal-head h2 { font-size: 16px; }
  .modal-close { width: 40px; height: 40px; }
  .detail-layout,
  .scan-detail-layout,
  .modal-scan .scan-detail-layout,
  .modal-scan-detail .scan-view-layout,
  .modal-finance .finance-detail-layout,
  .modal-notification .notification-layout { grid-template-columns: 1fr; }
  .detail-pane,
  .modal-scan .detail-pane,
  .modal-finance .detail-pane,
  .modal-notification .detail-pane,
  .modal-scan-detail .detail-pane { padding: 16px; }
  .field,
  .modal-scan .field,
  .modal-finance .field {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 11px 0;
  }
  .field label,
  .modal-scan .field label,
  .modal-finance .field label { font-size: 12px; }
  .field input, .field select, .field textarea,
  .modal-scan .editable-field > input,
  .modal-scan .editable-field > select,
  .modal-scan .carrier-select-trigger,
  .modal-finance .editable-field > input,
  .modal-finance .editable-field > select,
  .modal-finance .finance-amount-control input,
  .modal-finance .readonly-value { min-height: 44px; font-size: 14px; }
  .summary-row { min-height: 48px; font-size: 12px; }
  .summary-row strong { font-size: 13px; }
  .modal-foot {
    min-height: 66px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }
  .modal-foot .btn { min-height: 44px; }
  .modal-foot .btn-primary { min-width: 136px; }
  .modal-scan-detail .scan-view-actions .btn { width: 100%; }

  .qr-workspace { grid-template-columns: 1fr; }
  .qr-reader-panel, .qr-result-panel { min-height: 320px; }
  .qr-lock-card { padding: 18px; }
}

@media (max-width: 390px) {
  .content { padding-inline: 12px; }
  .page-header h1 { font-size: 28px; }
  .header-actions { gap: 7px; }
  .header-actions .btn { padding-inline: 9px; font-size: 13px; }
  .scan-summary-item { padding-inline: 8px; }
  .scan-summary-item span { font-size: 11px; }
  .data-table tbody tr { padding: 12px; }
}

/* Création client volontairement limitée aux données indispensables. */
.modal.modal-client-create { width: min(760px,100%); }
.modal-client-create .client-create-layout {
  grid-template-columns: minmax(0,1.08fr) minmax(250px,.92fr);
}
.modal-client-create .client-create-summary { background: #0d0d0f; }
.modal-client-create .client-create-note {
  margin: 14px 0 0;
  color: #888891;
  font-size: 12px;
  line-height: 1.55;
}

/* Notes internes rattachées à chaque dossier. */
.modal-scan .scan-notes-field {
  min-height: 112px;
  align-items: start;
  padding-block: 12px;
}
.modal-scan .scan-notes-field label { padding-top: 11px; }
.modal-scan .scan-notes-field textarea {
  min-height: 86px;
  padding: 11px 12px;
  border: 1px solid #34343d;
  border-radius: 6px;
  background: #111116;
  line-height: 1.5;
  resize: vertical;
}
.modal-scan .scan-notes-field textarea:hover { border-color: #44444e; }
.modal-scan .scan-notes-field textarea:focus {
  border-color: #765fd8;
  background: #121118;
  box-shadow: 0 0 0 3px rgba(124,92,255,.09);
}
.scan-view-notes {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid #292930;
  border-radius: 7px;
  background: #111115;
}
.scan-view-notes > span {
  color: #83838c;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .065em;
}
.scan-view-notes p {
  margin: 8px 0 0;
  color: #d5d5d9;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.scan-view-notes p:only-child { color: #85858d; }

@media (max-width: 700px) {
  .modal-client-create .client-create-layout { grid-template-columns: 1fr; }
  .modal-client-create .client-create-summary {
    border-top: 1px solid var(--border);
    border-left: 0;
  }
  .modal-scan .scan-notes-field { min-height: 0; padding-block: 11px; }
  .modal-scan .scan-notes-field label { padding-top: 0; }
  .modal-scan .scan-notes-field textarea { min-height: 104px; }
}

/* Workflow métier réservé aux scans Insider. */
.status-insider-todo {
  color: #f2c766;
  border-color: rgba(242,199,102,.3);
  background: rgba(242,199,102,.09);
}
.status-insider-transmitted {
  color: #b6a7ff;
  border-color: rgba(157,138,255,.34);
  background: rgba(124,92,255,.12);
}
.status-insider-done {
  color: #62d9ad;
  border-color: rgba(52,211,153,.3);
  background: rgba(52,211,153,.1);
}
.insider-summary { grid-template-columns: repeat(5,minmax(0,1fr)); }
.scan-summary-item.summary-to_process.active::after { background: #e6b94f; }
.scan-summary-item.summary-transmitted.active::after { background: #8d78ff; }
.scan-summary-item.summary-to_process.active strong { color: #f2c766; }
.scan-summary-item.summary-transmitted.active strong { color: #b6a7ff; }
.insider-toolbar .insider-filter-to_process.active { color: #f2c766; }
.insider-toolbar .insider-filter-to_process.active::after { background: #e6b94f; }
.insider-toolbar .insider-filter-transmitted.active { color: #b6a7ff; }
.insider-toolbar .insider-filter-transmitted.active::after { background: #8d78ff; }
.insider-toolbar .insider-filter-done.active { color: #62d9ad; }
.insider-toolbar .insider-filter-done.active::after { background: #34d399; }
.insider-table th:nth-child(1) { width: 15%; }
.insider-table th:nth-child(2) { width: 14%; }
.insider-table th:nth-child(3) { width: 20%; }
.insider-table th:nth-child(4) { width: 9%; }
.insider-table th:nth-child(5) { width: 10%; }
.insider-table th:nth-child(6) { width: 12%; }
.insider-table th:nth-child(7) { width: 15%; }
.insider-table th:nth-child(8) { width: 5%; }
.insider-workflow-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.insider-next-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #34323f;
  border-radius: 6px;
  color: #bbb3e5;
  background: #131219;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.insider-next-action svg { width: 12px; height: 12px; }
.insider-next-action:hover {
  border-color: #574b79;
  color: #eeeaff;
  background: #191620;
}

@media (max-width: 900px) {
  .insider-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .insider-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .insider-summary .scan-summary-item:nth-child(odd) { border-right: 1px solid #232328; }
  .insider-summary .scan-summary-item:nth-child(2n) { border-right: 0; }
  .insider-summary .scan-summary-item:nth-child(-n+4) { border-bottom: 1px solid #232328; }
  .insider-summary .scan-summary-item:nth-child(n+5) { border-bottom: 0; }
  .insider-workflow-cell { align-items: flex-end; flex-direction: column; gap: 7px; }
  .insider-next-action { min-height: 36px; }
}

/* Montant automatique avec possibilité de surcharge manuelle par scan. */
.modal-scan .scan-price-field { min-height: 74px; }
.scan-price-wrap {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 6px 9px;
}
.scan-price-control { position: relative; min-width: 0; }
.modal-scan .scan-price-control input {
  width: 100%;
  min-height: var(--modal-control-height);
  padding: 0 54px 0 12px;
  border: 1px solid #3a3a44;
  border-radius: 6px;
  outline: 0;
  color: #f0f0f2;
  background: #131318;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
}
.modal-scan .scan-price-control input:hover { border-color: #4c4c57; background: #16161c; }
.modal-scan .scan-price-control input:focus {
  border-color: #7864df;
  background: #17151e;
  box-shadow: 0 0 0 3px rgba(124,92,255,.1);
}
.scan-price-control > span {
  position: absolute;
  inset: 0 11px 0 auto;
  display: flex;
  align-items: center;
  padding-left: 9px;
  border-left: 1px solid #35353d;
  color: #92929b;
  font-size: 10px;
  font-weight: 600;
}
.scan-price-reset {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #3c374e;
  border-radius: 6px;
  color: #bdb3e8;
  background: #15131c;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}
.scan-price-reset:hover { border-color: #5c4d83; color: #f0ecff; background: #1a1721; }
.scan-price-wrap > small {
  grid-column: 1 / -1;
  color: #7f7f88;
  font-size: 10px;
  line-height: 1.35;
}
.scan-price-field.is-manual .scan-price-control input { border-color: #66569a; background: #17151e; }
.scan-price-field.is-manual .scan-price-wrap > small::after {
  content: " · prix personnalisé actif";
  color: #a99de1;
}

@media (max-width: 700px) {
  .modal-scan .scan-price-field { min-height: 0; }
  .scan-price-wrap { grid-template-columns: 1fr; }
  .scan-price-reset { min-height: 40px; justify-self: start; }
}

/* Répartition compacte de la liste des scans sur les écrans larges. */
@media (min-width: 701px) {
  .scans-table { min-width: 1100px; table-layout: fixed; }
  .scans-table th:nth-child(1) { width: 16%; }
  .scans-table th:nth-child(2) { width: 13%; }
  .scans-table th:nth-child(3) { width: 14%; }
  .scans-table th:nth-child(4) { width: 11%; }
  .scans-table th:nth-child(5) { width: 11%; }
  .scans-table th:nth-child(6) { width: 9%; }
  .scans-table th:nth-child(7) { width: 9%; }
  .scans-table th:nth-child(8) { width: 9%; }
  .scans-table th:nth-child(9) { width: 8%; }
}

/* Sélecteur client compact avec recherche instantanée. */
.client-picker-field { position: relative; min-width: 0; }
.client-picker-field.open { z-index: 80; }
.client-picker-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid #34343d;
  border-radius: 7px;
  color: #e8e8ec;
  background: #121217;
  text-align: left;
  cursor: pointer;
}
.client-picker-trigger:hover { border-color: #4b4b58; background: #15151b; }
.client-picker-field.open .client-picker-trigger { border-color: #7563d6; box-shadow: 0 0 0 3px rgba(124,92,255,.1); }
.client-picker-trigger > svg { width: 13px; height: 13px; margin-left: auto; flex: none; transform: rotate(90deg); color: #787883; transition: transform .14s ease; }
.client-picker-field.open .client-picker-trigger > svg { transform: rotate(-90deg); }
.client-picker-avatar { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border: 1px solid #3b3850; border-radius: 7px; color: #c9c0f4; background: #1b1825; font-size: 10px; font-weight: 700; }
.client-picker-current { min-width: 0; display: grid; gap: 2px; }
.client-picker-current strong, .client-picker-current small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-picker-current strong { color: #ededf1; font-size: 12px; font-weight: 600; }
.client-picker-current small { color: #85858f; font-size: 10px; }
.client-picker-placeholder { color: #9999a3; font-size: 12px; }
.client-picker-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, calc(100vw - 40px));
  padding: 8px;
  border: 1px solid #303039;
  border-radius: 10px;
  background: #0c0c10;
  box-shadow: 0 20px 48px rgba(0,0,0,.56), 0 1px 0 rgba(255,255,255,.02) inset;
}
.client-picker-search { height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #34343e; border-radius: 7px; background: #18181e; }
.client-picker-search:focus-within { border-color: #6656be; box-shadow: 0 0 0 2px rgba(124,92,255,.09); }
.client-picker-search svg { width: 13px; height: 13px; flex: none; color: #777783; }
.field .client-picker-search input { width: 100%; min-width: 0; min-height: 0; height: 100%; flex: 1; padding: 0; overflow: hidden; border: 0; border-radius: 0; outline: 0; appearance: none; color: #eeeef1; background: transparent; box-shadow: none; font-size: 11px; font-weight: 400; text-overflow: ellipsis; }
.field .client-picker-search input:hover,
.field .client-picker-search input:focus,
.field .client-picker-search input:focus-visible { border: 0; outline: 0; background: transparent; box-shadow: none; }
.client-picker-search input::-webkit-search-cancel-button { display: none; appearance: none; }
.client-picker-search input::placeholder { color: #6f6f79; }
.client-picker-results { max-height: 336px; display: grid; gap: 3px; margin-top: 10px; padding: 4px; overflow-y: auto; border: 1px solid #25252d; border-radius: 8px; background: #111116; }
.client-picker-option { width: 100%; min-height: 50px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 11px; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; color: #d8d8dd; background: #131318; text-align: left; cursor: pointer; transition: border-color .12s ease, background-color .12s ease, transform .12s ease; }
.client-picker-option:hover, .client-picker-option:focus-visible { outline: 0; border-color: #353440; background: #1b1a22; }
.client-picker-option:active { transform: translateY(1px); }
.client-picker-option[aria-selected="true"] { border-color: rgba(124,92,255,.22); background: rgba(124,92,255,.1); }
.client-picker-option[aria-selected="true"]:hover,
.client-picker-option[aria-selected="true"]:focus-visible { border-color: rgba(142,119,255,.38); background: rgba(124,92,255,.15); }
.client-picker-option .client-picker-avatar { width: 30px; height: 30px; border-color: #403b55; border-radius: 7px; background: #1d1928; }
.client-picker-option > span:last-child { min-width: 0; display: grid; align-content: center; gap: 4px; }
.client-picker-option strong, .client-picker-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-picker-option strong { color: #ededf1; font-size: 11px; font-weight: 600; line-height: 1.2; }
.client-picker-option strong em { margin-left: 5px; color: #aaa1d2; font-size: 10px; font-style: normal; font-weight: 500; }
.client-picker-option small { color: #85858f; font-size: 10px; line-height: 1.2; }
.client-picker-option mark { padding: 0; color: #d8ccff; background: rgba(124,92,255,.26); border-radius: 2px; }
.client-picker-empty { padding: 18px 10px; color: #777781; font-size: 11px; text-align: center; }
.scan-filter-grid .client-picker-field > label { display: block; }

/* Dans les modales, le menu suit la colonne du contrôle au lieu de recouvrir le libellé. */
@media (min-width: 701px) {
  .modal .client-picker-menu { left: 128px; width: calc(100% - 128px); }
  .modal-scan .client-picker-menu { left: 148px; width: calc(100% - 148px); }
}

@media (max-width: 700px) {
  .client-picker-menu { position: fixed; inset: auto 12px 76px; width: auto; max-height: min(430px,70vh); }
  .client-picker-results { max-height: min(350px,58vh); }
  .modal-scan .scan-action-pane .detail-pane-head {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    align-items: start;
    gap: 6px;
  }
  .modal-scan .scan-action-pane .detail-pane-note {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #777780;
    font-size: 10px;
    line-height: 1.35;
    text-align: left;
  }
}
