:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --panel: #ffffff;
  --bg: #f5f5f7;
  --soft: #f0f3f7;
  --primary: #0066cc;
  --primary-strong: #004f9f;
  --danger: #d70015;
  --success: #248a3d;
  --warning: #bf6a02;
  --radius: 8px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .06);
  --shadow-card: 0 18px 45px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }

.topbar {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 26px;
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(210, 210, 215, .72);
  backdrop-filter: saturate(180%) blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  min-width: 170px;
}

.nav { display: flex; gap: 8px; flex: 1; }
.nav a, .account a {
  padding: 7px 10px;
  border-radius: 6px;
  color: #2b2b30;
  font-size: 13px;
}
.nav a:hover, .account a:hover { background: #edf2f7; }

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 30px 48px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 22px 50px rgba(28, 46, 66, .12);
  padding: 34px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 26px; margin-bottom: 2px; letter-spacing: 0; }
h2 { font-size: 18px; margin-bottom: 16px; }
h3 { font-size: 14px; margin-bottom: 10px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; margin-bottom: 0; }

.notice, .alert {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid;
}
.notice { background: #eef8f3; border-color: #b9dfcc; color: #145c3d; }
.alert { background: #fff0ef; border-color: #f0c0bc; color: #8e261f; }

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: #293849;
}

input, select, textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  font: inherit;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(0, 102, 204, .55);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .14);
  outline: 0;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

