:root {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  color: #233044;
  background: #f6f7f9;
  font-size: 14px;
  line-height: 1.5;
  font-synthesis: none;
  --ink: #1e2b3e;
  --muted: #5f6c80;
  --accent: #5552ce;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --line: #e8ebf0;
  --sidebar: 224px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button {
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
a {
  color: #5a57d5;
  text-decoration: none;
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
a:hover {
  text-decoration: underline;
}
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-weight: 650;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.25px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.source {
  font-size: 12px;
  line-height: 1.6;
}
.compact {
  margin-bottom: 18px;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 35px;
  height: 35px;
}
.brand > span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.brand strong {
  font-size: 24px;
  letter-spacing: -0.04em;
  color: #25304b;
  line-height: 1;
  font-weight: 700;
}
.brand small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  z-index: 35;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 10px 24px;
}
.workspace-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 7px;
  margin-bottom: 20px;
}
.workspace-dot {
  width: 6px;
  height: 6px;
  background: #72b99c;
  border-radius: 50%;
}
.nav-group-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1.3px;
  padding: 0 13px 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: none;
  padding: 12px 13px;
  color: var(--muted);
  text-align: left;
  font-size: 14px;
  margin-bottom: 4px;
  min-height: 43px;
}
@media (hover: hover) and (pointer: fine) {
.nav-item:hover {
  background: #f7f7fc;
  color: #3e4660;
}
}
.nav-item.active {
  color: #5f5bd9;
  background: #eeedfc;
  font-weight: 600;
}
.nav-active-dot {
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.nav-item.logout {
  color: var(--muted);
}
.workspace-footer {
  border-top: 1px solid var(--line);
  margin: 18px 10px 0;
  padding-top: 17px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.main-shell {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: 58px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  gap: 20px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #a0a6b2;
  font-size: 12px;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eae9fb;
  color: #6a63c4;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
}
.avatar.small {
  width: 36px;
  height: 36px;
}
.main-content {
  padding: 20px 30px;
  max-width: 1800px;
  margin: 0 auto;
  min-width: 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}
.page-heading p {
  margin-top: 9px;
  font-size: 13px;
}
.heading-actions {
  display: flex;
  gap: 9px;
}
.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  padding: 10px 15px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
.primary:hover {
  background: #5553d1;
}
}
.secondary {
  background: #fff;
  color: #606b7e;
  border-color: #dfe3eb;
}
@media (hover: hover) and (pointer: fine) {
.secondary:hover {
  border-color: #bdbcd8;
  background: #fafafe;
}
}
.full {
  width: 100%;
}
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
}
@media (hover: hover) and (pointer: fine) {
.icon-button:hover {
  background: #f0effa;
  color: #635ed4;
}
}
.mobile-menu {
  display: none;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.list-panel {
  padding: 0;
  overflow: hidden;
}
.list-toolbar {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 180px;
  color: #a4acb8;
  position: relative;
}
.search-input > svg {
  position: absolute;
  left: 12px;
  pointer-events: none;
}
.search-input input {
  width: 100%;
  padding-left: 39px;
  background: #fafbfc;
}
.list-toolbar select {
  max-width: 230px;
  min-width: 160px;
  background: #fff;
  font-size: 14px;
}
.list-toolbar select:last-child {
  max-width: 260px;
}
input,
select,
textarea {
  border: 1px solid #dfe3eb;
  border-radius: 6px;
  padding: 9px 12px;
  min-height: 40px;
  color: #414d61;
  background: #fff;
  min-width: 0;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.65;
}
.table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 100px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  background: #fcfcfe;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.2px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  z-index: 2;
}
td {
  padding: 11px 16px;
  border-bottom: 1px solid #eff1f5;
  vertical-align: middle;
  font-size: 14px;
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
@media (hover: hover) and (pointer: fine) {
tbody tr:hover {
  background: #fbfbff;
}
}
.company-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #354157;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  max-width: 350px;
  line-height: 1.5;
}
.company-monogram {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f2f3f8;
  border: 1px solid #e9ebf1;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.sector-text {
  display: block;
  max-width: 230px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.revenue-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
  color: #596579;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.revenue-cell small {
  color: var(--muted);
  font-size: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 5px;
  background: #f1f3f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.badge.subtle {
  background: #f0effc;
  color: #5e5197;
}
.badge.positive {
  background: #eaf6ef;
  color: #286b48;
}
.badge.neutral {
  background: #f1f3f7;
  color: var(--muted);
}
.badge.warn {
  background: #fbf4e4;
  color: #735821;
  white-space: normal;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.pagination-options, .pagination-controls, .pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pagination-options { gap: 20px; flex-wrap: wrap; }
.pagination-summary { color: var(--text); white-space: nowrap; }
.pager select, .pager button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  min-height: 36px;
  padding: 0 10px;
  font: inherit;
  color: var(--text);
}
.pager .pagination-page {
  background: #eeedfc;
  border-color: #dddbf5;
  color: #49429b;
  font-weight: 600;
}
.pager button:not(:disabled):hover { background: var(--surface-soft, #f5f6fa); }
.pager button:disabled { opacity: .45; cursor: default; }
.pager select:disabled { cursor: default; }
@media (max-width: 640px) {
  .pager { align-items: flex-start; gap: 12px; }
  .pagination-options { width: 100%; gap: 12px; }
  .pagination-controls { width: 100%; justify-content: space-between; gap: 6px; }
  .pager select, .pager button { min-height: 44px; }
}
.loading-bar {
  position: relative;
  z-index: 3;
}
.loading-bar .loading-mark {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  overflow: hidden;
  background: #dedcf9;
}
.loading-bar .loading-mark::after {
  content: "";
  display: block;
  width: 36%;
  height: 100%;
  background: var(--accent);
  animation: loading-sweep 1.2s linear 180ms infinite both;
}
.loading-label-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.loading-status:not(:empty) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  min-height: 32px;
}
.loading-status .loading-mark {
  flex: 0 0 14px;
  height: 14px;
  border: 2px solid #dedcf9;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loading-spin 800ms linear 180ms infinite;
}
.skeleton-row td {
  height: 54px;
}
.skeleton-line {
  display: block;
  width: 65%;
  min-width: 32px;
  max-width: 140px;
  height: 12px;
  border-radius: 4px;
  background: #e8eaf3;
  animation: loading-pulse 1.2s ease 180ms infinite alternate;
}
.skeleton-row td:first-child .skeleton-line {
  width: 80%;
  min-width: 72px;
}
.skeleton-row td:last-child .skeleton-line {
  width: 52px;
  height: 22px;
}
@keyframes loading-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(278%); }
}
@keyframes loading-spin {
  to { transform: rotate(1turn); }
}
@keyframes loading-pulse {
  to { opacity: 0.48; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-bar .loading-mark::after,
  .loading-status .loading-mark,
  .skeleton-line {
    animation: none;
  }
}
.empty-state {
  padding: 36px 22px;
  text-align: center;
  color: var(--muted);
}
.empty-state h3 {
  margin: 12px 0 5px;
}
.empty-state p {
  font-size: 12px;
}
.notice {
  padding: 12px 15px;
  border: 1px solid #dfdfef;
  border-radius: 7px;
  background: #f5f4fc;
  color: #777195;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.notice.error {
  border-color: #efd8d5;
  background: #fff7f5;
  color: #9e3c33;
}
.notice.success {
  border-color: #d4e9dc;
  background: #f2faf5;
  color: #286b48;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  min-width: 0;
}
.field label {
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.field input,
.field select {
  width: 100%;
  font-size: 14px;
}
.field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.wide {
  grid-column: 1/-1;
}
.form-footer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 3px;
  display: flex;
  justify-content: flex-end;
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1180px;
}
.profile-layout .panel {
  margin: 0;
}
.profile-layout .muted {
  font-size: 12px;
}
.form-page {
  max-width: 1000px;
  margin: 0 auto;
}
.back {
  border: 0;
  background: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 0;
  margin-bottom: 12px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.financial-details summary,
.opportunity-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  list-style-position: inside;
}
.financial-details[open] summary,
.opportunity-details[open] summary {
  margin-bottom: 22px;
}
.opportunity-content p {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0 17px;
}
.form-page .panel > h2 {
  margin-bottom: 18px;
}
.role-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.role-guide > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 4px;
}
.role-guide strong {
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
}
.role-guide span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.user-create {
  max-width: 900px;
}
.user-create > h2 {
  margin-bottom: 22px;
}
.list-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.list-top .muted {
  font-size: 12px;
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.person-cell > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.person-cell strong {
  font-size: 14px;
  color: #4d586d;
  font-weight: 550;
}
.person-cell small {
  font-size: 12px;
  color: var(--muted);
}
.list-panel td select {
  font-size: 12px;
  padding: 7px 10px;
  min-width: 135px;
}
.text-button {
  border: 0;
  background: none;
  color: #62559c;
  padding: 5px;
  font-size: 12px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 20px;
}
.detail-facts {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 17px 15px;
  font-size: 12px;
  margin: 0;
}
.detail-facts dt,
.facts dt {
  color: var(--muted);
}
.detail-facts dd,
.facts dd {
  margin: 0;
  color: #626e82;
  overflow-wrap: anywhere;
}
.facts {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 14px;
  font-size: 12px;
  margin: 18px 0;
}
.source-panel p {
  font-size: 12px;
  margin-top: 12px;
}
.source-panel a {
  font-size: 12px;
}
.company-notes {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
}
.company-notes p {
  font-size: 12px;
  white-space: pre-wrap;
  margin-top: 10px;
  color: #7f8899;
}
.contact-references {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.contact-references details {
  max-width: 330px;
}
.contact-references summary {
  cursor: pointer;
  color: #9da5b2;
}
.contact-references p {
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.6;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.03fr 1fr;
  min-height: 100dvh;
}
.login-story {
  background: #eeedf8;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 60px;
  overflow: hidden;
}
.login-copy {
  margin: auto 0;
  max-width: 540px;
  padding: 55px 0 30px;
}
.login-copy h1 {
  font-size: 64px;
  letter-spacing: -0.04em;
  line-height: 1.12;
  font-weight: 600;
  color: #383850;
  margin-top: 24px;
}
.login-copy > p {
  font-size: 14px;
  color: #625d7b;
  max-width: 330px;
  margin-top: 24px;
  line-height: 1.9;
}
.login-credit {
  font-size: 12px;
  color: #625d7b;
  margin-top: 30px;
}
.network-art {
  position: relative;
  height: 170px;
  width: 310px;
  margin-top: 38px;
}
.network-line {
  position: absolute;
  width: 195px;
  height: 90px;
  left: 36px;
  top: 35px;
  border: 1px solid #cecae7;
  border-top: 0;
  transform: skewY(-20deg);
}
.network-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 67px;
  height: 67px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #fff;
  border-radius: 17px;
  color: #9b92d0;
  box-shadow: 0 13px 22px #c9c2e724;
}
.network-node.one {
  left: 0;
  top: 62px;
  transform: rotate(-9deg);
}
.network-node.two {
  left: 112px;
  top: 0;
  width: 78px;
  height: 78px;
  background: #6563e8;
  color: white;
  transform: rotate(8deg);
  box-shadow: 0 12px 30px #6563e826;
}
.network-node.three {
  left: 232px;
  top: 82px;
  color: #83aa91;
  transform: rotate(-6deg);
}
.login-access {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff;
}
.login-form {
  width: 100%;
  max-width: 355px;
}
.login-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 47px;
  border-radius: 12px;
  background: #f0effb;
  color: #9a91d1;
  margin-bottom: 23px;
}
.login-form h2 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.login-form > p.muted {
  font-size: 12px;
  margin-bottom: 29px;
}
.login-form .field {
  margin-bottom: 20px;
}
.login-form .field label {
  font-size: 12px;
}
.login-form input {
  height: 44px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  width: 100%;
  padding-right: 42px;
}
.password-eye {
  position: absolute;
  right: 5px;
  top: 5px;
}
.login-form .primary {
  height: 44px;
  margin-top: 6px;
  justify-content: space-between;
  padding: 0 16px;
}
.login-help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
  text-align: center;
}
.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 100dvh;
  color: #9ca3b3;
  font-size: 12px;
}
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}
.import-layout h2 {
  margin-bottom: 18px;
}
.import-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 16px 0 12px;
}
.import-upload-card { min-width: 0; }
.import-upload-heading h2 { margin-bottom: 4px; }
.import-upload-heading p { margin: 0; }
.import-format { margin-bottom: 0; min-width: 0; }
.import-fields select { width: 100%; min-height: 40px; }
.import-format small { display: block; margin-top: 5px; }
.import-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.import-upload-footer .import-exclusions { margin: 0; min-width: 0; cursor: pointer; }
.import-exclusions small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.import-guide summary { width: fit-content; cursor: pointer; font-size: 12px; color: var(--muted); }
.import-guide p { margin-top: 8px; max-width: 95ch; }
.import-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.import-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.import-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.stat {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 7px;
  background: #fafbfe;
}
.stat b {
  display: block;
  font-size: 22px;
  font-weight: 550;
  margin-bottom: 6px;
  color: #646a86;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.stat-error {
  background: #fff5f3;
  border-color: #f2d9d4;
}
.template-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  font-size: 12px;
}
.import-layout p {
  font-size: 12px;
}
.import-layout ul {
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.import-layout .success {
  background: #f7fcf9;
  border-color: #dbece1;
}
.import-errors {
  margin-top: 18px;
}
.import-errors h3 {
  margin-bottom: 12px;
}
.sidebar-overlay {
  display: none;
}
@media (min-width: 1700px) {
  .main-content {
    padding: 24px 42px;
  }
  .topbar {
    padding: 0 42px;
  }
  .login-story {
    padding: 50px 85px;
  }
}
@media (max-width: 1150px) {
  :root {
    --sidebar: 198px;
  }
  .main-content {
    padding: 20px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .heading-actions {
    gap: 7px;
  }
  .list-toolbar select {
    min-width: 135px;
    max-width: 190px;
  }
  .import-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .import-layout > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .login-story {
    padding: 40px;
  }
  .login-copy h1 {
    font-size: 54px;
  }
}
@media (max-width: 800px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 238px;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 240ms var(--ease-drawer), visibility 0s 240ms;
  }
  .sidebar.opened {
    visibility: visible;
    transition: transform 240ms var(--ease-drawer);
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #1e263d55;
    border: 0;
    z-index: 30;
    backdrop-filter: blur(2px);
  }
  .mobile-menu {
    display: inline-flex;
    margin-left: -8px;
  }
  .topbar {
    height: 58px;
    padding: 0 20px;
  }
  .main-content {
    padding: 14px 16px;
  }
  .list-toolbar {
    flex-wrap: wrap;
    padding: 16px;
  }
  .search-input {
    flex-basis: 100%;
  }
  .list-toolbar select {
    flex: 1;
    max-width: none !important;
  }
  .page-heading {
    align-items: flex-start;
    gap: 14px;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .heading-actions button {
    padding: 9px 11px;
    font-size: 12px;
  }
  .list-panel table {
    min-width: 730px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: auto;
    padding: 25px 30px;
    background: #fff;
  }
  .login-copy,
  .login-credit {
    display: none;
  }
  .login-access {
    align-items: flex-start;
    padding: 55px 30px;
  }
  .login-form {
    max-width: 380px;
  }
  .login-form h2 {
    font-size: 29px;
  }
}
@media (max-width: 550px) {
    .breadcrumb {
    gap: 9px;
  }
  .main-content {
    padding: 16px 15px;
  }
  .topbar {
    padding: 0 15px;
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 20px;
  }
  .heading-actions {
    justify-content: flex-start;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .profile-layout {
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .list-panel {
    padding: 0;
  }
  .import-fields {
    grid-template-columns: 1fr;
  }
  .import-layout > div:last-child {
    grid-template-columns: minmax(0, 1fr);
  }
  .import-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .role-guide {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .detail-facts {
    grid-template-columns: 100px 1fr;
    gap: 15px;
    font-size: 12px;
  }
  .form-footer .primary {
    width: 100%;
  }
  .login-access {
    padding-top: 38px;
  }

  .form-actions {
    position: sticky;
    bottom: 0;
    padding: 12px;
    background: #f6f7f9e8;
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--line);
    margin: 0 -15px -16px;
  }
  .import-layout {
    margin-top: 22px;
  }
  .list-top {
    padding: 18px;
  }
  .pager {
    padding: 13px 16px;
  }
}

.template-link {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  color: #5a57d5;
  font-size: 12px;
}
@media (hover: hover) and (pointer: fine) {
.template-link:hover {
  text-decoration: underline;
}
}

.user-menu > summary {
  list-style: none;
  cursor: pointer;
}
.user-menu > summary::-webkit-details-marker {
  display: none;
}
.user-menu-chevron {
  margin-left: auto;
  transition: transform 160ms var(--ease-out);
}
.user-menu[open] .user-menu-chevron {
  transform: rotate(90deg);
}
.user-submenu {
  margin: 4px 0 8px 22px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.user-submenu .nav-item {
  min-height: 40px;
  padding: 9px 10px;
}
.user-menu summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.import-layout {
  margin-top: 0;
}
.import-fields {
  margin-top: 14px;
}

.profile-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.profile-fields > h2 { margin-bottom: 18px; }
.selection-info { padding: 12px 16px; font-size: 12px; }
.selection-info p + p { margin-top: 8px; }
.targeting-toggle { display: flex; align-items: center; gap: 8px; padding: 10px 20px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.targeting-toggle input { accent-color: var(--accent); }

/* Interaction refinements shared by all CRM views. */
::selection { background: #e3e0ff; color: var(--ink); }
a { text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: anywhere; }
input, textarea { caret-color: var(--accent); }
input[type="checkbox"] { min-height: auto; width: 16px; height: 16px; flex-shrink: 0; }
button, summary, a, input, select, textarea { scroll-margin-block: 72px 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.table-scroll:focus-visible { outline-offset: -3px; }
.table-scroll { overscroll-behavior-x: contain; }
tbody tr:focus-within { background: #f6f5ff; }
.company-cell > span:last-child { overflow-wrap: anywhere; }
.revenue-cell, .pager { font-variant-numeric: tabular-nums; }
.targeting-toggle { min-height: 44px; cursor: pointer; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: #fff; border-radius: 6px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  .primary, .secondary, .icon-button { transition: transform 120ms var(--ease-out), background 150ms ease, border-color 150ms ease; }
  .primary:active:not(:disabled):not(:focus-visible), .secondary:active:not(:disabled):not(:focus-visible), .icon-button:active:not(:disabled):not(:focus-visible) { transform: scale(0.97); }
}
@media (max-width: 800px) {
  .sidebar { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .sidebar.keyboard-motion { transition: none; }
  .primary, .secondary, .icon-button, .pager button, .nav-item, .user-submenu .nav-item { min-height: 44px; }
  .icon-button, .pager button { min-width: 44px; }
  input:not([type="checkbox"]), select, textarea, .field input, .field select, .list-toolbar select, .list-panel td select { font-size: 16px; }
  .list-toolbar select { min-width: 0; width: 0; }
  .heading-actions button { font-size: 13px; }
  .page-heading { margin-bottom: 16px; }
  .pager { gap: 8px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.user-menu summary:focus-visible .user-menu-chevron { transition: none; }

/* Page identity lives in the sticky navbar; the page contains its actions. */
.page-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.page-breadcrumb h1 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.page-breadcrumb button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
}
.page-heading { justify-content: flex-end; }
.page-heading > h2 {
  margin-right: auto;
  font-size: 22px;
}
.sidebar-account {
  gap: 9px;
  padding: 10px 6px;
}
.sidebar-account-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.sidebar-account-label strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.sidebar-account-label small {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.sidebar-account .avatar { width: 32px; height: 32px; }
.sidebar-account .user-menu-chevron { flex-shrink: 0; }
@media (max-width: 550px) {
  .page-breadcrumb { gap: 5px; }
  .page-breadcrumb h1 { font-size: 16px; }
  .page-breadcrumb button { font-size: 13px; }
}

/* Public legal page: readable without authentication, scripts or remote assets. */
.privacy-page { background: #fff; }
.privacy-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(20px, calc((100% - 960px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.privacy-header .brand { color: var(--ink); text-decoration: none; }
.privacy-content { max-width: 76ch; font-size: 16px; padding: 28px 20px 32px; margin: 0 auto; }
.privacy-content p, .privacy-content li { font-size: 16px; line-height: 1.7; }
.privacy-content p, .privacy-content ul { margin-top: 12px; }
.privacy-content ul, .privacy-content ol { padding-left: 24px; }
.privacy-content li + li { margin-top: 8px; }
.privacy-content section { margin-top: 32px; scroll-margin-top: 100px; }
.privacy-content h2 { font-size: 21px; line-height: 1.4; }
.privacy-content h3 { font-size: 17px; margin-top: 18px; }
.privacy-content a { text-decoration: underline; }
.privacy-content .privacy-version { font-size: 13px; color: var(--muted); margin-top: 6px; }
.privacy-review { padding: 16px; margin-top: 20px; background: #fff9ed; border: 1px solid #ead8af; border-radius: 8px; color: #654d20; }
.privacy-review p { margin-top: 6px; font-size: 14px; }
.privacy-index { margin-top: 24px; padding: 14px 0; border-block: 1px solid var(--line); }
.privacy-index summary { cursor: pointer; font-weight: 600; }
.privacy-index ol { columns: 2; column-gap: 28px; }
.privacy-index li { font-size: 14px; break-inside: avoid; }
.privacy-content code { overflow-wrap: anywhere; }
.privacy-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: 13px; color: var(--muted); }
.login-privacy { display: block; text-align: center; font-size: 13px; margin-top: 18px; }
.workspace-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
@media (max-width: 550px) {
  .privacy-header { padding: 12px 16px; }
  .privacy-header > a:last-child { font-size: 13px; }
  .privacy-content { padding: 22px 16px 28px; }
  .privacy-index ol { columns: 1; }
}
@media print {
  .privacy-header { position: static; }
  .privacy-index, .privacy-contact, .privacy-footer, .privacy-header > a:last-child { display: none; }
  .privacy-content { max-width: none; padding: 0; }
  .privacy-content section { break-inside: avoid; }
}

.workspace-menu { margin-bottom: 20px; }
.workspace-menu > .workspace-label {
  margin-bottom: 0;
  min-height: 44px;
  font-size: 13px;
}
.workspace-menu > .workspace-label.active {
  border-color: #bdbbe8;
  color: var(--accent);
  background: #f6f5ff;
}
.workspace-menu .user-submenu { margin-bottom: 0; }

/* File selection is shared by click, keyboard and drag-and-drop. */
.file-upload { min-width: 0; }
.file-upload-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.file-upload input[hidden] { display: none; }
.file-dropzone {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  width: 100%;
  min-height: 88px;
  padding: 16px;
  border: 1px dashed #a8a6ca;
  border-radius: 12px;
  background: #fafaff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.file-dropzone-icon { grid-row: 1 / 3; display: grid; place-items: center; color: var(--accent); transition: transform 160ms var(--ease-out); }
.file-dropzone strong { font-size: 14px; }
.file-dropzone-browse { grid-column: 3; grid-row: 1 / 3; color: var(--accent); font-weight: 500; }
.file-dropzone small { grid-column: 2; color: var(--muted); font-size: 12px; }
.file-dropzone.is-dragging { border-style: solid; border-color: var(--accent); background: #eeecff; }
.file-dropzone.is-dragging .file-dropzone-icon { transform: translateY(-3px); }
.file-dropzone.has-file { border-style: solid; border-color: #b2afd9; }
.file-dropzone.has-error { border-color: #b42318; }
.file-dropzone:disabled { opacity: .6; cursor: wait; }
.file-upload-selection:empty, .file-upload-error:empty { display: none; }
.file-upload-selection { display: flex; align-items: center; gap: 12px; padding: 12px 0 0; }
.file-upload-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.file-upload-details strong { overflow-wrap: anywhere; font-size: 13px; }
.file-upload-details small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.file-upload-error { color: #b42318; margin: 8px 0 0; font-size: 12px; }
.user-menu[data-closing="true"] .user-menu-chevron { transform: rotate(0deg); }
@media (hover: hover) and (pointer: fine) {
  .file-dropzone:hover:not(:disabled) { background: #f0effc; border-color: var(--accent); }
}
@media (max-width: 600px) {
  .file-dropzone { grid-template-columns: 24px minmax(0, 1fr); min-height: 112px; padding: 14px; gap: 6px 10px; }
  .file-dropzone-icon { grid-row: 1 / 4; }
  .file-dropzone-browse { grid-column: 2; grid-row: 2; }
  .file-dropzone small { grid-row: 3; line-height: 1.5; }
  .import-upload-footer { align-items: stretch; flex-direction: column; gap: 12px; }
  .import-upload-footer .primary { width: 100%; }
  .import-support { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .file-dropzone.is-dragging .file-dropzone-icon { transform: none; }
}

.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sort-header.is-sorted, .sort-header:hover { color: #49429b; }
.sort-indicator { flex-shrink: 0; }
@media (pointer: coarse) { .sort-header { min-height: 44px; } }

.chip-select { position: relative; min-width: 0; }
.chip-input-area { position: relative; }
.chip-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chip-label-row label { margin: 0; }
.chip-clear { border: 0; background: transparent; padding: 3px; color: #49429b; font: inherit; font-size: 12px; }
.chip-control { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.chip-control:focus-within { outline: 2px solid #706ad4; outline-offset: 2px; }
.chip-control input { flex: 1 1 160px; width: 100%; min-width: 100px; border: 0; background: transparent; padding: 5px 3px; min-height: 30px; box-shadow: none; }
.chip-control input:focus { outline: none; box-shadow: none; }
.selection-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 6px 4px 9px; background: #eeedfc; color: #49429b; border-radius: 5px; font-size: 12px; line-height: 20px; }
.selection-chip > span { overflow-wrap: anywhere; }
.selection-chip button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; border: 0; border-radius: 4px; background: transparent; color: inherit; padding: 0; }
.selection-chip button:hover { background: #dddbf5; }
.chip-dropdown { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 20; background: white; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px #18233d1a; padding: 4px; }
.chip-dropdown ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.chip-dropdown li { padding: 9px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.chip-dropdown li:hover, .chip-dropdown li.active { background: #eeedfc; color: #49429b; }
.chip-no-results { margin: 0; padding: 10px; font-size: 13px; color: var(--muted); }
@media (pointer: coarse) { .selection-chip button { width: 32px; height: 32px; } .chip-dropdown li { min-height: 44px; } }

/* Commercial scheduling extends the existing compact CRM surfaces. */
.activities-view { min-width:0; margin-top:20px; }
.activity-toolbar { display:flex; align-items:end; gap:12px; flex-wrap:wrap; margin:0 0 18px; }
.activity-toolbar label { display:grid; gap:6px; min-width:140px; flex:1; }
.activity-toolbar label:first-child { flex:2; min-width:200px; }
.activity-toolbar input,.activity-toolbar select,.calendar-toolbar input { min-height:40px; width:100%; }
.activity-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.activity-actions button { white-space:nowrap; }
.activity-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.activity-editor label { display:grid; gap:6px; margin-bottom:12px; }
.activity-editor input,.activity-editor select,.activity-editor textarea { width:100%; }
.activity-editor textarea { min-height:80px; resize:vertical; }
.activity-editor .company-picker { position:relative; }
.company-picker-results { padding:4px; margin:4px 0; list-style:none; max-height:230px; overflow:auto; border:1px solid var(--border,#dfe3ed); border-radius:8px; background:white; }
.company-picker-results button { display:grid; gap:4px; width:100%; text-align:left; padding:9px; border:0; background:transparent; }
.company-picker-results button:hover,.company-picker-results button:focus-visible { background:#f0edff; }
.company-picker-results small { color:#65718a; }
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.calendar-toolbar h2 { text-transform:capitalize; margin:0; }
.calendar-toolbar input { width:165px; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays span { padding:8px; text-align:center; color:#65718a; font-size:12px; }
.calendar-grid { border-top:1px solid #e2e6ef; border-left:1px solid #e2e6ef; border-radius:8px; overflow:hidden; }
.calendar-day { min-height:60px; padding:9px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; border:0; border-right:1px solid #e2e6ef; border-bottom:1px solid #e2e6ef; border-radius:0; background:#fff; color:#253049; text-align:left; }
.calendar-day:hover { background:#f7f6ff; }
.calendar-day.outside { color:#a2aabd; background:#fafbfc; }
.calendar-day.today>span { font-weight:750; text-decoration:underline; text-underline-offset:4px; }
.calendar-day.selected { background:#efedff; box-shadow:inset 0 0 0 2px #6554db; }
.calendar-count { border-radius:4px; padding:2px 6px; background:#e5dfff; color:#4733ae; font-size:11px; }
.activity-agenda { margin-top:18px; }
.text-button { padding:0; border:0; background:none; color:#5847c7; font-weight:600; text-align:left; }
.import-exclusions { display:flex; align-items:flex-start; gap:9px; margin:16px 0; font-size:13px; }
.import-exclusions input { width:16px; height:16px; flex-shrink:0; margin-top:2px; }
@media(max-width:800px) {
  .activity-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calendar-toolbar { align-items:flex-start; flex-direction:column; }
  .calendar-day { min-height:60px; padding:6px; gap:5px; }
  .calendar-count { font-size:10px; padding:2px; }
}
@media(max-width:480px) {
  .activity-form-grid { grid-template-columns:1fr; }
  .activity-toolbar label,.activity-toolbar label:first-child { min-width:120px; }
  .calendar-panel { padding:12px; }
  .calendar-day { min-height:55px; padding:5px; }
  .calendar-count { font-size:9px; }
}

@media(max-width:480px) {
  .activity-toolbar label:first-child { flex-basis:100%; }
  .activity-toolbar label { min-width:0; }
  .activity-toolbar>.primary { width:100%; }
  .calendar-toolbar input { width:138px; font-size:13px; padding:8px; }
  .calendar-toolbar .activity-actions { gap:6px; }
  .calendar-count-label { display:none; }
}

.company-editor-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.company-editor .panel + .panel { margin-top: 16px; }
.company-editor .panel > h2 { margin-bottom: 16px; }
.company-editor .contact-editor { border: 1px solid var(--line); padding: 16px; margin: 16px 0 0; min-width: 0; }
.company-editor .contact-editor legend { padding: 0 6px; font-weight: 600; }
.company-editor-actions { position: sticky; bottom: 0; z-index: 5; gap: 12px; padding: 12px 0; background: #f6f7f9; }
.heading-actions { flex-wrap: wrap; }
