:root {
  --warning-text: #b58b4b;
  --warning-bg: #fff8ec;
  --blue: #1677ff;
  --blue-hover: #0968e9;
  --blue-light: #eaf3ff;
  --ink: #202734;
  --muted: #697386;
  --border: #e9ecf0;
  --canvas: #f5f6f8;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  font-size: 14px;
  --control-border: #dce0e6;
  --surface: #fff;
  --text-secondary: #536277;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  border: 1px solid var(--control-border);
  background: white;
  border-radius: 6px;
  min-height: 34px;
  padding: 6px 14px;
  color: #444d5b;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  background: #f7f9fc;
  border-color: #b8c5d8;
}
button:disabled {
  cursor: not-allowed;
  color: #939ba7;
  background: transparent;
  border-color: transparent;
}
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #1677ff55;
  outline-offset: 3px;
}
button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 2px 4px #1677ff15;
}
button.primary:hover {
  background: var(--blue-hover);
}
button.primary:disabled {
  opacity: 0.5;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button .icon {
  width: 17px;
  height: 17px;
}
input,
select {
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: white;
  padding: 9px 11px;
  color: var(--ink);
  width: 100%;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #1677ff12;
}
input::placeholder {
  color: #a4abb6;
}
label {
  display: block;
  font-size: 13px;
  color: #515c6b;
  margin: 18px 0 7px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
h2 {
  font-size: 16px;
  font-weight: 600;
}
p {
  line-height: 1.8;
  color: var(--muted);
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 32px;
  background: #f0f6ff;
  border-bottom: 1px solid #e5edf9;
  color: #7689a6;
  font-size: 11px;
  padding: 6px 12px;
}
.trial-tag {
  color: #4884d7;
  background: #e1edff;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  gap: 20px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  white-space: nowrap;
}
.brand b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--blue);
  border-radius: 8px;
  font-size: 21px;
  color: white;
  font-weight: 550;
  box-shadow: 0 3px 7px #1677ff26;
}
.topbar-label {
  border-left: 1px solid var(--border);
  padding-left: 24px;
  color: #626d7d;
  font-size: 14px;
}
.profile-menu {
  position: relative;
  flex-shrink: 0;
}
.profile-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 6px;
  padding: 5px;
}
.profile-menu summary::-webkit-details-marker {
  display: none;
}
.profile-menu summary > .icon {
  width: 14px;
  color: #a0a8b3;
}
.profile-name {
  font-size: 13px;
  color: #515c6b;
}
.profile-menu[open] summary {
  background: #f5f7fb;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  background: #eaf2ff;
  color: #4f89df;
  flex-shrink: 0;
  letter-spacing: 0;
}
.avatar.boss {
  background: var(--blue);
  color: #fff;
}
.avatar.manager {
  background: #eaf0ff;
  color: #6a7dda;
}
.avatar.sales {
  background: #e9f5f4;
  color: #45a698;
}
.profile-dropdown {
  position: absolute;
  z-index: 30;
  right: 0;
  top: 48px;
  background: white;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 30px #172b4d1a;
  width: 210px;
}
.menu-heading {
  font-size: 12px;
  color: #8a929f;
  padding: 10px 9px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
}
.menu-item {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  padding: 10px;
  gap: 10px;
}
.menu-item:hover {
  background: #f0f5ff;
}
.workspace-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: calc(100vh - 96px);
}
.sidebar {
  background: #fcfcfd;
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.workspace {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 6px;
  margin-bottom: 32px;
}
.workspace-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #edf3fe;
  color: #598be0;
  font-size: 16px;
  border: 1px solid #e1eafb;
  border-radius: 7px;
}
.workspace strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.workspace div > span {
  display: block;
  font-size: 10px;
  color: #a3aab5;
  margin-top: 5px;
}
.nav-label {
  font-size: 11px;
  color: #a9afb9;
  padding: 0 14px;
  margin-bottom: 12px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-item {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  border-radius: 6px;
  padding: 11px 14px;
  gap: 12px;
  min-height: 42px;
  font-size: 13px;
}
.nav-item .icon {
  width: 19px;
  height: 19px;
}
.nav-item.selected {
  color: var(--blue);
  background: var(--blue-light);
  font-weight: 600;
}
.nav-item.selected:hover {
  background: #e2eeff;
}
.nav-item:disabled {
  color: #929aa7;
  opacity: 1;
}
.nav-item:disabled .icon {
  color: #aab1bd;
}
.sidebar-foot {
  margin-top: auto;
  padding: 70px 12px 0;
  color: #adb4be;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  white-space: nowrap;
}
.sidebar-foot .icon {
  width: 13px;
  height: 13px;
}
main {
  min-width: 0;
  padding: 22px 28px 32px;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #a2a9b4;
  margin-bottom: 24px;
}
.breadcrumb strong {
  font-weight: 400;
  color: #757e8d;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-heading p {
  margin-top: 8px;
  font-size: 12px;
}
.page-heading > button {
  flex-shrink: 0;
  min-height: 36px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}
.metric-label {
  display: block;
  font-size: 12px;
  color: #757f8e;
}
.metric strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin: 10px 0 7px;
}
.metric-note {
  font-size: 10px;
  color: #a6adb8;
}
.metric-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #edf4ff;
  color: #5592ef;
}
.metric-icon .icon {
  width: 21px;
  height: 21px;
}
.metric-icon.check {
  background: #eaf8f2;
  color: #51b88d;
}
.metric-icon.hierarchy {
  background: #f0edff;
  color: #8b78db;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 17px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-title h2 {
  font-size: 15px;
}
.count-pill {
  background: #f1f3f6;
  color: #8b94a3;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
}
.scope-label {
  font-size: 11px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 18px;
}
.search-field {
  display: flex;
  position: relative;
  flex: 1;
  max-width: 260px;
  min-width: 140px;
}
.search-field > .icon {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 16px;
  height: 16px;
  color: #a1aab8;
}
.search-field input {
  padding: 8px 10px 8px 33px;
  font-size: 12px;
  height: 34px;
  background: #fff;
}
.filters {
  display: flex;
  gap: 10px;
}
.filters select {
  width: 112px;
  font-size: 12px;
  padding: 6px 9px;
  height: 34px;
}
.table-wrap {
  width: 100%;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  table-layout: auto;
  min-width: 580px;
}
th {
  font-size: 11px;
  color: #919aa7;
  font-weight: 400;
  background: #fafbfc;
  padding: 12px 18px;
  border-top: 1px solid #f0f2f5;
  border-bottom: 1px solid #f0f2f5;
  white-space: nowrap;
}
td {
  font-size: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #f0f2f5;
  color: #667181;
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfcff;
}
.member-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.member-identity strong {
  font-size: 12px;
  color: #434e60;
  font-weight: 500;
}
.member-identity > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.self-label {
  font-size: 10px;
  border: 1px solid #e4e9f1;
  color: #9ca7b7;
  border-radius: 3px;
  padding: 1px 4px;
}
.role-tag {
  font-size: 11px;
  color: #79869b;
  background: #f4f6fa;
  border-radius: 4px;
  padding: 4px 8px;
}
.role-tag.boss {
  color: #5686c7;
  background: #eef5ff;
}
.role-tag.manager {
  color: #8680bb;
  background: #f4f1fd;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #49a77d;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.off {
  color: #9ca4af;
}
.table-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 200px;
}
.text-button {
  color: #448beb;
  background: transparent;
  border: 0;
  min-height: 28px;
  padding: 2px 0;
  font-size: 11px;
  white-space: nowrap;
}
.text-button:hover {
  background: transparent;
  color: #075fdd;
}
.text-button.danger {
  color: #a0a7b2;
}
.text-button.danger:hover {
  color: #df5b5b;
}
.table-footer {
  padding: 14px 20px;
  font-size: 11px;
  color: #a1a8b3;
  border-top: 1px solid #edf0f4;
}
.page-note {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 18px;
  font-size: 11px;
  color: #a3acb8;
  line-height: 1.7;
}
.page-note .icon {
  width: 14px;
  height: 14px;
}
.empty {
  text-align: center;
  padding: 42px 20px;
  color: #8c97a8;
}
.empty[hidden] {
  display: none;
}
.empty > .icon {
  display: block;
  margin: 0 auto 12px;
  width: 28px;
  height: 28px;
  color: #b4c4d8;
}
.empty strong {
  font-size: 13px;
  font-weight: 500;
}
.empty p {
  font-size: 12px;
  margin: 8px 0;
}
.personal-card {
  padding: 25px;
  max-width: 700px;
}
.personal-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.personal-identity > .avatar {
  width: 46px;
  height: 46px;
  font-size: 14px;
}
.personal-card dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  font-size: 13px;
}
.personal-card dt {
  color: #8b95a4;
}
.personal-card dd {
  margin: 0;
  color: #5b6779;
}
dialog {
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  padding: 26px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 18px 70px #1c355030;
}
dialog::backdrop {
  background: #15284750;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.dialog-head + p {
  margin-top: 12px;
}
.icon-button {
  padding: 4px;
  min-height: 28px;
  width: 28px;
  border: 0;
  color: #a1a9b5;
}
.icon-button > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.error {
  color: #d85757;
  font-size: 12px;
  min-height: 18px;
  margin-top: 12px;
  line-height: 1.6;
}
.history {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 2;
  margin: 20px 0;
  border-left: 2px solid #c3dbff;
  padding-left: 14px;
}
#notice {
  position: fixed;
  z-index: 100;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #44556b;
  border: 1px solid var(--border);
  box-shadow: 0 5px 24px #16345c20;
  padding: 12px 22px;
  border-radius: 8px;
  max-width: 90vw;
  display: none;
}
#notice.visible {
  display: block;
}
.login-page {
  min-height: calc(100vh - 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  align-items: center;
  gap: 70px;
  max-width: 1090px;
  margin: auto;
  padding: 64px 36px;
}
.login-intro .brand {
  margin-bottom: 70px;
}
.login-kicker {
  font-size: 13px;
  color: #5b8dce;
  display: block;
  margin-bottom: 18px;
}
.login-intro h1 {
  font-size: 36px;
  line-height: 1.65;
  font-weight: 600;
  white-space: pre-line;
  letter-spacing: 1px;
  color: #273a57;
}
.login-intro > p {
  margin-top: 20px;
  color: #8c9ab0;
}
.login-sketch {
  display: flex;
  gap: 30px;
  margin-top: 46px;
}
.login-sketch > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #8b9bb1;
  font-size: 12px;
}
.login-sketch .icon {
  width: 28px;
  height: 28px;
  color: #73a3e6;
}
.login {
  background: white;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  padding: 34px;
  box-shadow: 0 12px 40px #284d7910;
}
.eyebrow {
  font-size: 12px;
  color: #9ba5b5;
  margin-bottom: 12px;
}
.login h2 {
  font-size: 23px;
  margin-bottom: 10px;
}
.login > p {
  font-size: 12px;
}
.login label {
  margin-top: 22px;
}
.login input {
  height: 42px;
}
.login-submit {
  width: 100%;
  min-height: 42px;
}
.login-help {
  text-align: center;
  margin-top: 20px;
  font-size: 11px !important;
}
.demo-credentials {
  background: #f8faff;
  border: 1px solid #eaf0fa;
  border-radius: 6px;
  padding: 12px;
  margin-top: 25px;
  font-size: 11px;
  color: #96a4b9;
  line-height: 1.8;
}
.demo-credentials strong {
  font-weight: 500;
  color: #7e95b5;
}
.demo-credentials p {
  font-size: 11px;
  margin: 4px 0;
  color: #96a4b9;
}
@media (min-width: 1350px) {
  main {
    padding: 28px 36px;
  }
  .workspace-layout {
    grid-template-columns: 212px minmax(0, 1fr);
  }
  .metric {
    padding: 22px 24px;
  }
  .table-actions {
    max-width: none;
    gap: 15px;
  }
  td {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .workspace-layout {
    grid-template-columns: 166px minmax(0, 1fr);
  }
  .workspace strong {
    font-size: 11px;
  }
  .sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }
  .workspace {
    padding: 0 3px;
    gap: 7px;
  }
  .workspace-mark {
    width: 27px;
    height: 27px;
  }
  .nav-item {
    padding: 10px;
    gap: 9px;
    font-size: 12px;
  }
  .sidebar-foot {
    padding-left: 5px;
    font-size: 9px;
  }
  main {
    padding: 20px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px 14px;
  }
  .metric-icon {
    width: 31px;
    height: 31px;
    border-radius: 8px;
  }
  .metric-icon .icon {
    width: 18px;
    height: 18px;
  }
  th,
  td {
    padding-left: 14px;
    padding-right: 14px;
  }
  .member-identity {
    gap: 7px;
  }
  .member-identity .avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  .table-actions {
    gap: 7px;
    max-width: 170px;
  }
  .member-identity > div {
    display: block;
  }
  .self-label {
    margin-left: 5px;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 58px;
    padding: 0 16px;
  }
  .brand {
    font-size: 20px;
  }
  .brand b {
    width: 29px;
    height: 29px;
    font-size: 19px;
  }
  .topbar-brand {
    gap: 14px;
  }
  .topbar-label {
    padding-left: 14px;
    font-size: 12px;
  }
  .profile-name {
    display: none;
  }
  .workspace-layout {
    display: block;
  }
  .sidebar {
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: #fff;
  }
  .workspace,
  .nav-label,
  .sidebar-foot {
    display: none;
  }
  nav {
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
  }
  .nav-item {
    flex: 1;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 8px 7px;
    min-width: 70px;
    font-size: 11px;
  }
  .nav-item .icon {
    width: 20px;
    height: 20px;
  }
  main {
    padding: 18px 14px 28px;
  }
  .breadcrumb {
    margin-bottom: 18px;
    font-size: 10px;
  }
  .page-heading {
    gap: 10px;
    margin-bottom: 18px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 21px;
  }
  .page-heading p {
    font-size: 11px;
    max-width: 230px;
  }
  .page-heading > button {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 34px;
  }
  .metrics {
    gap: 8px;
    margin-bottom: 18px;
  }
  .metric {
    padding: 12px 10px;
    gap: 0;
    align-items: flex-start;
    position: relative;
  }
  .metric-icon {
    display: none;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric strong {
    font-size: 26px;
    margin: 9px 0 5px;
  }
  .metric-note {
    font-size: 9px;
  }
  .panel-heading {
    padding: 16px 14px;
  }
  .toolbar {
    padding: 0 14px 16px;
    flex-direction: column;
    gap: 10px;
  }
  .search-field {
    max-width: none;
    min-width: 0;
  }
  .filters select {
    width: 50%;
    flex: 1;
  }
  .table-wrap {
    overflow: visible;
  }
  table {
    min-width: 0;
    display: block;
  }
  thead {
    display: none;
  }
  tbody {
    display: block;
  }
  tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #edf0f5;
    padding: 14px;
    gap: 12px 18px;
  }
  td {
    padding: 0;
    border: 0;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    white-space: normal;
  }
  td::before {
    content: attr(data-label);
    color: #a5adba;
    font-size: 11px;
    flex-shrink: 0;
  }
  .member-name {
    grid-column: 1/-1;
    margin-bottom: 3px;
  }
  .member-name::before,
  .member-actions::before {
    display: none;
  }
  .member-identity strong {
    font-size: 13px;
  }
  .member-actions {
    grid-column: 1/-1;
    border-top: 1px dashed #f0f2f5;
    padding-top: 9px;
  }
  .table-actions {
    max-width: none;
    gap: 22px;
  }
  .text-button {
    font-size: 12px;
    min-height: 32px;
  }
  .table-footer {
    padding: 13px 14px;
  }
  .page-note {
    font-size: 10px;
    align-items: flex-start;
  }
  .page-note .icon {
    margin-top: 2px;
  }
  .login-page {
    display: block;
    padding: 30px 18px;
    max-width: 440px;
  }
  .login-intro .brand {
    margin-bottom: 24px;
  }
  .login-kicker,
  .login-intro h1,
  .login-intro > p,
  .login-sketch {
    display: none;
  }
  .login {
    padding: 26px;
  }
  .personal-card {
    padding: 20px;
  }
  .trial-banner {
    font-size: 10px;
  }
  .profile-dropdown {
    top: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Opening identity: independent of login and business page rendering. */
.brand {
  color: var(--blue);
  letter-spacing: 0.12em;
  font-weight: 600;
}
body.intro-open {
  overflow: hidden;
}
.startup-loading {
  padding: 48px;
  text-align: center;
  color: #8b98aa;
}
.opening {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(
    ellipse at 50% 42%,
    #eef6ff 0%,
    #f8fbff 38%,
    #fff 74%
  );
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.36s ease;
  isolation: isolate;
}
.opening::before,
.opening::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(74vw, 700px);
  aspect-ratio: 1;
  border: 1px solid #1677ff08;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: opening-ring 1.5s ease-out both;
}
.opening::after {
  width: min(96vw, 960px);
  animation-delay: 0.15s;
}
.opening-skip {
  position: absolute;
  right: 30px;
  top: 26px;
  z-index: 2;
  border-color: #e6edf7;
  background: #ffffff90;
  color: #8395ac;
  gap: 13px;
  border-radius: 18px;
  font-size: 12px;
  min-height: 34px;
  padding: 6px 15px;
}
.opening-skip:hover {
  color: var(--blue);
  border-color: #c6dcfa;
  background: #fff;
}
.opening-skip > span {
  font-size: 16px;
}
.opening-center {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 24px;
  text-align: center;
  z-index: 1;
}
.opening-emblem {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 40px);
  transform: translateX(-50%);
  width: max-content;
  animation: opening-emblem 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.opening-emblem > span {
  display: block;
  color: var(--blue);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.2em;
  padding-left: 0.2em;
  line-height: 1.5;
  white-space: nowrap;
}
#opening-quote {
  font-size: clamp(26px, 3.7vw, 48px);
  font-weight: 500;
  color: #253d5a;
  letter-spacing: 0.13em;
  line-height: 1.7;
  margin: 0;
  animation: opening-words 0.85s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
#opening-quote > span {
  display: inline-block;
  white-space: nowrap;
}
.opening-subtitle {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 20px);
  color: #8a9db6;
  font-size: 12px;
  letter-spacing: 0.25em;
  animation: opening-words 0.9s 0.4s ease both;
}
.opening-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(44px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
  color: #a4b2c5;
  font-size: 10px;
  letter-spacing: 0.15em;
  animation: opening-words 0.7s 0.3s ease both;
}
.opening-progress {
  height: 2px;
  width: 100px;
  background: #e8eff8;
  border-radius: 2px;
  overflow: hidden;
}
.opening-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  background: #83b5f9;
  transform-origin: left;
  animation: opening-progress 1.5s linear both;
}
.opening.opening-leaving {
  opacity: 0;
}
@keyframes opening-words {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes opening-emblem {
  from {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}
@keyframes opening-ring {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes opening-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 540px) {
  .opening-skip {
    right: 20px;
    top: 21px;
  }
  .opening-center {
    padding: 0 18px;
  }
  #opening-quote {
    display: grid;
    justify-items: center;
    font-size: 30px;
    letter-spacing: 0.12em;
    line-height: 1.48;
  }
  #opening-quote > span {
    position: relative;
    padding-inline-start: 0.12em;
  }
  .opening-punctuation {
    position: absolute;
    inset-inline-start: 100%;
  }
  .opening-emblem {
    bottom: calc(100% + 24px);
  }
  .opening-emblem > span {
    font-size: 25px;
  }
  .opening-subtitle {
    font-size: 10px;
    letter-spacing: 0.2em;
    top: calc(100% + 16px);
    margin: 0;
  }
  .opening-bottom {
    bottom: max(38px, env(safe-area-inset-bottom));
  }
}
@media (max-height: 450px) {
  .opening-emblem {
    display: none;
  }
  .opening-bottom {
    bottom: 15px;
  }
  .opening-subtitle {
    top: calc(100% + 6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .opening,
  .opening *,
  .opening::before,
  .opening::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Direct visit entry; optional assistance stays collapsed until requested. */
.visit-form-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 0 22px 22px;
}
.visit-form-body > .visit-customer,
.visit-form-body > .visit-assist,
.visit-form-body > .visit-field-wide,
.visit-form-body > .evidence-panel,
.visit-form-body > .visit-progress,
.visit-form-body > .voice-review,
.visit-form-body > button,
.visit-submit-state {
  grid-column: 1/-1;
}
.visit-field {
  min-width: 0;
}
.visit-field label {
  margin: 0 0 8px;
}
.visit-field textarea {
  display: block;
}
.visit-form-body > button {
  justify-self: start;
  min-height: 40px;
  padding: 8px 24px;
}
.visit-form .voice-review {
  font-size: 12px;
  margin: 0;
}
.visit-assist {
  background: #f7faff;
  border: 1px solid #e4edf9;
  border-radius: 7px;
}
.visit-assist > summary,
.visit-progress > summary {
  cursor: pointer;
  font-size: 13px;
  color: #526d90;
  padding: 15px 18px;
}
.visit-assist-body {
  padding: 0 18px 18px;
}
.visit-assist-body > label {
  margin-top: 14px;
}
.visit-progress {
  margin-bottom: 20px;
}
.visit-progress > summary {
  padding: 18px 22px;
  color: var(--ink);
}
.visit-submit-state {
  margin: 0;
  color: #476b98;
  font-size: 13px;
  line-height: 1.7;
}
.visit-submit-state:empty {
  display: none;
}
.visit-customer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.visit-customer .business-field label {
  margin: 0 0 8px;
}
.visit-customer .inline-actions {
  margin: 0;
  min-height: 38px;
}
.visit-form .evidence-panel {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  min-width: 0;
}
.visit-form .evidence-panel > .panel-heading {
  padding: 0 0 12px;
}
.visit-form .evidence-panel > .business-body {
  padding: 0;
}
.visit-form .visit-progress {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fafbfc;
}
.visit-form .visit-progress > summary {
  padding: 14px 16px;
}
@media (max-width: 700px) {
  .visit-form-body {
    grid-template-columns: 1fr;
    padding: 0 16px 18px;
    gap: 16px;
  }
  .visit-customer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 16px;
  }
  .visit-form-body > button {
    width: 100%;
    justify-self: stretch;
  }
  .visit-assist-body {
    padding: 0 13px 14px;
  }
  .visit-assist > summary {
    padding: 14px 13px;
  }
  .visit-progress {
    margin-bottom: 16px;
  }
  .visit-progress > summary {
    padding: 16px;
  }
  .visit-form .voice-review {
    font-size: 12px;
  }
  .visit-form .evidence-panel > .panel-heading {
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
}
[hidden] {
  display: none !important;
}
textarea {
  font: inherit;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
  width: 100%;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
  background: #fff;
  min-height: 70px;
}
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #1677ff12;
}
textarea::placeholder {
  color: #a0a9b6;
}
textarea:read-only {
  background: #f8faff;
}
textarea:disabled,
input:disabled {
  background: #f5f7fa;
  color: #8290a3;
}
.voice-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}
.voice-columns .panel-heading {
  border-bottom: 1px solid #f0f2f5;
  padding: 20px 22px;
}
.voice-body {
  padding: 20px 22px;
}
.voice-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.voice-controls > button {
  min-height: 40px;
  padding: 8px 18px;
}
.voice-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #92a0b3;
}
.voice-state::before {
  content: "";
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #a3b4ca;
}
.voice-state.listening {
  color: var(--blue);
}
.voice-state.listening::before {
  background: var(--blue);
  box-shadow: 0 0 0 4px #1677ff18;
}
.voice-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.85;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.voice-count {
  font-size: 10px;
  color: var(--muted);
  display: block;
  text-align: right;
  margin-top: 5px;
}
.voice-interim {
  color: #6c91c3;
  font-size: 12px;
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.voice-interim:empty {
  display: none;
}
.voice-message {
  font-size: 12px;
  color: #4a739f;
  margin: 10px 0 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.voice-message:empty {
  margin: 0 0 15px;
}
.voice-privacy {
  font-size: 10px;
  color: #a0a9b7;
  border-top: 1px solid #edf0f5;
  padding-top: 14px;
  margin-top: 16px;
  line-height: 1.8;
}
.voice-form .voice-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.voice-field {
  min-width: 0;
}
.voice-field:nth-child(n + 3) {
  grid-column: 1/-1;
}
.voice-field label {
  margin: 0 0 7px;
  font-size: 12px;
}
.voice-field input {
  font-size: 13px;
}
.voice-review {
  grid-column: 1/-1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 0;
  line-height: 1.7;
  color: #7d8b9e;
  font-size: 11px;
}
.voice-review input {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin: 2px 0;
  accent-color: var(--blue);
}
.voice-form .voice-body > button {
  grid-column: 1/-1;
  justify-self: start;
  min-height: 38px;
}
.voice-form .voice-help {
  grid-column: 1/-1;
  margin: 0;
}
@media (max-width: 1000px) {
  .voice-columns {
    grid-template-columns: 1fr;
  }
  .voice-source textarea {
    min-height: 155px;
  }
  .voice-source .voice-body {
    padding-top: 18px;
  }
  .voice-form .voice-body {
    gap: 16px;
  }
}
@media (max-width: 700px) {
  .voice-columns {
    gap: 16px;
  }
  .voice-columns .panel-heading {
    padding: 17px 16px;
  }
  .voice-body {
    padding: 17px 16px;
  }
  .voice-form .voice-body {
    gap: 16px 12px;
  }
  .voice-form .voice-body > button {
    width: 100%;
    justify-self: stretch;
  }
  .voice-review {
    font-size: 11px;
  }
  .voice-controls {
    gap: 12px;
  }
  .voice-controls > button {
    font-size: 13px;
  }
  .voice-controls .voice-state {
    font-size: 10px;
  }
  .voice-source .scope-label {
    font-size: 10px;
  }
}

.business-panel,
.evidence-panel {
  margin-bottom: 20px;
}
.business-body {
  padding: 4px 22px 22px;
}
.business-body > p {
  margin: 9px 0;
}
.business-field {
  min-width: 0;
}
.business-field label {
  margin: 15px 0 7px;
}
.business-field input,
.business-field select {
  min-height: 38px;
  font-size: 13px;
}
.business-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px 18px 18px;
  margin-bottom: 20px;
}
.business-filters .business-field {
  min-width: 120px;
  flex: 1;
  max-width: 230px;
}
.business-filters .business-field label {
  font-size: 11px;
  color: #8894a6;
}
.business-filters > button {
  margin-bottom: 1px;
  min-height: 37px;
}
.business-filters .check-label {
  min-height: 37px;
  margin: 14px 0 0;
  align-items: center;
}
.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.page-heading .inline-actions {
  margin: 0;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  padding: 6px 14px;
  color: #4a79b9;
  text-decoration: none;
  background: #fff;
  font-size: 12px;
}
.button-link:hover {
  border-color: #8cbae8;
  background: #f5f9ff;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.7;
  margin: 12px 0;
  font-size: 12px;
}
.check-label input {
  width: 15px;
  height: 15px;
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: var(--blue);
}
.owner-checks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  background: #f8faff;
  border: 1px solid #edf2fa;
  border-radius: 6px;
  padding: 0 12px;
  margin: 10px 0;
}
.empty-inline {
  padding: 28px 22px;
  text-align: center;
  background: white;
  border: 1px dashed #dce4ef;
  border-radius: 9px;
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 13px;
}
.result-count {
  font-size: 11px;
  color: #8798af;
  margin: 15px 0;
}
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 0 20px 20px;
}
.client-card {
  padding: 17px;
  border: 1px solid #e8edf4;
  border-radius: 7px;
  min-width: 0;
}
.client-card > strong {
  font-size: 14px;
  font-weight: 600;
}
.client-card > p {
  font-size: 11px;
  margin: 7px 0;
  overflow-wrap: anywhere;
}
.client-card > .text-button {
  display: flex;
  margin-top: 10px;
}
.status-chip {
  display: inline-flex;
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 5px;
  background: #f1f3f6;
  color: #8a95a5;
  margin: 3px 0;
}
.status-chip.stage-1 {
  background: var(--blue-light);
  color: #5d8cc8;
}
.status-chip.stage-2 {
  background: #fff3df;
  color: #bd9148;
}
.status-chip.stage-3 {
  background: #e6f6ef;
  color: #4a9d77;
}
.relation-card {
  padding: 18px;
  border: 1px solid #e8edf4;
  border-radius: 7px;
  margin: 15px 0;
}
.relation-card > strong {
  display: inline-block;
  margin-right: 12px;
  font-size: 14px;
}
.relation-card > p {
  margin: 8px 0;
}
.wide-dialog {
  width: min(840px, calc(100vw - 32px));
}
dialog h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 22px 0 10px;
}
dialog .dialog-context {
  margin-top: 14px;
}
dialog details {
  border-top: 1px solid #edf0f5;
  margin-top: 15px;
  padding-top: 13px;
}
dialog summary {
  cursor: pointer;
  color: #7c91af;
  font-size: 12px;
}
.detail-title {
  font-size: 15px;
  color: #435c7f;
  margin: 15px 0 6px;
}
.preserve-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #63728a;
  line-height: 1.9;
}
.exception-note {
  color: var(--warning-text);
  background: var(--warning-bg);
  border-radius: 5px;
  padding: 10px 12px;
  margin-top: 12px;
}
.business-table table {
  min-width: 620px;
  table-layout: auto;
}
.business-table td {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 300px;
  line-height: 1.8;
  vertical-align: top;
}
.business-table th {
  white-space: normal;
}
.business-table {
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fff;
}
.panel > .business-table {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}
.import-preview {
  margin-top: 20px;
  max-width: 100%;
}
.import-preview .business-table {
  max-height: 380px;
  overflow: auto;
}
.settings-form {
  max-width: 620px;
}
.settings-form > button {
  margin-top: 15px;
}
.photo-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.photo-grid img {
  width: 140px;
  height: 110px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid #e1e8f1;
}
.photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.photo-card > button {
  min-height: 28px;
}
.camera-preview {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  background: #202734;
  margin-top: 15px;
}
.location-box {
  border-top: 1px solid #edf0f5;
  margin-top: 18px;
  padding-top: 16px;
}
.location-box textarea {
  margin-top: 12px;
  max-width: 680px;
}
.submit-success:empty {
  display: none;
}
.submit-success {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #eaf8f2;
  border: 1px solid #d5eee2;
  color: #40886a;
  padding: 14px 20px;
  border-radius: 8px;
  margin: 0 0 20px;
}
.submit-success > span {
  font-size: 12px;
}
.personal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.personal-tabs > .selected {
  color: var(--blue);
  background: var(--blue-light);
  border-color: #cfdef8;
}
.summary-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.metric-button {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
  text-align: left;
  padding: 17px 18px;
  min-width: 0;
}
.metric-button strong {
  font-size: 28px;
  margin: 10px 0 8px;
}
.metric-button .metric-note {
  white-space: normal;
  font-size: 9px;
  line-height: 1.6;
}
.current-relations .inline-actions {
  gap: 12px;
}
.calendar-filters {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}
.calendar-weekday {
  text-align: center;
  color: #9aa5b5;
  font-size: 11px;
  padding: 10px 0;
}
.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 12px 10px;
  min-height: 100px;
  gap: 6px;
  border-color: #e7edf5;
  background: #fff;
}
.calendar-day strong {
  font-size: 15px;
  color: #5b6c85;
}
.calendar-day span {
  font-size: 10px;
  color: #93a0b4;
  line-height: 1.7;
}
.calendar-day small {
  font-size: 9px;
  color: #7399ca;
}
.calendar-day.today {
  border-color: #9bc4ff;
  background: #f4f8ff;
}
.calendar-day.future,
.calendar-day.not-applicable {
  background: #f8f9fb;
}
.calendar-day.future strong {
  color: #b4bdca;
}
.calendar-day .calendar-exception {
  color: #bd9559;
}
.calendar-day.future {
  border-color: #edf0f5;
}
.calendar-day:disabled {
  border: 1px solid #edf0f5;
}
.calendar-blank {
  background: transparent;
}
.calendar-body {
  min-width: 0;
}
@media (max-width: 1100px) {
  .summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .business-filters .business-field {
    max-width: none;
    min-width: 140px;
  }
  .calendar-day {
    padding: 10px 7px;
    min-height: 95px;
  }
}
@media (max-width: 700px) {
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading .inline-actions {
    gap: 8px;
  }
  .business-body {
    padding: 0 15px 17px;
  }
  .business-filters {
    padding: 0 12px 14px;
    gap: 9px;
  }
  .business-filters .business-field {
    min-width: calc(50% - 10px);
    flex-basis: calc(50% - 10px);
  }
  .business-filters .business-field label {
    margin-top: 13px;
    font-size: 10px;
  }
  .business-filters > button {
    width: 100%;
    margin-top: 5px;
  }
  .business-panel,
  .evidence-panel {
    margin-bottom: 16px;
  }
  .client-grid {
    padding: 0 14px 14px;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .client-card {
    padding: 15px;
  }
  .business-table table {
    min-width: 0;
  }
  .business-table tbody tr {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .business-table td {
    max-width: none;
    line-height: 1.7;
  }
  .business-table td::before {
    min-width: 70px;
  }
  .wide-dialog {
    width: calc(100vw - 24px);
    padding: 20px 16px;
  }
  .summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-button {
    padding: 14px;
  }
  .metric-button .metric-note {
    font-size: 10px;
  }
  .calendar-grid {
    gap: 4px;
  }
  .calendar-day {
    min-height: 91px;
    padding: 8px 4px;
    align-items: center;
    text-align: center;
    gap: 4px;
  }
  .calendar-day span {
    font-size: 9px;
  }
  .calendar-day strong {
    font-size: 13px;
  }
  .calendar-day small {
    font-size: 8px;
  }
  .calendar-weekday {
    font-size: 9px;
  }
  .calendar-filters .business-field {
    min-width: calc(50% - 10px);
  }
  .photo-grid img {
    width: 124px;
    height: 98px;
  }
  .personal-tabs > button {
    flex: 1;
    font-size: 12px;
    padding: 8px;
  }
  .submit-success {
    padding: 12px 15px;
    gap: 7px;
  }
  .submit-success > span {
    font-size: 10px;
  }
  .owner-checks {
    gap: 9px;
  }
}

/* Full photo previews preserve the permanent timestamp footer. */
.nearby-picker {
  margin: 14px 0;
  max-width: 680px;
}
.nearby-picker label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #33445e;
  font-size: 13px;
}
.nearby-picker select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}
.nearby-picker .voice-help {
  margin: 6px 0;
}
.nearby-credits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 10px;
  color: #63758b;
}
.nearby-credits a {
  color: inherit;
}
.location-map-heading strong {
  overflow-wrap: anywhere;
}
.photo-card {
  width: 180px;
  max-width: 100%;
  gap: 5px;
}
.photo-card > a {
  display: block;
  width: 100%;
}
.photo-grid .photo-card img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f2f5fa;
}
.photo-time {
  font-size: 11px;
  color: #718099;
  line-height: 1.7;
  text-align: center;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.evidence-panel .panel-heading {
  gap: 10px;
  flex-wrap: wrap;
}
.location-map {
  margin-top: 14px;
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}
.location-map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 15px;
  background: #f8faff;
}
.location-map-heading strong {
  font-size: 13px;
  color: #485e7e;
}
.location-map-heading span {
  font-size: 11px;
  color: #8091a8;
}
.location-map-area {
  min-height: 230px;
  background: #f1f5fb;
}
.location-map-area > img {
  max-width: 100%;
  height: auto;
}
.location-map-area > iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  background: #f1f5fb;
}
.location-map-placeholder {
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  padding: 20px;
  text-align: center;
  background: radial-gradient(ellipse at center, #e2edfc, transparent 70%);
}
.location-map-placeholder > .icon {
  width: 30px;
  height: 30px;
  color: #5596e9;
}
.location-map-placeholder p {
  font-size: 12px;
  color: #7185a2;
}
.location-map > .inline-actions {
  margin: 10px 14px;
}
.location-map > .inline-actions:empty {
  display: none;
}
.map-provider-note {
  padding: 0 15px 13px;
  font-size: 11px;
  color: #7d8ca1;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.map-provider-note a {
  color: #6080ac;
}
.location-map .map-provider-note .voice-help {
  margin: 8px 0 5px;
}
.location-map-area > .voice-help {
  padding: 20px;
}
@media (max-width: 700px) {
  .photo-card {
    width: calc(50% - 6px);
  }
  .photo-grid .photo-card img {
    height: 118px;
  }
  .photo-time {
    font-size: 10px;
  }
  .location-map-area > iframe {
    height: 260px;
  }
  .location-map-heading {
    padding: 11px 12px;
  }
  .map-provider-note {
    padding: 0 12px 12px;
  }
}
.visit-customer > .voice-help {
  grid-column: 1;
  margin: 0;
}
.visit-customer > .text-button {
  justify-self: end;
  font-size: 11px;
}
.visit-customer > .primary {
  min-height: 38px;
}
.client-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.client-picker legend {
  font-weight: 600;
  margin-bottom: 10px;
}
.client-picker > .business-field:last-child {
  grid-column: 1/-1;
}
.client-picker select,
.client-picker input {
  width: 100%;
}
@media (max-width: 700px) {
  .client-picker {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bank-picker {
  position: relative;
}
.bank-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  max-height: 210px;
  overflow: auto;
  background: white;
  border: 1px solid #d8e3f0;
  border-radius: 7px;
  box-shadow: 0 6px 18px #17365c22;
}
.bank-suggestions [role="option"] {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
}
.bank-suggestions [role="option"]:hover,
.bank-suggestions [aria-selected="true"] {
  background: #edf5ff;
  color: #155bbc;
}
.assistant-workspace {
  padding: 24px;
  max-width: 880px;
}
.assistant-workspace form {
  display: grid;
  gap: 10px;
}
.assistant-workspace form button {
  justify-self: end;
}
.assistant-history article {
  padding: 14px;
  background: #f5f8fc;
  border-radius: 8px;
  margin: 12px 0;
}
.assistant-history article p {
  margin: 8px 0;
}
.assistant-history article strong {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant-collapse {
  position: absolute;
  right: 16px;
  top: 12px;
  z-index: 1;
}
.assistant-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.assistant-title-row > .breadcrumb {
  margin: 0;
}
.assistant-trigger {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 5px;
  border: 0;
  background: #edf4ff;
  color: #2974ca;
  border-radius: 8px;
}
.assistant-trigger span:empty {
  display: none;
}
.assistant-inline {
  position: relative;
  border: 1px solid #dae5f2;
  background: white;
  border-radius: 10px;
  margin: 12px 0 20px;
}
.assistant-inline .assistant-workspace {
  max-width: none;
  border: 0;
  margin: 0;
  padding: 16px;
}
.assistant-inline h1 {
  font-size: 16px;
}
.assistant-inline .assistant-history {
  max-height: 30vh;
  overflow: auto;
}
.assistant-inline .assistant-collapse {
  right: 10px;
  top: 8px;
}
.visit-customer > .client-picker {
  grid-column: 1/-1;
}
.date-trigger {
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  background: white;
  font-variant-numeric: tabular-nums;
}
.date-mark {
  width: 15px;
  height: 14px;
  border: 1.5px solid #5689c9;
  border-radius: 3px;
  background: linear-gradient(
    to bottom,
    transparent 3px,
    #5689c9 3px,
    #5689c9 4px,
    transparent 4px
  );
  flex: none;
}
.date-dialog {
  width: min(348px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid #dde6f1;
  border-radius: 14px;
  box-shadow: 0 16px 60px #1e365433;
}
.date-dialog::backdrop {
  background: #16283d45;
}
.date-head,
.date-nav,
.date-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.date-head h2 {
  font-size: 16px;
}
.date-nav {
  margin: 14px 0;
  padding: 7px;
  border-radius: 8px;
  background: #f4f7fc;
}
.date-nav input,
.date-nav select {
  min-width: 0;
  width: auto;
  max-width: 80px;
  margin: 0;
  font-size: 14px;
}
.date-days,
.date-months {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.date-months {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.date-weekday {
  text-align: center;
  color: #72839a;
  font-size: 12px;
  padding: 6px;
}
.date-cell {
  border: 0;
  min-width: 0;
  min-height: 38px;
  padding: 5px;
  border-radius: 8px;
}
.date-cell.date-today {
  box-shadow: inset 0 0 0 1px #71a9ee;
}
.date-cell[aria-pressed="true"] {
  background: #176bd0;
  color: white;
}
.date-foot {
  justify-content: flex-end;
  margin-top: 12px;
  border-top: 1px solid #e7edf4;
  padding-top: 8px;
}
.date-nav {
  justify-content: center;
}
.year-choice {
  font-size: 15px;
  font-weight: 600;
  color: #315780;
  background: white;
}
.year-list {
  position: relative;
  height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
}
.year-row {
  width: 100%;
  height: 42px;
  display: flex;
  justify-content: center;
  border: 0;
  font-variant-numeric: tabular-nums;
}
.year-row[aria-pressed="true"] {
  background: #edf4ff;
  color: #1565bc;
  font-weight: 600;
}
.year-row:hover {
  background: #f2f7ff;
}
.performance-board {
  margin: 0 0 24px;
}
.performance-period {
  margin: 8px 0 12px;
  color: #65778e;
  font-size: 12px;
}
.performance-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.performance-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  gap: 8px;
  padding: 18px 22px;
  min-width: 0;
  border: 1px solid #dde6ef;
  border-radius: 12px;
  background: #fff;
  color: #273f59;
}
.performance-card > span {
  font-size: 14px;
  font-weight: 600;
}
.performance-card strong {
  font-size: 32px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.performance-card strong small {
  font-size: 12px;
  margin-left: 6px;
  font-weight: 400;
}
.performance-card > small {
  font-size: 11px;
  color: #667a91;
}
.performance-card.performance-visits {
  background: #174d82;
  color: white;
  border-color: #174d82;
}
.performance-visits > small {
  color: #e0ecf9;
}
.performance-intent strong {
  color: #2467ac;
}
.performance-cooperation strong {
  color: #18775f;
}
.performance-split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(255px, 1fr);
  gap: 16px;
}
.performance-split > .panel {
  min-width: 0;
}
.performance-trend,
.performance-progress {
  padding: 0 20px 18px;
}
.performance-bars {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  margin-top: 10px;
}
.performance-bars .trend-column {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #345879;
}
.trend-column > svg {
  width: 100%;
  height: 85px;
  fill: #639bdd;
}
.trend-column:hover svg,
.trend-column:focus-visible svg {
  fill: #205f9e;
}
.trend-column small {
  font-size: 10px;
}
.performance-progress > div {
  display: grid;
  grid-template-columns: 7em minmax(25px, 1fr) 4em;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  font-size: 12px;
}
.performance-progress strong {
  text-align: right;
}
.performance-progress progress {
  width: 100%;
  height: 8px;
  accent-color: #339781;
}
.performance-board .business-panel > div > .performance-period {
  margin-left: 20px;
}
.performance-exceptions {
  color: #875717;
  background: #fff8ed;
  border-color: #e8d4b6;
}
.performance-bars {
  justify-content: flex-start;
  gap: 4px;
  border-bottom: 0;
}
.performance-bars .trend-column {
  flex: 1 0 38px;
  max-width: 54px;
}
.trend-date {
  display: block;
  width: 100%;
  border-top: 1px solid #d4dfec;
  padding-top: 4px;
  font-size: 10px;
  text-align: center;
  color: #677b94;
  white-space: nowrap;
}
@media (max-width: 850px) {
  .performance-split {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 600px) {
  .performance-cards {
    gap: 6px;
  }
  .performance-card {
    padding: 12px 8px;
    gap: 6px;
  }
  .performance-card > span {
    font-size: 12px;
  }
  .performance-card strong {
    font-size: 24px;
  }
  .performance-card > small {
    font-size: 10px;
  }
  .performance-trend,
  .performance-progress {
    padding: 0 12px 14px;
  }
  .performance-split .panel-heading {
    padding-bottom: 8px;
  }
}
.staff-note,
.staff-zero {
  font-size: 12px;
  color: #62738a;
  margin: 12px 0;
}
.staff-zero {
  border-top: 1px solid #e7edf3;
  padding-top: 10px;
}
.staff-zero summary {
  cursor: pointer;
}
.staff-zero p {
  padding: 8px 0;
  line-height: 1.8;
}
.visit-log {
  display: grid;
  gap: 16px;
}
.log-date,
.visit-log article {
  padding: 12px 16px;
}
.log-date {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f3f7fc;
}
.log-date span {
  font-size: 12px;
  color: #61758d;
}
.visit-log article {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-top: 1px solid #edf1f6;
}
.visit-log time {
  font-size: 13px;
  color: #57728e;
  font-variant-numeric: tabular-nums;
}
.log-person {
  display: flex;
  align-items: center;
  gap: 8px;
}
.log-person small {
  color: #875719;
  background: #fff2dc;
  padding: 2px 6px;
  border-radius: 4px;
}
.log-target {
  margin: 4px 0;
  font-size: 13px;
  color: #435b75;
}
.log-description {
  margin: 0;
  color: #67788b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.visit-log article button {
  min-height: 30px;
  padding: 3px 6px;
}
@media (max-width: 600px) {
  .visit-log article {
    padding: 12px 9px;
    gap: 6px;
  }
}
.staff-ledger {
  padding: 0 18px 12px;
}
.ledger-note {
  font-size: 12px;
  color: #62758b;
  margin: 0 0 12px;
}
.staff-ledger table {
  display: table;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.staff-ledger thead {
  display: table-header-group;
}
.staff-ledger tbody {
  display: table-row-group;
}
.staff-ledger tr {
  display: table-row;
}
.staff-ledger th,
.staff-ledger td {
  display: table-cell;
  width: 21%;
  padding: 9px 3px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f5;
  font-variant-numeric: tabular-nums;
}
.staff-ledger th:first-child {
  width: 37%;
  text-align: left;
  padding-left: 10px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.staff-ledger thead th {
  background: #f1f5fa;
  font-size: 12px;
}
.staff-ledger tbody th {
  font-size: 13px;
  font-weight: 550;
  background: none;
}
.staff-ledger td::before {
  display: none;
}
.staff-ledger .ledger-sort {
  border: 0;
  padding: 4px;
  background: transparent;
  color: #536a81;
  font-size: 12px;
  white-space: normal;
}
.staff-ledger [aria-sort="descending"] button,
.staff-ledger [aria-sort="ascending"] button {
  color: #124f89;
  font-weight: 650;
}
.staff-ledger .ledger-value {
  border: 0;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 650;
  color: #315f95;
  min-width: 38px;
}
.staff-ledger [data-metric="cooperation"] .ledger-value {
  color: #186c53;
}
.ledger-empty {
  color: #8795a2;
}
.staff-ledger .ledger-flag {
  display: block;
  margin-top: 3px;
  background: #fff3df;
  color: #875500;
  border: 0;
  padding: 1px 6px;
  min-height: 20px;
  font-size: 10px;
}
@media (max-width: 600px) {
  .staff-ledger {
    padding: 0 8px 8px;
  }
  .staff-ledger th:first-child {
    width: 32%;
    padding-left: 5px;
  }
  .staff-ledger .ledger-sort {
    font-size: 11px;
    padding: 3px;
  }
  .staff-ledger .ledger-value {
    min-width: 32px;
  }
}
.staff-ledger .employee-link {
  padding: 3px 0;
  min-height: 30px;
  border: 0;
  background: transparent;
  text-align: left;
  color: #245781;
  font-weight: 600;
  white-space: normal;
}
.employee-link:hover {
  text-decoration: underline;
}
.staff-ledger .ledger-value {
  background: transparent;
}
.staff-ledger [data-metric="cooperation"] .ledger-value {
  background: transparent;
}
.staff-ledger [data-metric="cooperation"] meter::-webkit-meter-optimum-value {
  background: #27846c;
}
.employee-feed {
  border-left: 2px solid #deebf4;
  padding-left: 16px;
  margin-top: 18px;
}
.employee-feed article {
  padding: 0 0 18px;
}
.employee-feed article > div {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
  color: #61778b;
  font-size: 11px;
}
.employee-feed article > div span {
  color: #275d85;
  background: #edf4fb;
  padding: 3px 7px;
  border-radius: 5px;
}
.employee-feed article > p {
  margin: 5px 0;
}
.staff-report {
  border: 1px solid #e1e6eb;
  border-radius: 14px;
  box-shadow: 0 2px 8px #23395406;
  background: #fff;
}
.staff-report > .panel-heading {
  padding: 20px 22px 16px;
  align-items: center;
}
.staff-report .ledger-count {
  color: #667584;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.staff-report .staff-ledger {
  padding: 0 20px 6px;
}
.staff-report thead th,
.staff-report thead th:first-child {
  background: #f5f7f9;
  color: #536578;
  padding: 4px 8px;
  font-weight: 550;
}
.staff-report thead th:first-child {
  border-radius: 6px 0 0 6px;
}
.staff-report thead th:last-child {
  border-radius: 0 6px 6px 0;
}
.staff-report tbody tr:hover {
  background: #f8fafa;
}
.staff-report tbody th,
.staff-report tbody td {
  padding: 9px 6px;
  border-bottom: 1px solid #edf0f1;
}
.staff-report tbody tr:last-child > * {
  border-bottom: 0;
}
.staff-report .employee-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #213342;
  line-height: 1.4;
  max-width: 100%;
}
.ledger-avatar {
  display: inline-grid;
  place-items: center;
  background: #e9eff3;
  color: #426075;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  flex: none;
  font-size: 13px;
}
.staff-report .ledger-value {
  background: transparent;
  color: #314452;
  font-weight: 550;
}
.staff-report [data-metric="cooperation"] .ledger-value {
  color: #15695a;
  font-weight: 700;
}
.staff-report .ledger-flag {
  display: inline-flex;
  margin: 0 0 0 5px;
  background: #fff6e8;
  color: #865521;
}
.staff-report .ledger-empty {
  color: #82909a;
}
.staff-report .staff-zero {
  margin: 4px 0 8px;
}
.staff-report button:focus-visible {
  outline: 2px solid #287b8a;
  outline-offset: 1px;
}
@media (max-width: 650px) {
  .staff-report > .panel-heading {
    padding: 15px 12px;
  }
  .staff-report .staff-ledger {
    padding: 0 6px 6px;
  }
  .staff-report th:first-child {
    width: 39%;
  }
  .staff-report thead th {
    padding: 4px 1px;
  }
  .staff-report .employee-link {
    gap: 4px;
  }
  .staff-report .ledger-avatar {
    display: none;
  }
  .staff-report tbody th,
  .staff-report tbody td {
    padding: 7px 2px;
  }
  .staff-report .ledger-flag {
    margin: 2px 0;
  }
  .staff-report .ledger-sort {
    font-size: 11px;
  }
}
/* Management workspace: one reading path, with separate calendar and analysis views. */
.management-report {
  max-width: 1280px;
  margin-inline: auto;
  color: var(--ink);
}
.management-report > .page-heading {
  margin: 0;
  padding: 10px 0 18px;
}
.management-report > .page-heading h1 {
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.management-report > .page-heading p,
.management-report .voice-help {
  color: var(--muted);
}
.management-report .report-tabs {
  display: inline-flex;
  flex-direction: row;
  gap: 3px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--canvas);
}
.report-tabs button {
  padding: 6px 14px;
  min-height: 32px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font-size: 13px;
}
.report-tabs button[aria-pressed="true"] {
  color: var(--blue);
  background: var(--blue-light);
  border-color: var(--blue-light);
  font-weight: 600;
  box-shadow: 0 1px 3px #28394d10;
}
.report-filters {
  margin: 8px 0 14px;
}
.report-filters summary {
  width: fit-content;
  margin-left: auto;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.report-filters[open] .business-filters {
  margin: 8px 0;
}
.report-summary,
.management-report .business-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 6px #1a355505;
}
.report-summary {
  padding: 18px 20px;
  margin-bottom: 16px;
}
.report-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.report-summary-head h2,
.management-report .panel-heading h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}
.report-summary-head span {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.report-summary .performance-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.report-summary .performance-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  padding: 14px 16px;
  gap: 6px;
}
.report-summary .performance-card:hover,
.report-summary .performance-card:focus-visible {
  background: var(--blue-light);
  border-color: var(--blue);
}
.report-summary .performance-card strong {
  font-size: clamp(27px, 3.6vw, 39px);
  color: var(--ink);
  letter-spacing: -0.04em;
}
.report-summary .performance-card small {
  color: var(--muted);
  letter-spacing: 0;
}
.management-report .performance-split {
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, 1fr);
  gap: 16px;
}
.management-report .performance-bars {
  gap: 2px;
}
.management-report .performance-bars .trend-column {
  min-width: 20px;
  flex: 1 0 20px;
}
.management-report .trend-column > svg {
  fill: var(--blue);
  height: 100px;
}
.management-report .trend-column:hover > svg {
  fill: var(--blue-hover);
}
.management-report .trend-date {
  color: var(--muted);
  font-size: 9px;
}
.management-report .performance-progress progress {
  accent-color: var(--blue);
}
.management-report .staff-ledger .ledger-value,
.management-report .staff-ledger [data-metric="cooperation"] .ledger-value {
  color: var(--ink);
}
.management-report .employee-link,
.management-report .staff-ledger [aria-sort="descending"] button,
.management-report .staff-ledger [aria-sort="ascending"] button {
  color: var(--blue);
}
.management-report .business-panel > .panel-heading {
  padding: 17px 20px 13px;
}
@media (min-width: 701px) {
  .report-filters:not([open]) {
    margin-top: -32px;
    margin-bottom: 20px;
    height: 20px;
    pointer-events: none;
  }
  .report-filters summary {
    pointer-events: auto;
  }
}
@media (max-width: 850px) {
  .management-report .performance-split {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .management-report .performance-bars .trend-column {
    min-width: 28px;
  }
}
@media (max-width: 600px) {
  .report-summary {
    padding: 13px 10px;
  }
  .report-summary .performance-cards {
    gap: 5px;
  }
  .report-summary .performance-card {
    padding: 10px 6px;
  }
  .report-summary .performance-card > span {
    font-size: 12px;
  }
  .report-summary .performance-card > small {
    font-size: 10px;
  }
  .report-tabs button {
    padding: 5px 10px;
  }
  .management-report .business-panel > .panel-heading {
    padding: 14px 12px 10px;
  }
}
.management-report .staff-report .employee-link {
  color: var(--blue);
}
.management-report .ledger-avatar {
  background: var(--blue-light);
  color: var(--blue);
}
.management-report .staff-report thead th {
  background: var(--canvas);
  color: var(--ink);
}
.management-report .staff-report tbody tr:hover {
  background: var(--blue-light);
}
.management-report .performance-exceptions,
.management-report .ledger-flag {
  color: var(--warning-text);
  background: var(--warning-bg);
  border-color: var(--border);
}
.crm-directory {
  min-width: 0;
  border: 1px solid #dce5ed;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.crm-count {
  margin: 0;
  padding: 12px 15px;
  font-size: 13px;
  font-weight: 600;
  color: #354f64;
}
.crm-scroll {
  overflow: auto;
  max-height: 68vh;
}
.crm-directory table {
  display: table;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 620px;
  table-layout: auto;
}
.crm-directory thead {
  display: table-header-group;
}
.crm-directory tbody {
  display: table-row-group;
}
.crm-directory tr {
  display: table-row;
}
.crm-directory th,
.crm-directory td {
  display: table-cell;
  text-align: left;
  white-space: nowrap;
  max-width: 24em;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 12px;
  font-size: 13px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  line-height: 1.5;
}
.crm-directory th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f6f9;
  color: #586c7e;
  font-size: 12px;
}
.crm-directory td:before {
  display: none;
}
.crm-directory tbody tr:hover td {
  background: #f6faff;
}
.crm-directory .crm-name,
.crm-directory .crm-more {
  border: 0;
  background: none;
  min-height: 26px;
  padding: 2px 0;
  color: #216899;
}
.crm-directory .crm-name {
  font-weight: 600;
}
.crm-directory .crm-more {
  margin-left: 6px;
  font-size: 11px;
}
.crm-stage {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: #eef3f7;
  color: #536979;
}
.crm-stage.stage-2 {
  background: #edf3ff;
  color: #3c6595;
}
.crm-stage.stage-3 {
  background: #eaf5ef;
  color: #25674a;
}
.crm-muted {
  color: #788796;
  font-size: 11px;
  margin-left: 4px;
}
@media (max-width: 700px) {
  .crm-directory table, .crm-directory tbody { display: block; min-width: 0; }
  .crm-directory thead { display: none; }
  .crm-directory tr { display: block; padding: 8px 12px; border-bottom: 1px solid var(--border); }
  .crm-directory td { display: flex; gap: 12px; justify-content: space-between; align-items: center; white-space: normal; max-width: none; overflow-wrap: anywhere; border: 0; padding: 3px 0; }
  .crm-directory td:before { display: block; content: attr(data-label); color: var(--muted); flex: 0 0 5em; }
  .crm-scroll { max-height: none; overflow: visible; }
  .crm-directory td:first-child,
  .crm-directory th:first-child {
    position: static;
    background: white;
  }
  .crm-directory th:first-child {
    z-index: 3;
    background: #f2f6f9;
  }
}
.visit-log .log-person small {
  background: var(--canvas);
  color: var(--muted);
}
.wide-dialog > form > .dialog-head {
  position: sticky;
  top: -26px;
  z-index: 4;
  background: white;
  margin: -26px -26px 14px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 700px) {
  .wide-dialog > form > .dialog-head {
    top: -20px;
    margin: -20px -16px 12px;
    padding: 12px 16px;
  }
}
.result-detail-summary,
.result-detail-day > header,
.result-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.result-detail-summary {
  justify-content: space-between;
  background: var(--blue-light);
  padding: 12px 14px;
  border-radius: 8px;
}
.result-detail-summary span,
.result-detail-day header span,
.result-detail-day time {
  font-size: 12px;
  color: #637187;
  font-variant-numeric: tabular-nums;
}
.result-detail-day {
  margin-top: 18px;
}
.result-detail-day > header {
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.result-detail-day article {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.result-detail-meta span,
.result-detail-meta small {
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--canvas);
  font-size: 11px;
}
.result-detail-day .result-detail-client {
  margin: 5px 0;
  color: var(--ink);
}
.result-detail-day .result-detail-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 4px 0;
  line-height: 1.65;
  color: #536277;
}
/* Shared interaction states and modal layout. */
textarea {
  font: inherit;
  color: var(--ink);
  border-color: var(--control-border);
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
dialog:not(.date-dialog):has(> form > .dialog-head) {
  padding: 20px;
  border-radius: 12px;
  border-color: var(--border);
}
dialog > form > .dialog-head,
.wide-dialog > form > .dialog-head {
  position: sticky;
  top: -20px;
  z-index: 4;
  background: var(--surface);
  margin: -20px -20px 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.dialog-head h2 {
  color: var(--ink);
  font-size: 17px;
}
.preserve-text,
.result-detail-copy {
  color: var(--text-secondary);
}
.date-cell:focus-visible,
.year-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
@media (max-width: 700px) {
  dialog > form > .dialog-head,
  .wide-dialog > form > .dialog-head {
    top: -20px;
    margin: -20px -20px 12px;
    padding: 12px 20px;
  }
}

/* Phone controls: prevent focus zoom and provide comfortable touch targets. */
@media (max-width: 700px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { font-size: 16px; min-height: 44px; }
  button, .button-link, .crm-directory .crm-name, .crm-directory .crm-more,
  .staff-ledger .employee-link, .staff-ledger .ledger-sort, .staff-ledger .ledger-value { min-height: 44px; }
  .check-label, .voice-review, details > summary { min-height: 44px; align-content: center; }
  .inline-actions { row-gap: 8px; }
  .page-heading, .panel-heading { flex-wrap: wrap; }
  .page-heading > *, .panel-heading > * { min-width: 0; }
  .log-description, .log-target, .relation-card, .submit-success { overflow-wrap: anywhere; }
  dialog { max-height: calc(100dvh - 24px); max-width: calc(100vw - 24px); }
  .visit-form .visit-submit-state { overflow-wrap: anywhere; }
  .visit-form button[type="submit"] { width: 100%; min-height: 48px; }
}

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

.customer-suggestions { display: grid; gap: 6px; padding: 10px; margin: 6px 0 12px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--surface); }
.customer-suggestions[hidden] { display: none; }
.customer-suggestion { justify-content: flex-start; text-align: left; min-height: 44px; white-space: normal; overflow-wrap: anywhere; }

.staff-ledger .ledger-with-new-customers th,
.staff-ledger .ledger-with-new-customers td {
  width: auto;
}
.staff-ledger .ledger-with-new-customers th:first-child {
  width: 26%;
}
@media (max-width: 650px) {
  .staff-ledger .ledger-with-new-customers th:first-child {
    width: 24%;
  }
  .ledger-with-new-customers .ledger-sort {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
