:root {
  --bg: #f4f8fd;
  --bg-soft: #f9fbfe;
  --surface: #ffffff;
  --surface-soft: #fcfdff;
  --surface-tint: #f6faff;
  --border: #e6edf5;
  --border-strong: #d9e4ef;
  --text: #192637;
  --text-soft: #4c5f73;
  --muted: #8090a2;
  --accent: #2190e4;
  --accent-soft: #eaf5ff;
  --accent-strong: #0f77cd;
  --success: #57b56e;
  --success-soft: #edf9f0;
  --warning: #f0a44f;
  --warning-soft: #fff4e7;
  --danger: #ef6a6a;
  --danger-soft: #fff1f1;
  --neutral-soft: #f1f5f9;
  --shadow-soft: 0 12px 28px rgba(25, 38, 55, 0.05);
  --shadow-strong: 0 24px 54px rgba(25, 38, 55, 0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --sticky-company-width: 214px;
  --sticky-contact-width: 214px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(33, 144, 228, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body[data-auth-state="locked"] {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 182px minmax(0, 1fr);
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.login-card {
  width: min(100%, 420px);
  padding: 26px 24px 24px;
  border: 1px solid rgba(210, 225, 239, 0.92);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(33, 144, 228, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  box-shadow:
    0 28px 58px rgba(25, 38, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.login-logo {
  width: 82px;
  height: 82px;
  display: block;
  margin-bottom: 14px;
  object-fit: contain;
}

.login-title {
  margin: 0;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.login-text {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.login-field {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-weight: 600;
}

.login-field input {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-field input:focus {
  outline: 2px solid rgba(33, 144, 228, 0.18);
  outline-offset: 1px;
  border-color: #9ccff7;
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(239, 106, 106, 0.24);
  border-radius: 13px;
  background: rgba(255, 241, 241, 0.92);
  color: #b14545;
}

.login-submit {
  min-height: 46px;
  border: 1px solid rgba(16, 126, 210, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(33, 144, 228, 0.22);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-link {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
}

.login-link:hover,
.login-link:focus-visible {
  text-decoration: underline;
}

.local-preview-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(13, 143, 114, 0.24);
  border-radius: 13px;
  background: rgba(237, 249, 240, 0.94);
  color: #0b7d5f;
  font-weight: 700;
  text-decoration: none;
}

.local-preview-link:hover,
.local-preview-link:focus-visible {
  border-color: rgba(13, 143, 114, 0.38);
  background: #e4f7eb;
  outline: none;
}

.view-debug-badge {
  display: inline-flex;
  max-width: min(100%, 520px);
  align-items: center;
  padding: 3px 7px;
  border: 1px solid rgba(76, 95, 115, 0.22);
  border-radius: 7px;
  background: rgba(246, 250, 255, 0.96);
  color: #4c5f73;
  font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.login-hint,
.login-success {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}

.login-success {
  padding: 12px 14px;
  border: 1px solid rgba(73, 183, 120, 0.24);
  border-radius: 13px;
  background: rgba(239, 252, 243, 0.92);
  color: #24774a;
}

.app-shell[data-sidebar-collapsed="true"] {
  grid-template-columns: 82px minmax(0, 1fr);
}

.sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px 12px 14px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(217, 228, 239, 0.85);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 6px;
}

.mobile-nav-toggle {
  display: none;
  margin-left: auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-soft);
  font-weight: 600;
}

.brand-icon {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(33, 144, 228, 0.18);
}

.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-name {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.brand-subtitle {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
  align-content: start;
}

.nav-link,
.toolbar-button,
.action-button,
.mode-button,
.footer-link,
.chip-filter,
.chip-link,
.table-row {
  cursor: pointer;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 11px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.app-shell[data-sidebar-collapsed="true"] .brand-subtitle,
.app-shell[data-sidebar-collapsed="true"] .brand-name,
.app-shell[data-sidebar-collapsed="true"] .nav-link span:last-child {
  display: none;
}

.app-shell[data-sidebar-collapsed="true"] .brand-lockup {
  justify-content: center;
}

.app-shell[data-sidebar-collapsed="true"] .sidebar-footer {
  flex-direction: column;
}

.nav-link.is-profile-hidden {
  display: none !important;
}

.nav-icon {
  width: 16px;
  text-align: center;
  font-size: 12px;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.footer-link {
  padding: 7px 9px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.footer-link:hover {
  background: rgba(233, 242, 250, 0.75);
  color: var(--text-soft);
}

.footer-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.workspace {
  padding: 18px 18px 22px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.topbar-title {
  min-width: 0;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 6px;
  padding-top: 4px;
}

.topbar-title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.topbar-title p {
  margin: 0;
  color: var(--muted);
  max-width: 18ch;
  line-height: 1.32;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  align-content: flex-start;
}

.topbar-actions > * {
  max-width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 308px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.toolbar-button,
.action-button,
.scope-pill,
.mode-switch {
  min-height: 38px;
  border-radius: 11px;
}

.toolbar-button {
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-soft);
}

.toolbar-button:hover {
  border-color: #c8d8ea;
  background: #fff;
}

.scope-pill {
  display: grid;
  align-content: center;
  min-width: 122px;
  padding: 0 14px;
  background: linear-gradient(135deg, #1491e8, #2a9fe9 58%, #58b6f2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 30px rgba(33, 144, 228, 0.24);
}

.scope-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.84;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(196, 213, 232, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.96));
  box-shadow: 0 14px 28px rgba(104, 139, 177, 0.1);
}

.mode-button {
  min-height: 30px;
  padding: 0 14px;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.mode-button:disabled {
  cursor: default;
  opacity: 0.52;
}

.mode-button.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(22, 145, 232, 0.12);
}

.collaborator-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px 0 10px;
  border-left: 1px solid rgba(205, 217, 232, 0.92);
}

.collaborator-picker-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collaborator-select {
  min-width: 150px;
  max-width: 100%;
  min-height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(209, 220, 233, 0.96);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 253, 0.98));
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.collaborator-select:invalid,
.collaborator-select option[value=""] {
  color: var(--muted);
}

.collaborator-select:hover {
  border-color: rgba(166, 192, 219, 0.98);
}

.collaborator-select:disabled {
  cursor: wait;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(249, 251, 253, 0.98), rgba(242, 246, 250, 0.98));
  border-color: rgba(220, 228, 237, 0.96);
  box-shadow: none;
  opacity: 1;
}

.workspace[data-profile-type="collaborateur"] .scope-pill {
  background: linear-gradient(135deg, #0d8f72, #18a981 58%, #31c598);
  box-shadow: 0 16px 30px rgba(17, 153, 118, 0.24);
}

.workspace[data-profile-type="collaborateur"] .mode-switch {
  border-color: rgba(170, 214, 199, 0.96);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 252, 248, 0.98));
  box-shadow: 0 14px 28px rgba(66, 140, 113, 0.12);
}

.workspace[data-profile-type="collaborateur"] .mode-button.is-active {
  background: rgba(19, 166, 122, 0.14);
  color: #0b7d5f;
  box-shadow: inset 0 0 0 1px rgba(19, 166, 122, 0.14);
}

.workspace[data-profile-type="collaborateur"] .collaborator-picker {
  border-left-color: rgba(184, 221, 209, 0.96);
}

.workspace[data-profile-type="collaborateur"] .collaborator-select {
  border-color: rgba(180, 220, 207, 0.96);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 251, 246, 0.99));
  color: #0b7d5f;
}

.workspace[data-profile-type="collaborateur"] #queue-scope-label {
  background: rgba(19, 166, 122, 0.14);
  color: #0b7d5f;
  border: 1px solid rgba(19, 166, 122, 0.12);
}

.chip-filter.is-locked {
  opacity: 1;
  cursor: default;
}

.filters-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filters-panel[hidden] {
  display: none;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-group-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chip-filter,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-soft);
}

.pill-action {
  cursor: pointer;
}

.pill-action.is-active {
  border-color: rgba(33, 144, 228, 0.18);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chip-filter.is-active {
  border-color: rgba(33, 144, 228, 0.18);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stats-grid[hidden] {
  display: none !important;
}

.workspace[data-active-view="cockpit"] .stats-grid {
  margin-top: 10px;
  margin-bottom: 2px;
}

.data-source-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
  box-shadow: var(--shadow-soft);
}

.data-source-banner[hidden] {
  display: none !important;
}

.data-source-banner strong {
  color: var(--text);
}

.data-source-banner.is-live {
  border-color: rgba(87, 181, 110, 0.34);
  background: rgba(237, 249, 240, 0.92);
}

.data-source-banner.is-fallback {
  border-color: rgba(240, 164, 79, 0.34);
  background: rgba(255, 244, 231, 0.94);
}

.data-source-banner.is-mock {
  border-color: rgba(33, 144, 228, 0.28);
  background: rgba(234, 245, 255, 0.92);
}

.data-source-banner.is-error {
  border-color: rgba(239, 106, 106, 0.34);
  background: rgba(255, 241, 241, 0.94);
}

.data-source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.view-freshness {
  display: inline-block;
  width: auto;
  max-width: none;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #2f7d4f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  word-break: keep-all;
  overflow: visible;
  text-overflow: clip;
  box-shadow: none;
}

.view-freshness.is-live {
  color: #2f7d4f;
}

.view-freshness.is-warning {
  color: #b36a1f;
  border-color: rgba(239, 189, 128, 0.92);
  background: rgba(255, 246, 235, 0.98);
}

.view-freshness.is-mock {
  color: var(--muted);
  border-color: rgba(212, 221, 232, 0.92);
  background: rgba(248, 250, 253, 0.96);
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(217, 228, 239, 0.9);
  color: var(--text-soft);
  font-size: 11px;
}

.stat-card,
.section-table,
.detail-panel,
.surface-panel,
.side-summary,
.portfolio-card,
.journal-drawer {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: hidden;
  padding: 20px 22px 18px;
  min-height: 156px;
  width: 100%;
  text-align: left;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(58, 132, 244, 0.07), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
  border: 1px solid #d7e4f2;
  box-shadow:
    0 18px 34px rgba(129, 168, 214, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(58, 132, 244, 0.52), rgba(58, 132, 244, 0.08));
}

.stat-card.is-clickable:hover {
  border-color: #bed6ee;
  box-shadow:
    0 26px 54px rgba(114, 158, 209, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: translateY(-2px);
}

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

.stat-title {
  margin: 0;
  max-width: 20ch;
  font-size: 16px;
  line-height: 1.22;
  letter-spacing: -0.03em;
  font-weight: 680;
  color: #102746;
}

.stat-value {
  margin: 4px 0 0;
  font-size: 52px;
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 750;
  color: #081321;
}

.stat-meta,
.muted-line,
.mini-note {
  color: var(--muted);
}

.stat-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  line-height: 1.3;
}

.stat-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e7eef7;
  color: var(--text-soft);
}

.mini-note {
  font-size: 12px;
}

.workspace[data-active-view="cockpit"] .stat-card {
  min-height: 132px;
  padding: 15px 18px 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(58, 132, 244, 0.05), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
  border-color: #d4e0ee;
  box-shadow:
    0 14px 24px rgba(129, 168, 214, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.workspace[data-active-view="cockpit"] .stat-title {
  font-size: 14px;
  max-width: 18ch;
}

.workspace[data-active-view="cockpit"] .stat-value {
  font-size: 40px;
}

.workspace[data-active-view="cockpit"] .stat-meta {
  font-size: 12px;
}

.workspace[data-active-view="cockpit"] .stat-foot {
  margin-top: 10px;
  padding-top: 10px;
}

.workspace[data-active-view="cockpit"] .mini-note {
  font-size: 11px;
}

.delta-up {
  color: var(--success);
  font-weight: 600;
}

.delta-down {
  color: var(--danger);
  font-weight: 600;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: fade-in 170ms ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-dashboard,
.stacked-view {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.home-dashboard {
  grid-template-columns: 1.22fr 1.22fr 0.92fr;
  align-items: start;
}

.dashboard-column {
  display: grid;
  gap: 10px;
}

.surface-panel,
.detail-panel,
.side-summary,
.section-table,
.portfolio-card {
  padding: 14px 16px;
}

.surface-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

.surface-kicker {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.surface-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.scope-badge,
.section-count,
.status-badge,
.tiny-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 700;
}

.scope-badge {
  min-height: 26px;
  padding: 0 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
}

.dashboard-mosaic {
  display: grid;
  gap: 10px;
}

.dashboard-tile,
.metric-tile,
.detail-card,
.kanban-card {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
}

.dashboard-tile {
  padding: 14px 14px 10px;
}

.dashboard-tile.executive {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.metric-list,
.bullet-list,
.timeline-list,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.metric-head {
  display: grid;
  gap: 12px;
  align-items: center;
  min-height: 26px;
  padding: 3px 0 8px;
  margin-top: 2px;
  border-bottom: 1px solid #eef3f8;
  color: #7f93a8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-head-2 {
  grid-template-columns: minmax(0, 1fr) auto;
}

.metric-head-3 {
  grid-template-columns: minmax(0, 1.2fr) 72px 92px;
}

.metric-head span:last-child {
  text-align: right;
}

.metric-head-3 span:nth-child(2),
.metric-list-3 li > span:nth-child(2) {
  text-align: right;
}

.dashboard-tile[data-dashboard-tile="A contacter aujourd'hui"] .metric-head-3,
.dashboard-tile[data-dashboard-tile="A contacter aujourd'hui"] .metric-list-3 li {
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.95fr) 132px;
}

.dashboard-tile[data-dashboard-tile="A contacter aujourd'hui"] .metric-head-3 span:nth-child(2),
.dashboard-tile[data-dashboard-tile="A contacter aujourd'hui"] .metric-list-3 li > span:nth-child(2) {
  text-align: left;
}

.dashboard-tile[data-dashboard-tile="A reprendre cette semaine"] .metric-head-2,
.dashboard-tile[data-dashboard-tile="A reprendre cette semaine"] .metric-list-2 li {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1.45fr);
}

.dashboard-tile[data-dashboard-tile="A reprendre cette semaine"] .metric-head-2 span:last-child,
.dashboard-tile[data-dashboard-tile="A reprendre cette semaine"] .metric-list-2 li > strong {
  text-align: left;
}

.dashboard-tile[data-dashboard-tile="Rendez-vous à préparer"] .metric-head-2,
.dashboard-tile[data-dashboard-tile="Rendez-vous à préparer"] .metric-list-2 li {
  grid-template-columns: minmax(0, 1fr) 188px;
}

.metric-list-2 li,
.metric-list-3 li {
  display: grid;
  align-items: center;
  justify-content: stretch;
}

.metric-list-2 li {
  grid-template-columns: minmax(0, 1fr) auto;
}

.metric-list-3 li {
  grid-template-columns: minmax(0, 1.2fr) 72px 92px;
}

.metric-list-2 li > strong,
.metric-list-3 li > strong,
.metric-list-2 li > span:last-child,
.metric-list-3 li > span:last-child {
  text-align: right;
}

.metric-list li,
.bullet-list li,
.timeline-list li,
.plain-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #eef3f8;
}

.metric-list li:first-child,
.bullet-list li:first-child,
.timeline-list li:first-child,
.plain-list li:first-child {
  border-top: 0;
}

.text-link,
.chip-link {
  background: transparent;
  color: var(--accent-strong);
  padding: 0;
  text-align: left;
}

.text-link {
  font-size: 12px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-kpi {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
}

.mini-kpi strong {
  display: block;
  margin-bottom: 5px;
  font-size: 24px;
  line-height: 1;
}

.cockpit-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.92fr) 310px;
  gap: 12px;
  margin-top: 14px;
}

.cockpit-layout > *,
.detail-layout > * {
  min-width: 0;
}

.cockpit-layout {
  align-items: start;
}

.action-board {
  display: flex;
  flex-direction: column;
  align-self: start;
  min-width: 0;
  gap: 10px;
}

.queue-sections {
  display: grid;
  align-content: start;
  gap: 10px;
}

.queue-section {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 18px;
}

.queue-section.is-focused {
  border-color: rgba(33, 144, 228, 0.34);
  box-shadow:
    0 0 0 2px rgba(33, 144, 228, 0.08),
    var(--shadow-strong);
}

.queue-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #edf2f7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.section-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pager-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-soft);
  font-size: 12px;
}

.pager-button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: #f6fbff;
}

.pager-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.queue-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
}

.table-head,
.table-row {
  display: grid;
  align-items: center;
  gap: 10px;
}

.table-head > span,
.table-row > span {
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.table-sort-button {
  width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.table-sort-button:hover {
  color: var(--text-soft);
}

.table-sort-button.is-active {
  color: var(--accent-strong);
}

.table-sort-indicator {
  font-size: 11px;
  line-height: 1;
  opacity: 0.8;
}

.queue-table .table-head,
.queue-table .table-row {
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(0, 1.02fr)
    minmax(0, 1.42fr)
    minmax(0, 1.3fr)
    minmax(78px, 0.62fr)
    minmax(88px, 0.78fr)
    minmax(118px, 0.9fr)
    20px;
  padding: 0 12px 0 14px;
}

.queue-table-shell {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.queue-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.queue-table-shell.is-florent-wide::before,
.queue-table-shell.is-florent-wide::after {
  display: none;
}

.queue-scroll-button {
  position: absolute;
  top: 12px;
  z-index: 8;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-soft);
  box-shadow: var(--shadow-soft);
}

.queue-scroll-button.is-left {
  left: 8px;
}

.queue-scroll-button.is-right {
  right: 8px;
}

.queue-table-shell.is-at-start .queue-scroll-button.is-left,
.queue-table-shell.is-at-end .queue-scroll-button.is-right {
  opacity: 0.38;
}

.queue-table-standard .table-head,
.queue-table-standard .table-row {
  grid-template-columns: var(--cockpit-columns);
  min-width: max-content;
  position: relative;
  isolation: isolate;
}

.queue-table-standard {
  display: grid;
  grid-template-columns: var(--cockpit-columns);
  width: max-content;
}

.queue-table-standard .table-head,
.queue-table-standard .table-row {
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  width: auto;
}

.queue-table-phoning .table-head,
.queue-table-phoning .table-row {
  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(0, 0.98fr)
    minmax(150px, 0.9fr)
    minmax(128px, 0.78fr)
    minmax(230px, 1.5fr)
    minmax(88px, 0.58fr)
    minmax(116px, 0.76fr)
    20px;
}

.queue-table-phoning .table-head > span:nth-child(5),
.queue-table-phoning .table-row > span:nth-child(5) {
  align-items: stretch;
  justify-content: stretch;
}

.queue-table .table-head > span:first-child {
  padding-left: 28px;
}

.queue-table-standard .table-head > span:first-child {
  padding-left: 0;
}

.table-head-cell.has-leading-offset {
  padding-left: 28px;
}

.queue-table .table-head > span:last-child,
.queue-table .table-row > span:last-child {
  justify-content: center;
}

.queue-table-phoning .table-head > span:nth-child(7),
.queue-table-phoning .table-row > span:nth-child(7) {
  justify-content: flex-start;
}

.table-head {
  min-height: 31px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--surface);
}

.table-row {
  min-height: 54px;
  border-top: 1px solid #eef3f8;
  background: transparent;
}

.table-row:hover {
  background: rgba(240, 246, 253, 0.7);
}

.queue-table-standard .table-head > span:nth-child(1),
.queue-table-standard .table-row > span:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 20;
  min-width: var(--sticky-contact-width);
  background: var(--surface);
  clip-path: inset(0);
  contain: paint;
  transform: translateZ(0);
  box-shadow: 1px 0 0 rgba(223, 232, 241, 0.92);
}

.queue-table-standard .table-head > span:nth-child(2),
.queue-table-standard .table-row > span:nth-child(2) {
  position: sticky;
  left: var(--sticky-contact-width);
  z-index: 20;
  min-width: var(--sticky-company-width);
  background: var(--surface);
  clip-path: inset(0);
  contain: paint;
  transform: translateZ(0);
  box-shadow: 1px 0 0 rgba(223, 232, 241, 0.92);
}

.queue-table-standard .table-head > span:nth-child(1),
.queue-table-standard .table-head > span:nth-child(2) {
  z-index: 21;
}

.queue-table-standard .table-row:hover > span:nth-child(1),
.queue-table-standard .table-row:hover > span:nth-child(2) {
  background: #f0f6fd;
}

.queue-table-standard .table-row.is-selected > span:nth-child(1),
.queue-table-standard .table-row.is-selected > span:nth-child(2) {
  background: #edf5ff;
}

.queue-table-standard .table-head > span:nth-child(n + 3),
.queue-table-standard .table-row > span:nth-child(n + 3) {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.table-row button {
  text-align: left;
}

.queue-row {
  width: 100%;
  color: var(--text);
}

.queue-row > span {
  min-height: 54px;
  align-items: center;
}

.queue-row-phoning > span {
  min-height: 62px;
}

.cockpit-mode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.cockpit-mode-toolbar-block {
  display: grid;
  gap: 10px;
}

.cockpit-mode-switch {
  flex-shrink: 0;
}

.cockpit-mode-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-outline {
  background: #f7fbff;
  border-color: #d6e6f5;
  color: var(--text-soft);
}

.cockpit-columns-shell,
.company-columns-shell {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.cockpit-columns-head,
.company-columns-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cockpit-columns-toggle,
.company-columns-toggle {
  min-height: 34px;
  padding: 0 12px;
}

.cockpit-columns-panel,
.company-columns-panel {
  display: grid;
  gap: 8px;
}

.cockpit-columns-actions,
.company-columns-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cockpit-columns-group,
.company-columns-group {
  display: grid;
  gap: 8px;
}

.cockpit-columns-group-title,
.company-columns-group-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cockpit-column-row,
.company-column-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px;
  border: 1px solid rgba(223, 232, 241, 0.8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.cockpit-column-row.is-fixed,
.company-column-row.is-fixed {
  background: rgba(240, 246, 253, 0.85);
}

.cockpit-column-row.is-selected,
.company-column-row.is-selected {
  border-color: #c6def2;
}

.cockpit-column-chip,
.company-column-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f7fbff;
  color: var(--text-soft);
}

.cockpit-column-chip.is-selected,
.company-column-chip.is-selected {
  border-color: #b8d7f3;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(33, 144, 228, 0.08);
}

.cockpit-column-chip:hover,
.company-column-chip:hover {
  border-color: #c6dced;
  background: #ffffff;
}

.cockpit-column-handle,
.company-column-handle {
  color: var(--muted);
  letter-spacing: -0.12em;
}

.empty-state-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.cockpit-inline-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.cockpit-inline-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cockpit-inline-editor-grid,
.cockpit-action-editor-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cockpit-action-editor-form {
  grid-template-columns: minmax(220px, 1.3fr) minmax(220px, 1.3fr) 132px 140px 150px auto;
  align-items: center;
}

.pill-highlight {
  background: #e9f6ef;
  color: #1f8f6b;
}

.linked-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef7ff;
  color: #2a6aa4;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.hubspot-link-pill {
  cursor: pointer;
  border: 1px solid #d6e6f5;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.hubspot-link-pill:hover {
  background: #e4f1ff;
  box-shadow: 0 6px 14px rgba(42, 106, 164, 0.12);
  transform: translateY(-1px);
}

.phone-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  min-width: 128px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(233, 245, 255, 0.98) 100%);
  color: #134b7f;
  border: 1px solid rgba(82, 154, 216, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(34, 119, 188, 0.1);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.phone-cell {
  justify-content: flex-start;
}

.phone-pill-mark {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #1ea7ff 0%, #0c6fc4 100%);
  box-shadow: 0 5px 12px rgba(20, 116, 197, 0.24);
}

.phone-pill-mark::after {
  content: "\260E";
  color: #ffffff;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-16deg);
}

.phone-pill-number {
  line-height: 1;
  white-space: nowrap;
}

.phone-pill.is-missing {
  background: #f3f5f7;
  color: var(--muted);
  border-color: rgba(151, 164, 180, 0.18);
  box-shadow: none;
}

.phone-pill.is-missing .phone-pill-mark {
  background: linear-gradient(135deg, #c8d2dd 0%, #97a6b7 100%);
  box-shadow: none;
}

.touch-mini {
  display: grid;
  gap: 2px;
  align-content: center;
}

.touch-mini strong {
  color: var(--text);
  font-size: 13px;
}

.touch-mini span {
  color: var(--muted);
  font-size: 11px;
}

.queue-row.is-selected {
  background: linear-gradient(180deg, rgba(33, 144, 228, 0.08), rgba(33, 144, 228, 0.05));
  box-shadow: inset 0 0 0 1px rgba(33, 144, 228, 0.16);
}

.row-company {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.row-company span:last-child,
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.28;
  max-height: calc(1.28em * 2);
  white-space: normal;
  align-items: flex-start;
  padding: 6px 0;
}

.cell-clamp-muted {
  color: #516579;
}

.action-brief,
.reason-brief {
  align-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.action-brief-surface {
  position: relative;
  display: grid;
  gap: 2px;
  width: min(100%, 240px);
  min-width: 0;
  max-width: 100%;
  justify-self: start;
  padding: 6px 8px 6px 10px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 255, 0.96) 100%);
  border: 1px solid rgba(33, 144, 228, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 5px 14px rgba(148, 163, 184, 0.06);
  overflow: hidden;
}

.action-brief-surface::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3aa0ff 0%, #7bbdff 100%);
}

.action-brief-kicker {
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f86a1;
  font-weight: 700;
}

.action-brief-text,
.reason-brief-text {
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-height: 1.28;
}

.action-brief-text {
  color: #23384d;
  font-weight: 650;
  font-size: 11px;
  line-height: 1.25;
}

.queue-table-phoning .action-brief {
  align-items: stretch;
  justify-content: stretch;
  min-height: 44px;
}

.queue-table-phoning .action-brief-surface-phoning {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px 7px 12px;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%);
  border-color: rgba(108, 136, 166, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(58, 86, 118, 0.06);
}

.queue-table-phoning .action-brief-surface-phoning::before {
  top: 8px;
  bottom: 8px;
  background: linear-gradient(180deg, #203f64 0%, #4b8bc4 100%);
}

.queue-table-phoning .action-brief-surface-phoning .action-brief-text {
  -webkit-line-clamp: 1;
  color: #17283a;
  font-size: 11px;
  font-weight: 720;
}

.reason-brief {
  align-self: stretch;
}

.reason-brief-text {
  align-items: center;
  min-height: 22px;
  padding: 0 0 0 12px;
  border-left: 1px solid rgba(143, 162, 184, 0.22);
  color: #687b90;
  font-size: 12px;
  line-height: 1.35;
}

.avatar {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #eaf1f8;
  color: #41566d;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar.has-photo {
  background: #dbe7f3;
  color: transparent;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-large {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 16px;
}

.detail-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  min-height: 22px;
  padding: 0 9px;
  font-size: 10px;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tiny-badge {
  min-height: 20px;
  padding: 0 8px;
  font-size: 10px;
}

.status-a-traiter {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(33, 144, 228, 0.14);
}

.status-en-cours {
  background: var(--success-soft);
  color: #3c9152;
  border-color: rgba(60, 145, 82, 0.14);
}

.status-en-attente-retour {
  background: var(--warning-soft);
  color: #c5802c;
  border-color: rgba(197, 128, 44, 0.16);
}

.status-termine {
  background: var(--neutral-soft);
  color: #607082;
  border-color: rgba(96, 112, 130, 0.14);
}

.status-ignore {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(210, 77, 87, 0.16);
}

.priority-cell {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  gap: 7px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.priority-cell::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.priority-cell.high {
  color: #c83e3e;
}

.priority-cell.medium {
  color: #bf7a18;
}

.priority-cell.low {
  color: #356f53;
}

.detail-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.detail-panel-content {
  display: grid;
  gap: 10px;
}

.detail-card {
  padding: 12px;
}

.detail-card-phoning {
  border: 1px solid #d9e9fb;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
}

.detail-card h3,
.side-summary h3 {
  margin: 0 0 9px;
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.detail-field {
  display: grid;
  gap: 4px;
}

.detail-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-value {
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-value.is-muted {
  color: var(--muted);
}

.detail-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.detail-link:hover {
  text-decoration: underline;
}

.contact-insight-shell {
  display: grid;
  gap: 14px;
}

.contact-insight-hero {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e4edf7;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(44, 132, 255, 0.11), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 14px 30px rgba(126, 167, 216, 0.12);
}

.contact-insight-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.contact-insight-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(42, 125, 243, 0.08);
  color: #3668a6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.contact-insight-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 16px 16px 15px;
  border-radius: 18px;
  border: 1px solid rgba(212, 227, 244, 0.95);
}

.contact-insight-card.is-primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 246, 255, 0.98) 100%);
}

.contact-insight-card.is-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.contact-insight-summary {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #19385e;
}

.contact-insight-context {
  margin: 0;
  font-size: 14px;
  line-height: 1.68;
  color: #5d7492;
}

.contact-insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-insight-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: #edf5ff;
  color: #1f5fae;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.contact-insight-chip.is-link:hover {
  background: #e2efff;
}

.contact-insight-chip.is-muted {
  background: #f2f5f9;
  color: var(--muted);
}

@media (max-width: 960px) {
  .contact-insight-rail {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-insight-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-insight-card {
    min-height: auto;
  }
}

.contact-metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contact-metric-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e8eef5;
  background: #ffffff;
}

.contact-metric-card strong {
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}

.contact-journey {
  display: grid;
  gap: 10px;
}

.contact-journey-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  background: #fff;
}

.contact-journey-marker {
  position: relative;
  width: 14px;
}

.contact-journey-marker::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 1px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #b9c8d8;
  box-shadow: 0 0 0 4px rgba(185, 200, 216, 0.18);
}

.contact-journey-body {
  display: grid;
  gap: 6px;
}

.contact-journey-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.contact-journey-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

.contact-journey-value {
  font-size: 14px;
  color: var(--text);
}

.contact-journey-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.contact-journey-item.tone-email .contact-journey-marker::before {
  background: #2c84ff;
  box-shadow: 0 0 0 4px rgba(44, 132, 255, 0.16);
}

.contact-journey-item.tone-call .contact-journey-marker::before {
  background: #1eaf72;
  box-shadow: 0 0 0 4px rgba(30, 175, 114, 0.16);
}

.contact-journey-item.tone-meeting .contact-journey-marker::before {
  background: #f0a126;
  box-shadow: 0 0 0 4px rgba(240, 161, 38, 0.16);
}

.contact-journey-item.tone-next .contact-journey-marker::before {
  background: #7a5cff;
  box-shadow: 0 0 0 4px rgba(122, 92, 255, 0.16);
}

.contact-journey-item.is-missing {
  background: #fbfcfe;
}

.contact-journey-item.is-missing .contact-journey-value,
.contact-journey-item.is-missing .contact-journey-detail {
  color: var(--muted);
}

.company-insight-shell {
  display: grid;
  gap: 16px;
}

.company-insight-hero {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(17, 122, 255, 0.08), rgba(17, 122, 255, 0.02)),
    #f9fbff;
  border: 1px solid rgba(17, 122, 255, 0.1);
}

.company-insight-head {
  display: grid;
  gap: 8px;
}

.company-insight-summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.company-insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-insight-chip,
.company-side-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17, 122, 255, 0.08);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.company-insight-chip.is-muted,
.company-side-pill.is-muted {
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}

.company-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.company-metric-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e7eef7;
}

