.lead-admin .lead-topbar nav {
  flex-wrap: wrap;
  column-gap: clamp(12px, 2vw, 28px);
}

.lead-admin .lead-topbar nav a[aria-disabled="true"] {
  color: #6a766e;
  cursor: default;
}

.lead-admin .lead-topbar nav a[aria-disabled="true"]::after {
  display: none;
}

.ops-system-toolbar {
  display: flex;
  justify-content: flex-end;
}

.ops-system-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #edf4ef;
  font-size: 13px;
}

.ops-system-toolbar label > span {
  flex: none;
  white-space: nowrap;
}

.ops-system-toolbar select {
  width: clamp(125px, 13vw, 150px);
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #91ae9d;
  border-radius: 5px;
  background: #edf4ef;
  color: #213b30;
  font: inherit;
}

.ops-system, .ops-editor {
  --ops-ink: #192e27;
  --ops-muted: #53665d;
  --ops-line: #d8e1db;
  --ops-soft: #f3f6f3;
  --ops-surface: #fff;
  --ops-accent: #285742;
  color: var(--ops-ink);
}

.ops-system {
  display: grid;
  gap: 18px;
}

.ops-page-header {
  padding: 18px clamp(17px, 3vw, 34px) 27px;
  border-radius: 11px;
  background: linear-gradient(118deg, #18382e, #24483a 75%, #2d5141);
  color: #fff;
}

.ops-workspace > .ops-page-header { margin-bottom: 18px; }

.ops-page-context, .ops-page-title, .ops-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.ops-page-context {
  flex-wrap: wrap;
  min-height: 43px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e3efe93b;
  color: #d0e1d7;
  font-size: 13px;
}

.ops-page-title {
  align-items: flex-end;
  flex-wrap: wrap;
  padding-top: 18px;
}

.ops-page-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 630;
}