button, .primary, .ghost, .link-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.primary:hover { background: var(--primary-strong); color: #fff; }
.ghost { background: #fff; }
.danger { color: var(--danger); border-color: #efc5c1; }
.inline { width: fit-content; }

.stack { display: grid; gap: 14px; }

.filter-panel, .form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.lookup-panel {
  display: grid;
  grid-template-columns: minmax(280px, 560px) auto auto;
  align-items: end;
  gap: 12px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(210, 210, 215, .86);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.search-page-head {
  margin-bottom: 10px;
}

.search-panel {
  width: fit-content;
  max-width: 100%;
}

.search-panel input {
  min-width: min(520px, 58vw);
  height: 38px;
  border-radius: 999px;
  padding-inline: 14px;
  background: #f7f8fa;
}
.filter-panel.compact { grid-template-columns: repeat(3, minmax(180px, 260px)); align-items: end; }
.wide { grid-column: span 2; }
.form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  align-self: end;
}

.contact-entry-panel {
  padding: 22px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.database-form {
  display: grid;
  gap: 16px;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 16px;
}

.form-section h3 {
  margin-bottom: 14px;
  color: #243447;
}

.form-section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.database-form-actions {
  justify-content: flex-end;
  align-items: center;
}

.password-panel {
  max-width: 920px;
}

.password-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  align-items: end;
}

.manager-field {
  position: relative;
}

.manager-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(42, 62, 82, .14);
  padding: 6px;
}

.manager-suggestions button {
  width: 100%;
  min-height: auto;
  display: grid;
  justify-content: stretch;
  gap: 3px;
  border: 0;
  border-radius: 5px;
  padding: 9px 10px;
  text-align: left;
  background: #fff;
}

.manager-suggestions button:hover,
.manager-suggestions button:focus {
  background: #eef4f8;
}

.manager-suggestions strong {
  color: var(--ink);
}

.manager-suggestions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.table-wrap, .panel, .org-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel, .org-panel { padding: 18px; margin-bottom: 18px; }

.profile-panel {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(210, 210, 215, .88);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.compact-profile-panel {
  padding: 14px 16px 16px;
  margin-bottom: 14px;
  aspect-ratio: 16 / 9;
  min-height: 560px;
  max-height: min(760px, calc(100vh - 150px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 16px;
}

.profile-compact-grid {
  display: grid;
  grid-template-columns: minmax(340px, .95fr) minmax(250px, .62fr) minmax(430px, 1.18fr);
  gap: 12px;
  align-items: stretch;
  min-height: 100%;
}

.profile-scroll-body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.compact-side-stack {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.info-block {
  border: 1px solid rgba(210, 210, 215, .82);
  border-radius: var(--radius);
  background: #fbfbfd;
  padding: 16px;
}

.compact-info-block {
  padding: 12px;
  min-width: 0;
  min-height: 0;
}

.info-block h3 {
  color: #2b2b30;
  border-bottom: 1px solid rgba(210, 210, 215, .78);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.compact-info-block h3 {
  padding-bottom: 7px;
  margin-bottom: 9px;
  font-size: 13px;
}

.wide-block {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: #f3f4f6;
  font-size: 13px;
  color: #3a3a3c;
}
tr:hover td { background: #fbfbfd; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

.empty-state-panel {
  border-style: dashed;
  background: rgba(255, 255, 255, .78);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions form { margin: 0; }

.metric-strip, .stat {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(210, 210, 215, .86);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-soft);
}
.metric-strip span, .stat span {
  display: block;
  font-size: 24px;
  font-weight: 850;
}
.metric-strip small, .stat small { color: var(--muted); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.admin-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}
.admin-links a, .admin-links form {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(210, 210, 215, .86);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 64px;
  display: flex;
  align-items: center;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.admin-links a:hover, .admin-links form:hover {
  transform: translateY(-1px);
  border-color: #b8c7da;
  box-shadow: var(--shadow-card);
}

.admin-workbench {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 76px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(210, 210, 215, .86);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.admin-sidebar-head {
  padding: 2px 4px 14px;
  border-bottom: 1px solid rgba(210, 210, 215, .78);
  margin-bottom: 10px;
}

.admin-sidebar-head h1 {
  font-size: 20px;
  margin-bottom: 0;
}

.admin-side-nav {
  display: grid;
  gap: 4px;
}

.admin-side-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  border-radius: 6px;
  padding: 9px 10px;
  color: #263241;
  font-weight: 800;
}

.admin-side-nav a:hover {
  background: #eef4fb;
}

.admin-side-nav a.active {
  background: #e7f1ff;
  color: var(--primary-strong);
}

.admin-side-nav b {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
}

.admin-main {
  min-width: 0;
}

.admin-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(210, 210, 215, .86);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.admin-section-head h2 {
  font-size: 24px;
  margin-bottom: 2px;
}

.admin-content-panel {
  display: grid;
  gap: 14px;
}

.admin-content-panel .panel,
.admin-content-panel .table-wrap {
  margin-bottom: 0;
}

.admin-filter-strip {
  margin-bottom: 0;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.admin-overview-grid a {
  display: grid;
  gap: 6px;
  min-height: 118px;
  align-content: start;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(210, 210, 215, .86);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.admin-overview-grid a:hover {
  border-color: #b8c7da;
  box-shadow: var(--shadow-card);
}

.admin-overview-grid strong {
  font-size: 17px;
}

.admin-overview-grid span {
  color: var(--muted);
}

.admin-split-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
}

.backup-panel {
  max-width: 680px;
}

.backup-panel form {
  margin-top: 16px;
}

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

.details {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px 14px;
  margin: 0;
}
.compact-details {
  grid-template-columns: 104px minmax(160px, 1fr) 104px minmax(160px, 1fr);
  gap: 12px 16px;
}
.single-details {
  grid-template-columns: 86px 1fr;
}
dt { color: var(--muted); }
dd { margin: 0; }

.relation-grid, .template-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.relation-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}
.result-stack {
  display: grid;
  gap: 12px;
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.result-head h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.compact-result-head {
  margin-bottom: 12px;
  padding: 2px 2px 0;
}

.compact-result-head h2 {
  font-size: 25px;
  line-height: 1.08;
  margin-bottom: 0;
  letter-spacing: 0;
}

.identity-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 62%;
}

.identity-strip span {
  border: 1px solid #d8d8de;
  border-radius: 999px;
  background: #f7f7fa;
  color: #2f3742;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.summary-chips span:first-child {
  background: #eaf4ff;
  border-color: #c8def5;
  color: #0057b8;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(210, 210, 215, .78);
}
.note-field {
  margin-top: 16px;
}
.linkedin-note,
.note-field textarea {
  min-height: 180px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.relation-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfe;
}
.relation-box a {
  display: block;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.relation-box span { color: var(--muted); }

.relationship-list {
  display: grid;
  gap: 14px;
}

.compact-relationship-list {
  gap: 8px;
  min-height: 116px;
  padding-right: 4px;
}

.relationship-list h4 {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

.relationship-list a {
  display: block;
  padding: 6px 0;
  border-top: 1px solid rgba(210, 210, 215, .78);
}

.relationship-list span {
  color: var(--muted);
}

.visit-record-list {
  display: grid;
  gap: 8px;
}

.visit-record-item {
  display: grid;
  grid-template-columns: minmax(76px, .45fr) minmax(70px, .55fr);
  gap: 4px 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(210, 210, 215, .78);
}

.visit-record-item:last-child {
  border-bottom: 0;
}

.visit-record-item span,
.visit-record-item strong {
  font-size: 12px;
  line-height: 1.35;
}

.visit-record-item span {
  color: var(--muted);
  font-weight: 800;
}

.visit-record-item strong {
  color: #263241;
}

.visit-record-item p {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.linkedin-info {
  display: grid;
  gap: 0;
}

.linkedin-info div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(210, 210, 215, .78);
}

.linkedin-info div:last-child {
  border-bottom: 0;
}

.linkedin-info span {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.linkedin-info p {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.linkedin-scroll {
  padding-right: 6px;
}

.dense-details {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 7px 10px;
}

.dense-contact-details {
  gap: 7px 10px;
}

.basic-extra-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(210, 210, 215, .78);
}

.basic-note-field {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(210, 210, 215, .78);
}

.basic-note-field h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.basic-note-field p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-tabs {
  align-items: center;
}

.review-tabs a {
  width: fit-content;
}

.review-value {
  max-width: 260px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-value.proposed {
  color: var(--primary-strong);
  font-weight: 700;
}

.pill {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 800;
  font-size: 12px;
}
.pill.high { color: #fff; background: var(--danger); }
.pill.medium { color: #fff; background: var(--warning); }
.pill.low { color: #fff; background: var(--success); }

.org-panel {
  overflow-x: auto;
  padding: 24px;
}

.org-list,
.org-list ul {
  list-style: none;
  margin: 0;
  padding-left: 28px;
}

.org-list {
  padding: 4px 0 18px;
}

.org-department-list {
  display: grid;
  gap: 22px;
}

.org-department-section {
  padding-top: 4px;
}

.org-department-section h2 {
  font-size: 17px;
  color: #2b2b30;
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(210, 210, 215, .78);
}

.org-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(210, 210, 215, .78);
  color: var(--muted);
  font-size: 13px;
}

.org-legend b {
  color: var(--primary);
  margin-right: 4px;
}

.org-list ul {
  margin-top: 12px;
}

.org-list li {
  margin: 13px 0;
}

.org-person-row {
  display: inline-grid;
  grid-template-columns: 220px 210px 78px 110px;
  gap: 18px;
  align-items: baseline;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--ink);
}

.org-person-row:hover {
  background: #f2f6fb;
  color: var(--primary);
}

.org-name {
  font-weight: 800;
  font-size: 15px;
}

.org-name::before {
  display: inline-block;
  width: 18px;
  margin-right: 7px;
  color: var(--primary);
  font-weight: 900;
}

.org-person-row.depth-0 .org-name::before { content: "◆"; }
.org-person-row.depth-1 .org-name::before { content: "●"; }
.org-person-row.depth-2 .org-name::before { content: "○"; }
.org-person-row.depth-3 .org-name::before { content: "▪"; }
.org-person-row.depth-4 .org-name::before { content: "▫"; }
.org-person-row.depth-5 .org-name::before { content: "·"; }

.org-group {
  color: #34445a;
  font-size: 13px;
  font-weight: 700;
}

.org-level {
  color: var(--muted);
  font-size: 13px;
}

.org-business {
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
}

@media (max-width: 900px) {
  .topbar { height: auto; align-items: flex-start; flex-direction: column; padding: 14px 18px; gap: 10px; }
  .nav, .account { flex-wrap: wrap; }
  .shell { padding: 18px; }
  .filter-panel, .form-grid, .form-section-grid, .stats-grid, .admin-links, .admin-workbench, .admin-overview-grid, .admin-split-grid, .detail-grid, .relation-grid, .profile-grid, .profile-compact-grid {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
  }
  .admin-side-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .admin-side-nav a {
    white-space: nowrap;
  }
  .lookup-panel, .compact-details, .linkedin-info div {
    grid-template-columns: 1fr;
  }
  .compact-result-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .identity-strip {
    max-width: none;
    justify-content: flex-start;
  }
  .compact-profile-panel {
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
  .profile-scroll-body {
    overflow: visible;
    padding-right: 0;
  }
  .profile-compact-grid {
    min-height: 0;
  }
  .linkedin-scroll, .compact-relationship-list {
    max-height: none;
  }
  .wide { grid-column: span 1; }
  .table-wrap { overflow-x: auto; }
  .org-list {
    justify-content: flex-start;
  }
  .org-person-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Apple-style internal CRM redesign */
:root {
  --ink: #15171c;
  --muted: #667085;
  --line: #d8dde5;
  --panel: #ffffff;
  --bg: #f4f6f9;
  --soft: #eef3f8;
  --primary: #0a66c2;
  --primary-strong: #084f99;
  --primary-soft: #e8f2ff;
  --danger: #c92a2a;
  --success: #1f7a4d;
  --warning: #a76205;
  --radius: 14px;
  --control-radius: 10px;
  --shadow-soft: 0 10px 28px rgba(17, 24, 39, .06);
  --shadow-card: 0 24px 64px rgba(17, 24, 39, .10);
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8fafc 0%, #f4f6f9 34%, #eef2f7 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--primary);
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.topbar {
  height: 62px;
  gap: 18px;
  padding: 0 32px;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(216, 221, 229, .86);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
  backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  min-width: 180px;
  color: #12161d;
  font-size: 16px;
  font-weight: 850;
}

.nav {
  gap: 4px;
}

.nav a,
.account a,
.logout-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  color: #344054;
  font-weight: 750;
}

.nav a:hover,
.account a:hover,
.logout-button:hover {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.account {
  gap: 10px;
  color: #667085;
  font-size: 13px;
}

.logout-form {
  margin: 0;
}

.logout-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.shell {
  max-width: 1500px;
  padding: 24px 32px 56px;
}

.login-shell {
  min-height: 100dvh;
  background:
    linear-gradient(135deg, #f9fbfd 0%, #edf3f9 48%, #f6f8fb 100%);
}

.login-card {
  width: min(460px, 100%);
  border: 1px solid rgba(216, 221, 229, .92);
  border-radius: 22px;
  padding: 38px;
  box-shadow: 0 26px 70px rgba(31, 44, 63, .14);
}

.login-card h1 {
  font-size: 28px;
  line-height: 1.15;
}

.page-head {
  margin-bottom: 16px;
}

.page-head h1 {
  font-size: 28px;
  line-height: 1.16;
  color: #101828;
}

.eyebrow {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.hint,
.muted {
  color: var(--muted);
}

label {
  gap: 8px;
  color: #344054;
  font-weight: 760;
}

input,
select,
textarea {
  min-height: 40px;
  border-color: #ccd3dd;
  border-radius: var(--control-radius);
  background: #fff;
  color: #182230;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(10, 102, 194, .72);
  box-shadow: 0 0 0 4px rgba(10, 102, 194, .13);
}

button,
.primary,
.ghost,
.link-button {
  min-height: 38px;
  border-radius: var(--control-radius);
  font-weight: 800;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

button:active,
.primary:active,
.ghost:active,
.link-button:active {
  transform: translateY(1px);
}

.primary {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
  box-shadow: 0 8px 18px rgba(10, 102, 194, .18);
}

.primary:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.ghost,
.link-button,
button {
  background: #fff;
  border-color: #d6dce5;
  color: #263241;
}

.ghost:hover,
.link-button:hover,
button:hover {
  background: #f7f9fc;
  border-color: #b9c4d1;
}

.notice,
.alert {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.notice {
  background: #ecfdf3;
  border-color: #b7e4c7;
  color: #17663a;
}

.alert {
  background: #fff1f0;
  border-color: #f2b8b5;
  color: #a12a22;
}

.lookup-panel,
.filter-panel,
.form-grid,
.table-wrap,
.panel,
.org-panel,
.profile-panel,
.form-section,
.admin-sidebar,
.admin-section-head,
.admin-overview-grid a,
.metric-strip,
.stat {
  border-color: rgba(216, 221, 229, .92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-soft);
}

.lookup-panel {
  padding: 14px;
}

.search-panel input {
  height: 42px;
  border-radius: 999px;
  background: #fff;
}

.profile-panel.compact-profile-panel {
  position: relative;
  padding: 0;
  border: 1px solid rgba(198, 208, 222, .98);
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 52%, #f7f9fc 100%);
  box-shadow: 0 28px 80px rgba(31, 44, 63, .13);
}

.compact-result-head {
  min-height: 116px;
  margin: 0;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(216, 221, 229, .82);
  background:
    linear-gradient(135deg, rgba(232, 242, 255, .92) 0%, rgba(255, 255, 255, .96) 44%, rgba(246, 249, 253, .98) 100%);
}

.compact-result-head .eyebrow {
  margin-bottom: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 760;
}

.compact-result-head h2 {
  color: #101828;
  font-size: clamp(32px, 4.3vw, 56px);
  line-height: .98;
  font-weight: 900;
}

.summary-chips {
  gap: 8px;
  align-self: flex-start;
}

.identity-strip span {
  border-color: rgba(183, 197, 216, .95);
  background: rgba(255, 255, 255, .82);
  color: #344054;
  padding: 7px 11px;
  font-size: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset;
}

.summary-chips span:first-child {
  border-color: rgba(10, 102, 194, .22);
  background: #e8f2ff;
  color: #084f99;
}

.profile-scroll-body {
  padding: 14px 16px 2px 16px;
}

.profile-actions {
  margin: 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, .72);
  border-top-color: rgba(216, 221, 229, .82);
}

.profile-actions .ghost {
  min-width: 142px;
  border-color: rgba(10, 102, 194, .24);
  color: var(--primary-strong);
  background: #f4f9ff;
}

.profile-compact-grid {
  gap: 14px;
}

.info-block {
  border-color: rgba(216, 221, 229, .88);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset;
}

.compact-info-block {
  padding: 14px;
}

.info-block h3,
.compact-info-block h3 {
  color: #182230;
  border-bottom-color: rgba(216, 221, 229, .78);
  font-size: 13px;
  font-weight: 850;
}

.details {
  gap: 9px 14px;
}

dt,
.linkedin-info span,
.relationship-list h4,
.basic-note-field h4,
.visit-record-item span {
  color: #667085;
}

dd,
.linkedin-info p,
.visit-record-item p,
.relationship-list a {
  color: #1f2937;
}

.basic-extra-details,
.basic-note-field {
  border-top-color: rgba(216, 221, 229, .82);
}

.visit-record-item,
.linkedin-info div,
.relationship-list a {
  border-bottom-color: rgba(216, 221, 229, .72);
  border-top-color: rgba(216, 221, 229, .72);
}

.visit-record-item {
  border-radius: 10px;
  padding: 9px 10px;
  background: #f8fafc;
  border: 1px solid #edf1f6;
}

.visit-record-item strong {
  color: #344054;
}

.relationship-list a {
  border-radius: 8px;
  padding: 7px 8px;
}

.relationship-list a:hover {
  background: #f4f9ff;
}

.linkedin-info div {
  padding: 8px 0;
}

.form-section {
  background: #fff;
  padding: 18px;
}

.form-section h3 {
  color: #182230;
  font-size: 14px;
  font-weight: 860;
}

.contact-entry-panel {
  padding: 24px;
}

table {
  background: #fff;
}

th {
  background: #f7f9fc;
  color: #475467;
  font-weight: 850;
}

th,
td {
  border-bottom-color: #e4e9f0;
}

tr:hover td {
  background: #f8fbff;
}

.admin-workbench {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.admin-sidebar {
  top: 82px;
  padding: 18px;
}

.admin-sidebar-head {
  border-bottom-color: rgba(216, 221, 229, .82);
}

.admin-sidebar-head h1,
.admin-section-head h2 {
  color: #101828;
  font-weight: 900;
}

.admin-side-nav {
  gap: 6px;
}

.admin-side-nav a {
  min-height: 42px;
  border-radius: 11px;
  color: #344054;
}

.admin-side-nav a:hover {
  background: #f4f8fd;
}

.admin-side-nav a.active {
  background: #e8f2ff;
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(10, 102, 194, .14);
}

.admin-section-head {
  padding: 18px 20px;
}

.admin-overview-grid a {
  min-height: 124px;
}

.admin-overview-grid a:hover {
  transform: translateY(-1px);
}

.org-panel {
  padding: 24px;
}

.org-department-section {
  border: 1px solid rgba(216, 221, 229, .86);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.org-department-section h2 {
  color: #182230;
  border-bottom-color: rgba(216, 221, 229, .82);
}

.org-legend {
  border-bottom-color: rgba(216, 221, 229, .82);
}

.org-legend b,
.org-business {
  color: var(--primary);
}

.org-person-row {
  border-radius: 10px;
}

.org-person-row:hover {
  background: #f4f9ff;
}

.manager-suggestions {
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(31, 44, 63, .16);
}

.manager-suggestions button {
  border-radius: 9px;
}

@media (max-width: 900px) {
  .topbar {
    padding: 14px 18px;
  }

  .shell {
    padding: 18px;
  }

  .compact-result-head {
    min-height: 0;
    padding: 18px;
  }

  .compact-result-head h2 {
    font-size: 34px;
  }

  .profile-scroll-body {
    padding: 12px;
  }

  .admin-workbench {
    gap: 14px;
  }
}