.company-metric-card strong {
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
}

.company-pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.company-pulse-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e7eef7;
}

.company-pulse-card.tone-signal {
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.08);
}

.company-pulse-card.tone-risk {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.company-pulse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.company-pulse-list li {
  position: relative;
  padding-left: 16px;
  color: var(--text);
  line-height: 1.5;
}

.company-pulse-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(17, 122, 255, 0.4);
}

.company-pulse-card.tone-signal .company-pulse-list li::before {
  background: rgba(16, 185, 129, 0.8);
}

.company-pulse-card.tone-risk .company-pulse-list li::before {
  background: rgba(239, 68, 68, 0.8);
}

.company-next-step-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(17, 122, 255, 0.08), rgba(17, 122, 255, 0.02));
  border: 1px solid rgba(17, 122, 255, 0.12);
}

.company-next-step-card strong {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.company-next-step-card span {
  white-space: nowrap;
  color: var(--accent);
  font-weight: 700;
}

.company-side-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-field-editable {
  align-content: start;
}

.inline-edit-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-edit-input {
  min-height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.inline-edit-input:focus {
  outline: none;
  border-color: rgba(23, 145, 231, 0.45);
  box-shadow: 0 0 0 3px rgba(23, 145, 231, 0.12);
}

.inline-edit-status {
  font-size: 0.84rem;
}

.inline-edit-status.is-muted {
  color: var(--muted);
}

.inline-edit-status.is-saving {
  color: #1d7fda;
}

.inline-edit-status.is-success {
  color: #17915f;
}

.inline-edit-status.is-error {
  color: #d05050;
}

.message-box {
  min-height: 90px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text-soft);
}

.touchpoint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.touchpoint-grid-compact {
  grid-template-columns: 1fr;
}

.touchpoint-card {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbfe;
  position: relative;
  overflow: visible;
}

.touchpoint-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d7e6f5;
}