.ops-page-title p, .ops-card-heading p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.ops-page-title p { color: #d0e1d7; }

.ops-page-title .ops-page-action {
  flex: none;
  padding-inline: 19px;
  border-color: #fff;
  background: #fff;
  color: #1c4735;
  font-weight: 650;
}

.ops-page-title .ops-page-action:hover { background: #e6efe9; }
.ops-page-header :is(select, button, a):focus-visible {
  outline: 2px solid #c7e6d0;
  outline-offset: 3px;
}
.ops-save-status:empty { display: none; }
.ops-save-status {
  padding: 11px 15px;
  border: 1px solid #b8cfbf;
  border-radius: 7px;
  background: #edf5ee;
  color: #244f37;
  font-size: 13px;
}

.ops-user-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  background: var(--ops-surface);
}

.ops-user-totals > div { padding: 16px clamp(12px, 3vw, 26px); }
.ops-user-totals > div + div { border-inline-start: 1px solid var(--ops-line); }
.ops-user-totals dt { color: var(--ops-muted); font-size: 13px; }
.ops-user-totals dd {
  margin: 5px 0 0;
  color: var(--ops-ink);
  font-size: 27px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ops-card {
  min-width: 0;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  background: var(--ops-surface);
}

.ops-card-heading {
  min-height: 62px;
  padding: 16px clamp(14px, 2vw, 23px);
}

.ops-card-heading h2 { margin: 0; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.ops-card-heading p { color: var(--ops-muted); }
.ops-card-heading > p { flex: none; margin: 0; font-variant-numeric: tabular-nums; }

.ops-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 clamp(14px, 2vw, 23px) 16px;
}

.ops-filters input, .ops-filters select, .ops-field input, .ops-field select {
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #bccdc2;
  border-radius: 6px;
  background: #fff;
  color: var(--ops-ink);
  font: inherit;
  font-size: 13px;
}

.ops-filters input { flex: 1 1 205px; max-width: 300px; }
.ops-filters select { flex: 0 1 145px; }
.ops-system :is(input, select, button):focus-visible,
.ops-editor :is(input, select, button):focus-visible {
  outline: 2px solid #689879;
  outline-offset: 3px;
}

.ops-table-wrap { overflow-x: auto; }
.ops-users-table, .ops-permissions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.ops-users-table { min-width: 570px; }
.ops-system table th, .ops-system table td {
  padding: 12px clamp(12px, 2vw, 23px);
  border-top: 1px solid var(--ops-line);
  vertical-align: middle;
}
.ops-system table thead th { background: var(--ops-soft); color: var(--ops-muted); font-weight: 600; }
.ops-users-table tbody tr:hover { background: #f7faf7; }
.ops-users-table :is(th, td):last-child { width: 1%; text-align: right; }
.ops-users-table .ops-empty { padding: 32px 15px; color: var(--ops-muted); text-align: center; }

.ops-person { display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere; }
.ops-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8efe9;
  color: #305c44;
  font-weight: 650;
}
.ops-account { font-family: ui-monospace, Consolas, monospace; color: #40584e; }
.ops-role-label {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #dde6df;
  border-radius: 5px;
  background: #f5f7f5;
  overflow-wrap: anywhere;
}

.ops-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid #dde2de;
  border-radius: 999px;
  background: #f1f3f1;
  color: #53625a;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.ops-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78857d;
}
.ops-status[data-active="true"] { border-color: #c5dbc9; background: #eaf4eb; color: #235436; }
.ops-status[data-active="true"]::before { background: #438457; }
.ops-link { padding: 6px 4px; color: var(--ops-accent); font-weight: 650; white-space: nowrap; }
.ops-link:hover { text-decoration: underline; }

.ops-permissions-layout {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(0, 2.2fr);
  gap: 15px;
  align-items: start;
}

.ops-role-directory ul { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0 12px 12px; }
.ops-role-directory li { min-width: 0; }
.ops-role-directory button {
  display: grid;
  justify-items: start;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--ops-line);
  border-inline-start: 3px solid var(--ops-line);
  border-radius: 6px;
  background: var(--ops-surface);
  color: var(--ops-ink);
  text-align: left;
  overflow-wrap: anywhere;
}
.ops-role-directory button:hover { background: var(--ops-soft); }
.ops-role-directory button[aria-pressed="true"] {
  border-color: #b7d0bf;
  border-inline-start-color: #407954;
  background: #edf5ee;
}
.ops-role-directory small { color: var(--ops-muted); font-size: 12px; }
.ops-permission-detail > header { align-items: flex-start; }
.ops-role-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.ops-edit-role { flex: none; white-space: nowrap; }
.ops-permission-key { margin: 0; padding: 10px 16px; border-top: 1px solid var(--ops-line); color: var(--ops-muted); font-size: 12px; }
.ops-permissions-table th[scope="row"] { width: 37%; overflow-wrap: anywhere; }
.ops-permissions-table .ops-module-group th {
  padding-block: 3px;
  background: #f8faf8;
  color: var(--ops-muted);
  font-size: 12px;
}
.ops-module-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  min-height: 28px;
}
.ops-permission-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 9px; }
.ops-permission-choice, .ops-permission-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}
.ops-permission-choice {
  min-height: 30px;
  padding: 3px;
  border-radius: 4px;
  cursor: pointer;
}
.ops-permission-choice:hover { background: var(--ops-soft); }
.lead-admin .ops-permission-choice > input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin: 0;
  accent-color: var(--ops-accent);
}
.ops-permission-state {
  padding: 4px 7px;
  border-radius: 4px;
  background: #f1f3f1;
  color: #53625a;
}
.ops-permission-state[data-active="true"] { background: #e4f1e6; color: #235436; }
.ops-permission-state-mark { font-weight: 650; }
.ops-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ops-editor .ops-permissions-edit :is(th, td) { padding: 5px 8px; border-bottom: 1px solid var(--ops-line); }
.ops-permissions-edit .ops-module-group th, .ops-permissions-edit thead { background: var(--ops-soft); }
.lead-admin .lead-drawer:has(.ops-system-form[data-role-editor="true"]) { width: min(100%, 42rem); }
.ops-delete { color: #89382f; white-space: nowrap; }
.ops-users-table td:last-child { white-space: nowrap; }
.ops-delete-confirm { background: #89382f; border-color: #89382f; color: #fff; }

.ops-system-form { display: grid; gap: 18px; }
.ops-system-form fieldset {
  min-width: 0;
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 13px 14px 15px;
  border: 1px solid var(--ops-line);
  border-radius: 7px;
  background: var(--ops-surface);
}
.ops-system-form legend { padding: 0 5px; color: var(--ops-ink); font-size: 14px; font-weight: 650; }
.ops-field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.ops-field :disabled { background: var(--ops-soft); color: var(--ops-muted); }
.ops-field small, .ops-form-note { color: var(--ops-muted); font-size: 12px; line-height: 1.55; font-weight: 400; }
.ops-form-note { margin: 0; }
.ops-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ops-system-form[data-role-editor="true"] > .ops-form-actions {
  position: sticky;
  z-index: 1;
  bottom: 0;
  padding: 9px 0;
  border-top: 1px solid var(--ops-line);
  background: #fafaf5;
}

@media (max-width: 720px) {
  .ops-permissions-layout { grid-template-columns: minmax(0, 1fr); }
  .ops-role-directory ul { grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); }
  .ops-filters input { flex-basis: 100%; max-width: none; }
}

.lead-catalog-editors {
  margin: 0;
  color: #536a5d;
  line-height: 1.5;
}

@media (min-width: 821px) {
  .lead-admin .lead-follow-desk {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lead-plan-progress {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-admin .lead-customer-progress ol {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 820px) {
  .lead-admin .lead-customer-progress ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lead-admin .lead-topbar nav a {
    font-size: 12px;
  }
}
