:root {
  --pad: 14px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html,
body,
#root,
.providerRoot {
  min-height: 100%;
  margin: 0;
}

body {
  margin: 0;
  background: var(--colorNeutralBackground1);
  color: var(--colorNeutralForeground1);
}

.providerRoot {
  min-height: 100vh;
  background: var(--colorNeutralBackground1);
  color: var(--colorNeutralForeground1);
}

.appShell {
  min-height: 100vh;
  background: var(--colorNeutralBackground1);
  color: var(--colorNeutralForeground1);
}

.topBar {
  padding: var(--pad);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: var(--colorNeutralBackground1);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.activeUser {
  font-size: 13px;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.groupBar {
  padding: 10px var(--pad) 0;
  background: var(--colorNeutralBackground1);
}

.main {
  display: flex;
  gap: 12px;
  padding: 12px var(--pad) 10px;
  align-items: flex-start;
  min-height: 0;
}

.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.contactCard {
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.contactCard:hover {
  transform: translateY(-1px);
}

.contactCard.selected {
  outline: 2px solid var(--colorBrandStroke1);
  outline-offset: 1px;
}

.muted {
  opacity: .72;
}

.row {
  display: flex;
  align-items: center;
}

.gap8 {
  gap: 8px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loadingCenter {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  align-items: center;
  justify-content: center;
  opacity: .9;
}

.authLoading {
  min-height: 60vh;
}

.loginShell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: var(--colorNeutralBackground1);
}

.loginCard {
  width: min(420px, 100%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--colorNeutralStroke2);
  border-radius: 12px;
  background: var(--colorNeutralBackground2);
  box-shadow: var(--shadow8);
}

.copyright {
  margin-top: 8px;
  font-size: 12px;
  opacity: .65;
  text-align: center;
}

.lampDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 12px;
  line-height: 18px;
}

.overfly {
  width: 360px;
  box-sizing: border-box;
  border-left: 1px solid var(--colorNeutralStroke2);
  padding-left: 16px;
}

.overflyHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0 8px;
}

.overflyBody {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  align-items: center;
}

.k {
  opacity: .72;
  font-size: 12px;
}

.v {
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.actionRow {
  flex-wrap: wrap;
}

.contactCardContent {
  padding: 6px 12px 8px;
}

.contactInfoGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(125px, 48%);
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: start;
}

.contactNameLine {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.contactName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.contactPhone,
.contactDepartment,
.contactTitle {
  min-width: 0;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.contactStatus {
  display: flex;
  align-items: center;
}


.contactCard .actionRow,
.contactCardFooter {
  min-width: 0;
}

@media (max-width: 420px) {
  .contactInfoGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contactPhone,
  .contactDepartment,
  .contactTitle {
    text-align: left;
  }

  .contactInfoGrid > div:empty {
    display: none;
  }
}

.appFooter {
  margin-top: 6px;
  padding: 10px var(--pad) 14px;
  text-align: center;
  font-size: 12px;
  opacity: .62;
  border-top: 1px solid var(--colorNeutralStroke2);
}

@media (max-width: 1050px) {
  .overfly {
    display: none;
  }
}

@media (max-width: 720px) {
  .topBar,
  .controls {
    align-items: stretch;
  }

  .controls {
    width: 100%;
  }

  .controls > *:first-child {
    flex: 1 1 100%;
  }

  .main {
    padding-top: 8px;
  }
}