.touchpoint-card-meeting::before {
  background: #1f8f6b;
}

.touchpoint-card-email::before {
  background: #1f7ae0;
}

.touchpoint-card-call::before {
  background: #e58a1f;
}

.touchpoint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.touchpoint-title {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 0;
}

.touchpoint-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf3fb;
  color: #245d8f;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.touchpoint-chip.is-muted {
  background: #f0f3f6;
  color: var(--muted);
}

.touchpoint-value {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.touchpoint-value.is-missing {
  color: var(--text-soft);
}

.touchpoint-hint {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.timeline-list-compact {
  margin-top: 10px;
}

@media (max-width: 1200px) {
  .touchpoint-grid {
    grid-template-columns: 1fr;
  }

  .contact-metric-strip {
      grid-template-columns: 1fr;
    }

  .contact-journey-head {
      flex-direction: column;
      align-items: flex-start;
    }

  .company-metric-strip,
  .company-pulse-grid {
      grid-template-columns: 1fr;
    }

  .company-next-step-card {
      flex-direction: column;
      align-items: flex-start;
    }
    }

.detail-action-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.96) 100%);
  box-shadow: var(--shadow-soft);
}

.detail-action-copy {
  display: grid;
  gap: 4px;
}

.detail-action-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.detail-action-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-button {
  display: inline-flex;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 68px;
  padding: 0;
  border-radius: 14px;
  background: #f6faff;
  color: var(--text-soft);
  border: 1px solid #dbe7f3;
  text-align: left;
}

