body.nvx-leadops-open { overflow: hidden !important; }

.nvx-leadops-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  background: rgba(2, 22, 42, .72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 18px;
  color: #15324d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nvx-leadops-shell {
  width: min(1680px, 100%);
  height: min(94vh, 1040px);
  overflow: hidden;
  border-radius: 24px;
  background: #f4f8fc;
  box-shadow: 0 28px 90px rgba(0, 24, 48, .35);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.nvx-leadops-shell.is-loading { opacity: .72; pointer-events: none; }

.nvx-leadops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  color: #fff;
  background: linear-gradient(125deg, #043865 0%, #07558f 60%, #0e74ad 100%);
}

.nvx-leadops-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.nvx-leadops-brand img { width: 72px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; padding: 5px; }
.nvx-leadops-brand p, .nvx-leadops-history .title p, .nvx-leadops-modal header p { margin: 0; font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.nvx-leadops-brand h1 { margin: 3px 0; font-size: clamp(21px, 2vw, 31px); line-height: 1.1; }
.nvx-leadops-brand span { display: block; opacity: .82; font-size: 13px; }
.nvx-leadops-close, .nvx-leadops-modal header > button { border: 0; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; flex: 0 0 auto; }

.nvx-leadops-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px; background: #fff; border-bottom: 1px solid #dce7f1; }
.nvx-leadops-tabs button { border: 1px solid #d7e4ef; background: #f7fafc; color: #38536b; border-radius: 11px; padding: 9px 16px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.nvx-leadops-tabs button.active { background: #073f72; border-color: #073f72; color: #fff; box-shadow: 0 8px 22px rgba(7,63,114,.2); }

.nvx-leadops-content { overflow: auto; padding: 16px; }
.nvx-leadops-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.nvx-leadops-summary.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.nvx-leadops-summary > div { border: 1px solid #dce8f2; border-radius: 16px; background: #fff; padding: 14px 16px; box-shadow: 0 8px 24px rgba(20,56,84,.06); }
.nvx-leadops-summary span, .nvx-leadops-table td span, .nvx-leadops-table td small, .nvx-leadops-team-strip small, .nvx-leadops-team-strip span, .nvx-leadops-detail-grid span, .nvx-leadops-detail-grid small, .nvx-leadops-form .readonly span, .nvx-leadops-form .readonly small { display: block; color: #698096; font-size: 11px; line-height: 1.4; }
.nvx-leadops-summary b { display: block; margin-top: 4px; color: #073f72; font-size: 25px; }

.nvx-leadops-toolbar, .nvx-leadops-manager-select, .nvx-leadops-guidance { display: flex; align-items: end; gap: 10px; margin-bottom: 14px; border: 1px solid #dce8f2; background: #fff; border-radius: 16px; padding: 12px; }
.nvx-leadops-toolbar label, .nvx-leadops-manager-select label { flex: 1; min-width: 230px; color: #49627a; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.nvx-leadops-toolbar input, .nvx-leadops-manager-select select { width: 100%; margin-top: 5px; border: 1px solid #cbdbe8; border-radius: 10px; padding: 10px 12px; background: #fff; color: #17344f; font: inherit; font-size: 13px; text-transform: none; letter-spacing: normal; }
.nvx-leadops-toolbar button, .nvx-leadops-table button, .nvx-leadops-modal button, .nvx-leadops-fatal button { border: 1px solid #c9dae8; border-radius: 10px; background: #fff; color: #174b76; padding: 9px 12px; font-weight: 800; cursor: pointer; }
.nvx-leadops-toolbar button.primary, .nvx-leadops-modal button.primary { color: #fff; background: linear-gradient(135deg, #e96f28, #f08b39); border-color: #e96f28; }
.nvx-leadops-manager-select { align-items: center; }
.nvx-leadops-manager-select span { color: #637b90; font-size: 12px; max-width: 420px; }
.nvx-leadops-guidance { align-items: flex-start; flex-direction: column; color: #516b81; font-size: 13px; }
.nvx-leadops-guidance b { color: #073f72; }

.nvx-leadops-table-wrap { overflow: auto; border: 1px solid #d9e6f0; border-radius: 17px; background: #fff; box-shadow: 0 10px 28px rgba(15,50,78,.06); }
.nvx-leadops-table { width: 100%; min-width: 1180px; border-collapse: collapse; }
.nvx-leadops-table.team-leads { min-width: 1580px; }
.nvx-leadops-table th { position: sticky; top: 0; z-index: 1; background: #edf4fa; color: #36536d; padding: 11px 12px; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; border-bottom: 1px solid #d9e5ef; }
.nvx-leadops-table td { padding: 11px 12px; vertical-align: top; border-bottom: 1px solid #e7eef4; font-size: 12px; max-width: 260px; }
.nvx-leadops-table tbody tr:hover { background: #f7fbfe; }
.nvx-leadops-table td b { display: block; color: #173b5a; font-size: 12px; overflow-wrap: anywhere; }
.nvx-leadops-table td.empty, .nvx-leadops-history .empty { text-align: center; padding: 36px; color: #71869a; }
.nvx-leadops-status { display: inline-block; border-radius: 999px; background: #e8f0f7; color: #24526f; padding: 5px 9px; font-size: 10px; font-style: normal; font-weight: 900; white-space: nowrap; }
.nvx-leadops-status.completed, .nvx-leadops-status.qualified, .nvx-leadops-status.manager { background: #e3f6ec; color: #147548; }
.nvx-leadops-status.cancelled, .nvx-leadops-status.could-not-visit { background: #fee9e7; color: #b33c33; }
.nvx-leadops-status.in-progress, .nvx-leadops-status.confirmed { background: #e4f1ff; color: #075f9f; }
.nvx-leadops-status.rescheduled, .nvx-leadops-status.follow-up { background: #fff0dd; color: #a35b13; }
.nvx-leadops-row-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 185px; }
.nvx-leadops-row-actions button { padding: 6px 8px; font-size: 10px; }

.nvx-leadops-team-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 2px; }
.nvx-leadops-team-strip article { min-width: 210px; border: 1px solid #dae7f1; border-radius: 14px; background: #fff; padding: 11px 13px; }
.nvx-leadops-team-strip article.manager { border-color: #77acd3; background: #eef7fd; }
.nvx-leadops-team-strip b { display: block; color: #123f63; font-size: 12px; }

.nvx-leadops-modal-backdrop { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 22px; background: rgba(2,24,44,.7); backdrop-filter: blur(6px); }
.nvx-leadops-modal { width: min(1160px, 100%); max-height: 90vh; overflow: auto; background: #f7fafd; border-radius: 21px; box-shadow: 0 26px 80px rgba(0,21,40,.42); }
.nvx-leadops-modal > header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #fff; background: linear-gradient(130deg, #073d6b, #0c6a9f); padding: 16px 20px; }
.nvx-leadops-modal header h2 { margin: 3px 0; font-size: 22px; }
.nvx-leadops-modal header span { display: block; opacity: .8; font-size: 12px; }
.nvx-leadops-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.nvx-leadops-form label { display: flex; flex-direction: column; gap: 5px; color: #506a80; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.nvx-leadops-form label.wide, .nvx-leadops-form .wide { grid-column: 1 / -1; }
.nvx-leadops-form input, .nvx-leadops-form select, .nvx-leadops-form textarea { width: 100%; border: 1px solid #cadbe8; border-radius: 11px; background: #fff; color: #173752; padding: 10px 11px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: normal; box-sizing: border-box; }
.nvx-leadops-form textarea { resize: vertical; }
.nvx-leadops-form footer, .nvx-leadops-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.nvx-leadops-form-error { border-radius: 10px; background: #fff0ee; color: #a8372f; padding: 10px 12px; font-size: 12px; font-weight: 750; }
.nvx-leadops-form .readonly { border: 1px solid #d5e3ee; border-radius: 12px; background: #edf4fa; padding: 10px 12px; }
.nvx-leadops-form .readonly b { display: block; color: #153e60; margin: 3px 0; }

.nvx-leadops-team-picker { border: 1px solid #cfdeea; border-radius: 14px; background: #fff; padding: 12px; }
.nvx-leadops-team-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.nvx-leadops-team-picker-heading b { display: block; color: #0c416c; font-size: 13px; }
.nvx-leadops-team-picker-heading span { display: block; margin-top: 2px; color: #6d8295; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: normal; }
.nvx-leadops-team-picker-heading input { max-width: 330px; }
.nvx-leadops-team-picker-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.nvx-leadops-team-picker-list > label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; border: 1px solid #dce7f0; border-radius: 11px; background: #f8fbfd; padding: 9px 10px; cursor: pointer; text-transform: none; letter-spacing: normal; }
.nvx-leadops-team-picker-list > label:has(input:checked) { border-color: #70afd4; background: #eaf6fd; box-shadow: inset 3px 0 #0b6ca5; }
.nvx-leadops-team-picker-list input[type="checkbox"] { width: 17px; height: 17px; margin-top: 1px; }
.nvx-leadops-team-picker-list b { display: block; color: #173e5e; font-size: 12px; }
.nvx-leadops-team-picker-list small { display: block; margin-top: 2px; color: #6b8093; font-size: 10px; line-height: 1.35; }
.nvx-role-team-row { background: #edf6ff !important; border-color: #98c3df !important; color: #0a5f96 !important; }

.nvx-leadops-modal-columns { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 0; }
.nvx-leadops-modal-columns.history-only { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.nvx-leadops-history { border-left: 1px solid #dce7f0; padding: 18px; max-height: 68vh; overflow: auto; background: #fff; }
.nvx-leadops-history .title { margin-bottom: 12px; }
.nvx-leadops-history .title p { color: #74899b; }
.nvx-leadops-history h3 { margin: 3px 0; color: #0c416c; }
.nvx-leadops-history article { position: relative; margin: 0 0 10px; padding: 11px 12px; border: 1px solid #dbe7f0; border-radius: 12px; background: #f8fbfd; }
.nvx-leadops-history article > div { display: flex; justify-content: space-between; gap: 10px; }
.nvx-leadops-history article b { color: #17496e; font-size: 12px; }
.nvx-leadops-history article span, .nvx-leadops-history article small { color: #71869a; font-size: 10px; }
.nvx-leadops-history article p { margin: 7px 0; color: #34566e; font-size: 12px; white-space: pre-wrap; }
.nvx-leadops-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px 18px 0; }
.nvx-leadops-detail-grid > div { border: 1px solid #d9e5ef; border-radius: 12px; background: #fff; padding: 10px 12px; }
.nvx-leadops-detail-grid b { display: block; color: #143f61; margin: 3px 0; font-size: 12px; }
.nvx-leadops-modal-footer { padding: 0 18px 18px; }
.nvx-site-visit-row { background: #e9f7f4 !important; border-color: #9bd2c5 !important; color: #14715e !important; }

.nvx-leadops-loading, .nvx-leadops-fatal { display: grid; place-items: center; align-content: center; gap: 12px; height: 100%; text-align: center; padding: 30px; }
.nvx-leadops-loading span { width: 38px; height: 38px; border: 4px solid #d6e4ef; border-top-color: #0c639e; border-radius: 50%; animation: nvx-leadops-spin .8s linear infinite; }
.nvx-leadops-fatal b { color: #0a4472; font-size: 20px; }
.nvx-leadops-fatal span { color: #6b8093; }
@keyframes nvx-leadops-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .nvx-leadops-summary.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nvx-leadops-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nvx-leadops-layer { padding: 0; }
  .nvx-leadops-shell { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .nvx-leadops-header { padding: 13px 14px; }
  .nvx-leadops-brand img { width: 52px; height: 43px; }
  .nvx-leadops-brand span { display: none; }
  .nvx-leadops-content { padding: 10px; }
  .nvx-leadops-summary, .nvx-leadops-summary.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nvx-leadops-toolbar, .nvx-leadops-manager-select { align-items: stretch; flex-direction: column; }
  .nvx-leadops-toolbar label, .nvx-leadops-manager-select label { min-width: 0; }
  .nvx-leadops-modal-backdrop { padding: 0; }
  .nvx-leadops-modal { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .nvx-leadops-form, .nvx-leadops-modal-columns, .nvx-leadops-modal-columns.history-only { grid-template-columns: 1fr; }
  .nvx-leadops-form label.wide, .nvx-leadops-form .wide { grid-column: auto; }
  .nvx-leadops-history { border-left: 0; border-top: 1px solid #dce7f0; max-height: none; }
  .nvx-leadops-detail-grid { grid-template-columns: 1fr; }
  .nvx-leadops-team-picker-heading { align-items: stretch; flex-direction: column; }
  .nvx-leadops-team-picker-heading input { max-width: none; }
  .nvx-leadops-team-picker-list { grid-template-columns: 1fr; max-height: 42vh; }
}
