.check.stack-item {
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
}

.check.stack-item > input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
}

.check.stack-item > span {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.check.stack-item > span strong,
.check.stack-item > span small {
  display: block;
}

.check.stack-item > span small {
  color: var(--muted);
  font-weight: 400;
}

.quick-edit-form {
  display: grid;
  grid-template-columns: minmax(155px, 1fr) minmax(165px, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 410px;
}

.quick-edit-form select {
  min-width: 0;
}

.compact-update-form {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 16px;
}

.compact-update-form .form-grid,
.form-grid {
  align-items: start;
}

.compact-followup-grid {
  margin-bottom: 12px;
}

.form-grid input:not([type="checkbox"]),
.form-grid select {
  min-height: 44px;
  height: 44px;
}

.form-grid input[type="date"] {
  line-height: 1.2;
}

.assignment-list {
  display: grid;
  gap: 3px;
}

.assignment-list .table-sub {
  margin-top: 0;
}

.phone {
  white-space: nowrap !important;
}

.phone-lines {
  display: grid;
  gap: 2px;
}

.phone-lines span {
  display: block;
  white-space: nowrap;
}

.vip-list-table {
  min-width: 1480px;
}

.vip-date {
  min-width: 108px;
  white-space: nowrap;
}

.vip-name-cell {
  min-width: 155px;
}

.vip-cg-cell,
.vip-assignee-cell {
  min-width: 180px;
}

.compact-cell-select {
  min-width: 170px;
  padding: 7px 9px;
}

.status-inline-form {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 235px;
}

.status-picker {
  position: relative;
  flex: 1 1 auto;
  min-width: 165px;
}

.status-picker-dot {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 11px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  transform: translateY(-50%);
  pointer-events: none;
  background: #8A817B;
}

.status-picker select {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 7px 28px;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.status-picker[data-tone="neutral"] select {
  background: #F5F1EE;
  border-color: #DDD4CE;
  color: #5B625F;
}
.status-picker[data-tone="neutral"] .status-picker-dot { background: #8A817B; }

.status-picker[data-tone="success"] select {
  background: #E7F0ED;
  border-color: #B9D0CA;
  color: #2D4F48;
}
.status-picker[data-tone="success"] .status-picker-dot { background: #385B54; }

.status-picker[data-tone="info"] select {
  background: #E9F0EE;
  border-color: #C3D5D0;
  color: #385B54;
}
.status-picker[data-tone="info"] .status-picker-dot { background: #69948C; }

.status-picker[data-tone="warning"] select {
  background: #FAF0DB;
  border-color: #DFC48E;
  color: #78521D;
}
.status-picker[data-tone="warning"] .status-picker-dot { background: #B67A2F; }

.status-picker[data-tone="danger"] select {
  background: #F8EAE5;
  border-color: #DBB7AC;
  color: #81493C;
}
.status-picker[data-tone="danger"] .status-picker-dot { background: #9C5949; }

.auto-save-state {
  display: inline-block;
  flex: 0 0 52px;
  min-width: 52px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.auto-save-state[data-state="saving"] {
  opacity: .72;
}

.auto-save-state[data-state="saved"] {
  color: var(--sheet-dark-green);
}

.auto-save-state[data-state="error"] {
  color: #8B4E3E;
}

.vip-notes {
  min-width: 190px;
  max-width: 320px;
  white-space: normal;
  color: var(--muted);
  line-height: 1.35;
}

.table-action-link {
  display: block;
  width: fit-content;
  margin-top: 4px;
  color: var(--sheet-brown);
  font-size: 11px;
  font-weight: 800;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.vip-actions-cell {
  min-width: 210px;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 78px;
}

.members-list-table {
  min-width: 1320px;
}

.member-assignment-stack {
  display: grid;
  gap: 6px;
}

.member-assignee-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.member-assignee-inline select {
  flex: 1 1 auto;
  min-width: 180px;
  padding: 7px 9px;
}

.dashboard-summary {
  margin-bottom: 24px;
}

.summary-heading {
  margin: 0 0 10px 2px;
}

.summary-heading h2 {
  margin-top: 2px;
  font-size: 20px;
}

.stat-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-actions-heading {
  text-align: right;
}

.user-actions-cell {
  width: 1%;
  min-width: 390px;
  white-space: nowrap;
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 7px;
}

.user-actions > .button,
.user-actions > form,
.user-actions > form > .button {
  width: auto;
  flex: 0 0 auto;
}

.user-actions > .button,
.user-actions > form > .button {
  min-height: 34px;
  padding: 6px 11px;
  justify-content: center;
  white-space: nowrap;
}

.user-actions > form {
  display: inline-flex;
  margin: 0;
}

.user-delete-action {
  margin-left: 3px;
}

/* Hover should not recolour the interface. Keep hover states visually stable. */
a:hover { color: inherit; }
.button:hover { transform: none; }
.button-primary:hover { background: var(--sheet-dark-green); color: white; }
.button-secondary:hover { background: var(--sheet-cream); border-color: #D9C8BC; color: var(--sheet-brown); }
.button-small:hover { background: white; border-color: var(--border); color: var(--sheet-dark-green); }
.button-danger-outline:hover { background: transparent; border-color: #C99E91; color: #8B4E3E; }
.nav a:hover { background: transparent; color: rgba(255,255,255,.87); }
.link-button:hover { color: rgba(255,255,255,.76); }
.scope-tab:hover { background: transparent; color: var(--muted); }
.scope-tab.is-active:hover { background: var(--sheet-dark-green); color: white; }
.cg-card:hover { border-color: #DCCDC3; }
.feature-card:hover { transform: none; border-color: var(--border); border-top-color: var(--sheet-green); }
.stack-item:hover { background: #FFFCFA; }
tbody tr:hover { background: transparent; }
tbody tr:nth-child(even):hover { background: #FEFAF6; }

@media (max-width: 1080px) {
  .stat-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-actions-cell {
    min-width: 250px;
  }

  .user-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .quick-edit-form {
    grid-template-columns: 1fr;
    min-width: 230px;
  }

  .status-inline-form {
    min-width: 230px;
  }

  .stat-grid-three {
    grid-template-columns: 1fr;
  }
}