.action-button:hover {
  background: #eef6fd;
  border-color: var(--border-strong);
}

.action-button.primary {
  background: linear-gradient(135deg, #1791e7, #2ba5f0);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(33, 144, 228, 0.2);
}

.action-button-phoning {
  background: linear-gradient(135deg, #1f8f6b, #30a37e);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(31, 143, 107, 0.18);
}

.action-button-phoning:disabled {
  background: #eef2f5;
  color: var(--muted);
  box-shadow: none;
}

.action-button-content {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px 14px;
}

.action-button-label {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.action-button-hint {
  font-size: 12px;
  line-height: 1.35;
  color: inherit;
  opacity: 0.82;
}

.action-button.compact {
  justify-content: center;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  text-align: center;
}

.portfolio-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
}

.portfolio-card {
  display: grid;
  align-content: start;
  min-height: 218px;
}

.portfolio-card h3 {
  margin: 0;
  font-size: 14px;
}

.portfolio-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.portfolio-table {
  width: 100%;
  margin: 0 auto;
}

.portfolio-table .table-head,
.portfolio-table .table-row {
  grid-template-columns:
    minmax(0, 1.34fr)
    34px
    30px
    minmax(76px, 0.72fr);
  gap: 4px;
  padding: 0 6px;
}

.portfolio-table .table-head {
  min-height: 27px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.portfolio-table .table-row {
  min-height: 39px;
}

.portfolio-table .table-head > span:last-child,
.portfolio-table .table-row > span:last-child {
  justify-content: flex-start;
}

.portfolio-table .table-head > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portfolio-table .table-head > span:nth-child(2),
.portfolio-table .table-head > span:nth-child(3),
.portfolio-table .table-row > span:nth-child(2),
.portfolio-table .table-row > span:nth-child(3) {
  justify-content: center;
}

@media (max-width: 1760px) {
  .cockpit-layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-panel {
    min-width: 0;
  }
}

.stacked-view {
  margin-top: 14px;
}

.section-table {
  overflow: hidden;
}

#contacts-view.section-table {
  overflow: visible;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding-bottom: 10px;
}

.filter-belt {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-form-card {
  margin: 0 0 12px;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-soft);
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 12px;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

.field textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.field-wide {
  grid-column: 1 / -1;
}

.contact-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

.large-table .table-head,
.large-table .table-row {
  padding: 0 12px;
}

.large-table .table-head {
  min-height: 32px;
}

.large-table .table-row {
  min-height: 44px;
}

.large-table .table-row,
.portfolio-table .table-row {
  width: 100%;
  color: var(--text);
}

.company-table .table-head,
.company-table .table-row {
  grid-template-columns:
    minmax(0, 1.74fr)
    minmax(60px, 0.58fr)
    minmax(0, 1.08fr)
    minmax(126px, 1fr);
}

.company-table .table-head > span:first-child {
  padding-left: 28px;
}

.company-table .table-head > span:last-child,
.company-table .table-row > span:last-child {
  justify-content: flex-start;
}

.company-table-shell {
  margin-top: 6px;
}

.company-table-wide {
  display: grid;
  grid-template-columns: var(--company-columns);
  width: max-content;
  min-width: 100%;
}

.company-table-wide .table-head,
.company-table-wide .table-row {
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  min-width: max-content;
  width: auto;
  position: relative;
  isolation: isolate;
}

.company-table-wide .table-head > span,
.company-table-wide .table-row > span {
  min-height: 54px;
}

.company-table-wide .table-head > span:first-child,
.company-table-wide .table-row > span:first-child {
  position: sticky;
  left: 0;
  z-index: 20;
  min-width: 300px;
  background: var(--surface);
  clip-path: inset(0);
  contain: paint;
  transform: translateZ(0);
  box-shadow: 1px 0 0 rgba(223, 232, 241, 0.92);
}

.company-table-wide .table-head > span:first-child {
  z-index: 21;
  padding-left: 12px;
}

.company-table-wide .table-row:hover > span:first-child {
  background: #f0f6fd;
}

.company-edit-row {
  width: 100%;
  color: var(--text);
}

.company-cell {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: visible !important;
}

.company-name-cell {
  padding-right: 8px;
}

.company-name-cell .avatar {
  flex: 0 0 auto;
}

.company-cell-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.company-cell-input {
  min-width: 0;
  width: 100%;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.company-cell-input:focus {
  outline: none;
  border-color: rgba(23, 145, 231, 0.52);
  box-shadow: 0 0 0 3px rgba(23, 145, 231, 0.12);
}

.company-cell-save,
.company-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid #cfe1f1;
  border-radius: 999px;
  background: #eef7ff;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
}

.company-cell-save {
  padding: 0 8px;
}

.company-cell-save:hover,
.company-open-button:hover {
  background: #e3f1ff;
  border-color: #b8d7f3;
}

.company-cell-save:disabled {
  cursor: default;
  opacity: 0.6;
}

.company-open-button {
  flex: 0 0 auto;
  padding: 0 10px;
}

.company-cell-status {
  grid-column: 1 / -1;
  font-size: 10px;
  line-height: 1.2;
}

.company-cell-status.is-saving {
  color: #1d7fda;
}

.company-cell-status.is-success {
  color: #17915f;
}

.company-cell-status.is-error {
  color: #d05050;
}

.hygiene-table .table-head,
.hygiene-table .table-row {
  grid-template-columns:
    minmax(0, 1.12fr)
    minmax(0, 1.42fr)
    minmax(0, 0.82fr)
    minmax(126px, 0.88fr);
}

.hygiene-table .table-head > span:last-child,
.hygiene-table .table-row > span:last-child {
  justify-content: flex-start;
}

.hygiene-arbitrage-row {
  border-left: 3px solid transparent;
}

.hygiene-arbitrage-row:hover,
.hygiene-arbitrage-row:focus-visible {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(33, 144, 228, 0.18);
  outline: none;
}

.hygiene-arbitrage-row.is-prepared {
  background: rgba(237, 249, 240, 0.55);
}

.contacts-table .table-head,
.contacts-table .table-row {
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(0, 1.08fr)
    minmax(0, 1.3fr)
    minmax(0, 1.22fr)
    minmax(92px, 0.9fr)
    minmax(132px, 1fr);
  padding: 0 12px;
}

.contacts-table .table-head > span:first-child {
  padding-left: 38px;
}

.contacts-table .table-head > span:nth-child(5),
.contacts-table .table-row > span:nth-child(5) {
  justify-content: flex-start;
}

.contacts-table .table-head > span:last-child,
.contacts-table .table-row > span:last-child {
  justify-content: flex-start;
}

.contact-row-action {
  align-items: flex-start;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.contact-row-activities {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.contact-row-activity-chip {
  background: #edf9f0;
  border: 1px solid rgba(64, 150, 86, 0.24);
  border-radius: 6px;
  color: #245c33;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  padding: 3px 6px;
  white-space: normal;
}

.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.staffing-summary-grid,
.staffing-card-grid {
  display: grid;
  gap: 10px;
}

.staffing-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.staffing-summary-card {
  display: grid;
  gap: 5px;
  min-height: 122px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(33, 144, 228, 0.1), transparent 32%),
    linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-soft);
}

.staffing-summary-card.is-clickable {
  appearance: none;
  position: relative;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.staffing-summary-card.is-clickable::after {
  content: "Ouvrir";
  position: absolute;
  right: 16px;
  top: 16px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(33, 144, 228, 0.1);
  color: #1d76bd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.staffing-summary-card.is-clickable:hover,
.staffing-summary-card.is-clickable:focus-visible,
.staffing-summary-card.is-clickable.is-active {
  border-color: rgba(33, 144, 228, 0.38);
  background:
    radial-gradient(circle at top right, rgba(33, 144, 228, 0.16), transparent 36%),
    linear-gradient(180deg, #fff 0%, #f4faff 100%);
  box-shadow: 0 16px 34px rgba(33, 144, 228, 0.14);
}

.staffing-summary-card.is-clickable:hover,
.staffing-summary-card.is-clickable:focus-visible {
  transform: translateY(-2px);
}

.staffing-summary-card.is-clickable:hover::after,
.staffing-summary-card.is-clickable:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.staffing-summary-card.is-clickable:focus-visible {
  outline: 3px solid rgba(33, 144, 228, 0.22);
  outline-offset: 3px;
}

.staffing-summary-card strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.staffing-summary-card span {
  color: var(--text);
  font-weight: 700;
}

.staffing-summary-card small {
  color: var(--text-soft);
}

.staffing-tabs {
  margin: 4px 0 12px;
}

.staffing-team-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(197, 218, 237, 0.96);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 10%, rgba(110, 167, 128, 0.16), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f5faf7 45%, #f5f9ff 100%);
  box-shadow: 0 18px 40px rgba(73, 116, 148, 0.1);
}

.staffing-team-guide h3 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.staffing-guide-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.staffing-guide-steps li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(214, 226, 240, 0.96);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-weight: 700;
}

.staffing-guide-steps strong {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #193044;
  color: #fff;
  font-size: 13px;
  flex: 0 0 auto;
}

.staffing-guide-safe {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #496173;
  font-size: 13px;
  font-weight: 700;
}

.staffing-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staffing-actionable-notice {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(205, 222, 238, 0.96);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #567089;
  font-size: 13px;
  font-weight: 700;
}

.staffing-action-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-soft);
}

.staffing-card-head,
.staffing-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.staffing-action-card h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.staffing-card-context {
  margin: 0;
  color: var(--text-soft);
  font-weight: 650;
}

.staffing-card-footer {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.staffing-action-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.staffing-outcome-trigger {
  width: max-content;
  min-width: 0;
  min-height: 38px;
  justify-self: start;
  border-radius: 999px;
  padding: 0 16px;
  box-shadow: 0 12px 22px rgba(33, 144, 228, 0.16);
}

.staffing-outcome-trigger:disabled {
  cursor: wait;
  opacity: 0.76;
}

.staffing-outcome-feedback {
  margin: 0 0 12px;
  padding: 11px 14px;
  border: 1px solid rgba(205, 222, 238, 0.96);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: #31506d;
  font-weight: 750;
  box-shadow: 0 12px 24px rgba(18, 48, 75, 0.06);
}

.staffing-outcome-feedback.is-success {
  border-color: rgba(36, 163, 117, 0.28);
  background: linear-gradient(135deg, rgba(238, 255, 247, 0.96), rgba(255, 255, 255, 0.92));
  color: #17664c;
}

.staffing-outcome-feedback.is-error {
  border-color: rgba(225, 85, 85, 0.3);
  background: linear-gradient(135deg, rgba(255, 243, 243, 0.98), rgba(255, 255, 255, 0.92));
  color: #8b2d2d;
}

.staffing-outcome-feedback.is-pending {
  border-color: rgba(37, 150, 230, 0.28);
  background: linear-gradient(135deg, rgba(239, 248, 255, 0.98), rgba(255, 255, 255, 0.9));
  color: #17608d;
}

.staffing-outcome-panel {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(180, 210, 235, 0.95);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(246, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.staffing-outcome-panel strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.staffing-outcome-panel p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.staffing-outcome-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staffing-outcome-choice,
.staffing-outcome-cancel {
  border: 1px solid rgba(190, 212, 232, 0.95);
  border-radius: 999px;
  background: #fff;
  color: #18324a;
  cursor: pointer;
  font: inherit;
}

.staffing-outcome-choice {
  display: grid;
  gap: 1px;
  min-width: 132px;
  padding: 8px 12px;
  text-align: left;
}

.staffing-outcome-choice span {
  font-size: 13px;
  font-weight: 800;
}

.staffing-outcome-choice small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.staffing-outcome-choice:hover,
.staffing-outcome-cancel:hover {
  border-color: rgba(35, 150, 229, 0.45);
  box-shadow: 0 10px 22px rgba(23, 107, 172, 0.1);
}

.staffing-outcome-choice:disabled,
.staffing-outcome-cancel:disabled {
  cursor: wait;
  opacity: 0.7;
}

.staffing-outcome-cancel {
  padding: 8px 12px;
  color: var(--text-soft);
  font-weight: 750;
}

.staffing-table .table-head,
.staffing-table .table-row {
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(0, 1fr)
    minmax(120px, 0.72fr)
    minmax(110px, 0.58fr);
}

.staffing-table .table-row span {
  min-width: 0;
}

.staffing-table .table-row.is-selected {
  border-color: rgba(35, 150, 229, 0.42);
  background:
    linear-gradient(90deg, rgba(233, 246, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 72%),
    #ffffff;
  box-shadow:
    inset 3px 0 0 rgba(35, 150, 229, 0.72),
    0 10px 24px rgba(23, 107, 172, 0.08);
}

.staffing-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.staffing-detail-panel {
  margin-top: 12px;
  border-color: rgba(179, 208, 231, 0.92);
  background:
    radial-gradient(circle at top right, rgba(35, 150, 229, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.staffing-detail-panel h3 {
  margin: 4px 0 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.staffing-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.staffing-hygiene-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.staffing-hygiene-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(205, 222, 237, 0.96);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(96, 135, 177, 0.1);
}

.staffing-hygiene-card.is-primary {
  grid-column: 1 / -1;
  min-height: 132px;
  background:
    radial-gradient(circle at top right, rgba(35, 150, 229, 0.11), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f5fbff 100%);
}

.staffing-hygiene-card.is-safe {
  border-color: rgba(87, 181, 110, 0.28);
  background:
    radial-gradient(circle at top right, rgba(87, 181, 110, 0.1), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
}

.staffing-hygiene-card h3 {
  margin: 0;
  max-width: 720px;
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.staffing-hygiene-card .action-button {
  width: max-content;
}

@media (min-width: 761px) {
  .queue-table > .table-head,
  .contacts-table .table-head,
  .company-table-wide .table-head,
  .portfolio-table .table-head,
  .staffing-table .table-head {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    box-shadow:
      0 1px 0 rgba(217, 228, 239, 0.96),
      0 10px 22px rgba(25, 38, 55, 0.08);
  }

  .company-table-wide .table-head > span:first-child,
  .queue-table-standard .table-head > span:nth-child(1),
  .queue-table-standard .table-head > span:nth-child(2) {
    z-index: 32;
    background: rgba(255, 255, 255, 0.97);
  }
}

.kanban-card {
  width: 100%;
  padding: 13px;
  text-align: left;
}

.kanban-card:hover {
  border-color: #d5e4f2;
  box-shadow: 0 10px 22px rgba(25, 38, 55, 0.06);
}

.detail-layout {
  margin-top: 14px;
}

.surface-panel h2,
.side-summary h2 {
  margin: 0;
}

.summary-block {
  display: grid;
  gap: 12px;
}

.summary-block + .summary-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef3f8;
}

.summary-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.side-summary {
  display: grid;
  align-content: start;
  gap: 10px;
}

.meeting-highlight {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 28, 43, 0.36);
  backdrop-filter: blur(10px);
}

.arbitrage-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-strong);
}

.arbitrage-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.arbitrage-dialog-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.12;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-soft);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.arbitrage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 0;
}

.arbitrage-summary > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.arbitrage-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.arbitrage-guardrail {
  margin: 14px 18px 0;
  padding: 11px 12px;
  border: 1px solid rgba(240, 164, 79, 0.36);
  border-radius: 8px;
  background: var(--warning-soft);
  color: #8a5c21;
}

.arbitrage-choice-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px 0;
}

.arbitrage-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.arbitrage-choice:hover,
.arbitrage-choice:focus-visible,
.arbitrage-choice.is-selected {
  border-color: rgba(33, 144, 228, 0.34);
  background: var(--accent-soft);
  outline: none;
}

.choice-radio {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
}

.arbitrage-choice.is-selected .choice-radio {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 8px var(--accent);
}

.arbitrage-choice span:last-child {
  display: grid;
  gap: 3px;
}

.arbitrage-choice strong,
.arbitrage-choice span,
.arbitrage-choice em {
  min-width: 0;
}

.arbitrage-choice span span {
  color: var(--text-soft);
}

.arbitrage-choice em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.arbitrage-result {
  margin: 14px 18px 0;
  padding: 11px 12px;
  border: 1px solid rgba(87, 181, 110, 0.34);
  border-radius: 8px;
  background: var(--success-soft);
  color: #326f42;
}

.arbitrage-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px;
}

.journal-drawer {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
}

.activity-log {
  display: grid;
  gap: 6px;
}

.activity-entry {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid #edf2f7;
  color: var(--text-soft);
}

.journal-drawer[hidden] {
  display: none;
}

@media (max-width: 1400px) {
  .stats-grid,
  .portfolio-strip,
  .kanban-grid,
  .staffing-summary-grid,
  .staffing-hygiene-panel,
  .staffing-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dashboard,
  .cockpit-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: auto;
    align-self: stretch;
    height: auto;
    overflow: visible;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(217, 228, 239, 0.85);
  }

  .sidebar-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .stats-grid,
  .portfolio-strip,
  .home-dashboard,
  .kanban-grid,
  .staffing-summary-grid,
  .staffing-hygiene-panel,
  .staffing-card-grid {
    grid-template-columns: 1fr;
  }

  .cockpit-inline-editor-grid,
  .cockpit-action-editor-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 10px 10px 12px;
    grid-template-rows: auto;
    gap: 10px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(22px);
    border-bottom: 0;
  }

  .queue-scroll-button {
    display: none;
  }

  .brand-lockup {
    position: relative;
    gap: 10px;
    align-items: center;
    padding: 4px 2px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    border-color: #c9daec;
    box-shadow: 0 8px 18px rgba(110, 146, 188, 0.16);
  }

  .sidebar-nav {
    display: none;
    grid-auto-flow: row;
    grid-auto-columns: unset;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(211, 224, 238, 0.96);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
      0 24px 48px rgba(105, 142, 188, 0.22),
      0 8px 18px rgba(105, 142, 188, 0.12);
    overflow: visible;
  }

  .sidebar[data-mobile-open="true"] .sidebar-nav {
    display: flex;
    flex-direction: column;
  }

  .nav-link {
    min-width: 0;
    width: 100%;
    min-height: 54px;
    padding: 0 14px;
    border: 1px solid rgba(223, 233, 244, 0.96);
    border-radius: 14px;
    background: #f9fbfe;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: normal;
    line-height: 1.2;
    font-weight: 600;
  }

  .nav-icon {
    display: block;
    width: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    flex-shrink: 0;
  }

  .nav-link.is-active {
    border-color: rgba(171, 207, 240, 0.96);
    background: linear-gradient(180deg, #eef7ff 0%, #e7f2ff 100%);
    box-shadow: inset 0 0 0 1px rgba(33, 144, 228, 0.08);
  }

  .nav-link.is-active .nav-icon,
  .nav-link:hover .nav-icon {
    color: var(--accent-strong);
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 14px 12px 18px;
  }

  .topbar {
    gap: 14px;
  }

  .topbar-title {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 2px 2px 0;
  }

  .topbar-title h1 {
    margin: 0;
    font-size: 34px;
    line-height: 0.96;
    letter-spacing: -0.05em;
    max-width: none;
    text-wrap: balance;
  }

  .topbar-title p {
    margin: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
  }

  #view-subtitle {
    max-width: 18ch;
    color: #6f859d;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 500;
  }

  .view-freshness {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    min-height: 48px;
    padding: 11px 14px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.35;
    box-shadow:
      0 10px 24px rgba(114, 168, 124, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.84);
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .scope-pill,
  .mode-switch,
  .toolbar-button {
    width: 100%;
  }

  .mode-switch {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .mode-button {
    flex: 1 1 120px;
  }

  .collaborator-picker {
    width: 100%;
    justify-content: space-between;
    border-left: 0;
    border-top: 1px solid rgba(190, 205, 222, 0.9);
    padding: 10px 4px 4px;
  }

  .collaborator-select {
    min-width: 0;
    width: 100%;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

  .action-board .surface-header {
    display: grid;
    gap: 10px;
  }

  .action-board .surface-title {
    font-size: 18px;
    line-height: 1.1;
  }

  .scope-badge {
    justify-self: start;
  }

  .cockpit-mode-toolbar,
  .cockpit-columns-shell {
    padding: 12px;
    border-radius: 18px;
  }

  .cockpit-mode-toolbar {
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .cockpit-mode-toolbar-block,
  .cockpit-mode-meta {
    width: 100%;
  }

  .cockpit-mode-meta {
    justify-content: flex-start;
  }

  .cockpit-mode-meta .pill {
    min-width: 0;
    justify-content: center;
  }

  .queue-section {
    border-radius: 20px;
    padding: 12px;
  }

  .queue-section-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
  }

  .queue-section-header > div:first-child {
    width: 100%;
    justify-content: space-between;
  }

  .queue-table .table-head,
  .queue-table .table-row,
  .large-table .table-head,
  .large-table .table-row,
  .portfolio-table .table-head,
  .portfolio-table .table-row {
    grid-template-columns: 1fr;
    padding: 10px 12px;
  }

  .table-head {
    display: none;
  }

  .queue-table {
    display: grid;
    gap: 10px;
  }

  .queue-row {
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(214, 226, 240, 0.96);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 26px rgba(125, 160, 204, 0.12);
  }

  .queue-row > span {
    min-height: auto;
    display: grid;
    gap: 5px;
    align-items: start;
  }

  .queue-row > span::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .queue-row > span:last-child,
  .queue-row > span:last-child::before {
    display: none;
  }

  .queue-row .row-company {
    font-weight: 650;
  }

  .queue-row .action-brief,
  .queue-row .reason-brief {
    min-height: auto;
  }

  .queue-row .action-brief-surface,
  .queue-row .reason-brief {
    width: 100%;
  }

  .queue-row .status-badge,
  .queue-row .phone-pill,
  .queue-row .linked-pill {
    justify-self: start;
  }

  .detail-panel {
    position: static;
    top: auto;
  }

  .detail-action-panel {
    border-radius: 20px;
  }

  .staffing-team-guide {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 20px;
  }

  .staffing-guide-safe {
    grid-column: auto;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-actions {
    justify-content: stretch;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 12px;
  }

  .arbitrage-dialog {
    max-height: calc(100vh - 24px);
  }

  .arbitrage-summary {
    grid-template-columns: 1fr;
  }

  .arbitrage-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .company-columns-shell {
    padding: 12px;
    border-radius: 18px;
  }

  .company-table-wide {
    display: grid;
    grid-template-columns: var(--company-columns);
    width: max-content;
    min-width: 100%;
  }

  .company-table-wide .table-head {
    display: grid;
  }

  .company-table-wide .table-head,
  .company-table-wide .table-row {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    min-width: max-content;
    width: auto;
    padding: 0 12px;
  }

  .company-table-wide .table-row {
    gap: 10px;
    border: 0;
    border-top: 1px solid #eef3f8;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .company-table-wide .table-head > span,
  .company-table-wide .table-row > span {
    display: flex;
    min-height: 54px;
  }

  .company-table-wide .table-head > span:first-child,
  .company-table-wide .table-row > span:first-child {
    position: sticky;
    left: 0;
    min-width: 300px;
    z-index: 20;
    background: var(--surface);
  }

  .company-table-wide .table-head > span:first-child {
    z-index: 21;
  }

  .company-table-wide .company-cell-editor {
    grid-template-columns: minmax(0, 1fr) 40px;
  }
}
