:root {
  --navy: #061f3d;
  --orange: #ff6b00;
  --gold: #c9862b;
  --soft: #fff8ed;
  --line: #ead8bb;
  --muted: #65758b;
  --ok: #137a3d;
  --danger: #b42318;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(6, 31, 61, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--navy);
  background: linear-gradient(180deg, #fffaf2 0%, #f7fafc 45%, #eef4fb 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 34px);
  background: #fff;
  border-bottom: 1px solid rgba(234, 216, 187, 0.86);
  box-shadow: 0 6px 28px rgba(6, 31, 61, 0.08);
}

.brand,
.top-actions,
.case-row,
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 52px;
  height: 48px;
  object-fit: contain;
}

.brand div,
.user-card,
.case-copy,
.detail-block,
.field {
  display: grid;
  gap: 3px;
}

.brand strong {
  font-size: 18px;
}

.brand span,
.user-card span,
.case-copy span,
.field span,
.status {
  color: var(--muted);
  font-size: 12px;
}

.ghost {
  padding: 0 14px;
  border: 1px solid rgba(6, 31, 61, 0.16);
  color: var(--navy);
  background: #fff;
}

.primary {
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #f08a00);
  font-weight: 850;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  /* Centred against the login card. It was `end`, which pinned the headline and
     its points to the bottom of the row as the card grew. */
  align-items: center;
  gap: clamp(20px, 5vw, 52px);
  width: min(1120px, calc(100% - 32px));
  margin: 64px auto;
}

.login-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1;
}

.login-panel p {
  max-width: 620px;
  margin: 0;
  color: #233c5a;
  font-size: 18px;
  line-height: 1.55;
}

.login-card,
.detail-panel,
.case-list-panel,
.user-card,
.stat-card {
  border: 1px solid rgba(234, 216, 187, 0.86);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

h2,
h3,
p {
  margin: 0;
}

label {
  display: grid;
  gap: 6px;
  color: #314963;
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.dashboard {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  padding: 18px clamp(14px, 3vw, 28px) 28px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
}

.user-card {
  padding: 14px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--navy));
  font-weight: 950;
}

.tabs {
  display: grid;
  gap: 8px;
}

.module-tabs {
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(234, 216, 187, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(6, 31, 61, 0.06);
}

.module-tab {
  min-height: 38px;
  padding: 0 12px;
  color: var(--navy);
  background: #fff7ed;
  font-weight: 850;
  text-align: left;
}

.module-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #f08a00);
}

.tab {
  justify-content: flex-start;
  padding: 0 14px;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(6, 31, 61, 0.12);
  text-align: left;
  font-weight: 800;
}

.tab.active {
  color: #fff;
  background: var(--navy);
}

.content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.content-module {
  display: grid;
  gap: 14px;
}

.content-module.hidden {
  display: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  padding: 12px;
}

.stat-card strong {
  display: block;
  font-size: 24px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: center;
}

.admin-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(420px, 1fr);
  gap: 14px;
  /* Top-aligned, not centred: with `center` the detail panel floated to the
     middle of a long list, so the approve/reject controls sat off-screen. */
  align-items: start;
}

.admin-workbench.compact {
  grid-template-columns: minmax(280px, 0.6fr) minmax(420px, 1fr);
}

.case-list-panel,
.detail-panel {
  min-height: 560px;
  padding: 14px;
}

.section-head {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head.single {
  grid-template-columns: 1fr;
}

.module-head {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 0;
}

.case-list {
  display: grid;
  gap: 8px;
}

.case-item {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(6, 31, 61, 0.1);
  border-radius: 8px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.case-item.active,
.case-item:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.case-item.disabled {
  opacity: 0.74;
  background: #f8fafc;
}

.case-item .mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(6, 31, 61, 0.12);
  border-radius: 999px;
  background: #f7fafc;
  color: #314963;
  font-size: 11px;
  font-weight: 850;
}

.case-row {
  justify-content: space-between;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid rgba(201, 134, 43, 0.5);
  border-radius: 999px;
  color: #7c4a03;
  background: #fff7d6;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.pill.ok {
  border-color: rgba(19, 122, 61, 0.38);
  color: var(--ok);
  background: #eefaf3;
}

.pill.danger {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--danger);
  background: #fff2f2;
}

.pill.navy {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.detail-panel {
  display: grid;
  gap: 14px;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.employee-photo-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.employee-photo {
  width: 72px;
  height: 72px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--navy));
  box-shadow: 0 12px 26px rgba(6, 31, 61, 0.14);
  object-fit: cover;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 34px;
  padding: 8px;
  border: 1px solid rgba(6, 31, 61, 0.1);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.check-option input {
  width: auto;
  min-height: 18px;
  accent-color: var(--orange);
}

.danger-zone {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 8px;
  background: #fff7f7;
}

.field {
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
  overflow-wrap: anywhere;
}

.field strong {
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  min-height: 42px;
}

.timeline-item::before {
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 11px;
  width: 3px;
  background: #d7deea;
  content: "";
}

.timeline-item:last-child::before {
  display: none;
}

.dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #d7deea;
}

.timeline-item.done .dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ok);
  font-size: 13px;
  font-weight: 950;
}

.timeline-item.done .dot::after {
  content: "✓";
}

.timeline-item.active .dot {
  background: var(--orange);
}

.action-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(234, 216, 187, 0.86);
  border-radius: 8px;
  background: #fff;
}

.evidence-block {
  gap: 12px;
}

.evidence-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(234, 216, 187, 0.86);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdfa, #fff);
}

.evidence-section.ready,
.evidence-item:hover {
  border-color: rgba(19, 122, 61, 0.35);
  box-shadow: 0 0 0 3px rgba(19, 122, 61, 0.08);
}

.evidence-title,
.evidence-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.evidence-title p,
.evidence-item-head span {
  color: var(--muted);
  font-size: 12px;
}

.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 107, 0, 0.32);
  color: var(--navy);
  background: #fff7ed;
  font-size: 12px;
  font-weight: 900;
}

.evidence-button:hover {
  color: #fff;
  background: var(--orange);
}

.evidence-list {
  display: grid;
  gap: 8px;
}

.evidence-item {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(6, 31, 61, 0.1);
  border-radius: 8px;
  background: #fff;
}

.evidence-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.evidence-meta div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f7fafc;
}

.evidence-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.evidence-meta strong {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.danger-action {
  color: #fff;
  background: var(--danger);
}

.error-bar {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(180, 35, 24, 0.35);
  background: #fff2f2;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.pw-wrap {
  position: relative;
  display: block;
}

.pw-wrap input {
  padding-right: 42px;
}

.pw-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.pw-eye:hover {
  color: var(--navy);
  background: #eef4fb;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.analytics-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(234, 216, 187, 0.86);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.analytics-card h3 {
  font-size: 14px;
}

.funnel {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.bar-label {
  font-size: 12px;
  font-weight: 700;
  color: #314963;
  overflow-wrap: anywhere;
}

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--navy);
  transition: width 0.3s ease;
}

.bar-fill.orange {
  background: linear-gradient(90deg, var(--orange), #f08a00);
}

.bar-fill.gold {
  background: var(--gold);
}

.bar-fill.danger {
  background: var(--danger);
}

.bar-count {
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

@media (max-width: 900px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 110px minmax(0, 1fr) 30px;
  }
}

.export-wrap {
  position: relative;
}

.export-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 15;
  display: grid;
  min-width: 160px;
  padding: 6px;
  border: 1px solid rgba(234, 216, 187, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.export-menu button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-weight: 750;
  text-align: left;
}

.export-menu button:hover {
  background: #fff7ed;
}

.hidden {
  display: none !important;
}

#toast {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 20;
  max-width: min(560px, calc(100vw - 36px));
  min-width: 300px;
  padding: 18px 24px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px);
  transition: 0.18s ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

#toast.toast-success {
  background: #137a3d;
}

#toast.toast-error {
  background: #b42318;
}

#toast.toast-warning {
  background: #9a6a00;
  color: #fff;
}

@media (max-width: 900px) {
  .login-panel,
  .dashboard,
  .workbench,
  .admin-workbench,
  .admin-workbench.compact {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .module-head,
  .detail-grid,
  .form-grid,
  .action-grid,
  .evidence-meta,
  .check-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Customers module (v8) --- */
#customerDetail .empty-state,
#customerList .case-item span {
  color: inherit;
}

a.evidence-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
}

#customerKpis {
  margin-bottom: 16px;
}


/* --- Important message modal (v9) --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 31, 61, 0.55);
  backdrop-filter: blur(2px);
}

.modal-overlay.hidden { display: none; }

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(6, 31, 61, 0.35);
  border-top: 6px solid var(--navy, #061f3d);
}

.modal-overlay[data-tone="success"] .modal-card { border-top-color: #1a9c5b; }
.modal-overlay[data-tone="danger"] .modal-card { border-top-color: #d64545; }

.modal-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #061f3d;
}

.modal-card p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: #314963;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-actions .primary {
  min-width: 96px;
}


/* --- Assigned agent tag on case list (v10) --- */
.case-agent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(6, 31, 61, 0.07);
  color: #061f3d;
  font-size: 11px;
  font-weight: 800;
  width: fit-content;
  max-width: 100%;
}


/* --- Employees: grid view + detail stage (v11) --- */
.employee-stage {
  display: block;
}

.employee-panel {
  min-height: 560px;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 14px;
}

.employee-empty {
  padding: 22px;
  border: 1px dashed rgba(6, 31, 61, 0.2);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  color: #5a6b80;
}

.employee-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 16px 14px;
  border: 1px solid rgba(6, 31, 61, 0.1);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.employee-card:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: 0 12px 28px rgba(6, 31, 61, 0.14);
}

.employee-card.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.14);
}

.employee-card.disabled {
  opacity: 0.72;
  background: #f8fafc;
}

.employee-card.custody {
  border-color: #e6b877;
  background: #fff9f0;
  box-shadow: inset 0 3px 0 0 #ff5b00;
}

.employee-card.custody:hover {
  box-shadow: inset 0 3px 0 0 #ff5b00, 0 12px 28px rgba(255, 91, 0, 0.18);
}

.employee-card .ec-top {
  display: flex;
  justify-content: center;
  min-height: 30px;
}

.employee-card .ec-avatar {
  width: 76px;
  height: 76px;
  margin: 2px auto 0;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 10px 22px rgba(6, 31, 61, 0.16);
  object-fit: cover;
  background: #eef2f7;
}

.employee-card .ec-name {
  font-weight: 900;
  font-size: 15px;
  color: var(--navy);
}

.employee-card .ec-role {
  font-size: 12px;
  font-weight: 750;
  color: #5a6b80;
}

.employee-card .ec-meta {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(6, 31, 61, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
  font-size: 12px;
  color: #33465c;
}

.employee-card .ec-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-card .ec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: #5a6b80;
}

.employee-card .ec-view {
  color: var(--orange);
  font-weight: 850;
}

.employee-card .ec-track {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #ff5b00;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.employee-card .ec-track:hover {
  background: #e64f00;
}

.back-btn {
  justify-self: start;
  margin-bottom: 12px;
}


/* --- Targets & Information modules (v12) --- */
.month-pick {
  font-weight: 700;
  font-size: 13px;
  color: #33465c;
  justify-self: end;
}

.month-pick input {
  margin-left: 6px;
  padding: 6px 8px;
  border: 1px solid #cfd6e0;
  border-radius: 8px;
}

.attain-track {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.attain-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.target-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.target-stats > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(6, 31, 61, 0.08);
  border-radius: 10px;
  background: #f8fafc;
}

.target-stats span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5a6b80;
}

.target-stats strong {
  font-size: 16px;
  color: var(--navy);
}

.slab-editor {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(6, 31, 61, 0.08);
}

.slab-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}

.slab-row label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #33465c;
}

.slab-row input {
  padding: 8px;
  border: 1px solid #cfd6e0;
  border-radius: 8px;
}

.slab-remove {
  align-self: end;
  height: 38px;
  min-width: 40px;
}

.bc-audience {
  display: flex;
  gap: 16px;
  font-weight: 700;
  font-size: 13px;
  color: #33465c;
}

.bc-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
}

@media (max-width: 900px) {
  .target-stats,
  .slab-row {
    grid-template-columns: 1fr;
  }
}


/* --- Reports module (v13) --- */
.report-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.report-frames {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 14px;
  border: 1px solid rgba(6, 31, 61, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #33465c;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--orange);
}

.chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.report-toolbar label {
  font-size: 12px;
  font-weight: 700;
  color: #33465c;
  display: grid;
  gap: 4px;
}

.report-toolbar input,
.report-toolbar select {
  padding: 7px 8px;
  border: 1px solid #cfd6e0;
  border-radius: 8px;
}

.report-graphtoggle {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
}

.report-spacer {
  flex: 1;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.report-kpi {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(6, 31, 61, 0.08);
  border-radius: 12px;
  background: #fff;
}

.report-kpi span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5a6b80;
}

.report-kpi strong {
  font-size: 18px;
  color: var(--navy);
}

.report-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: center;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.report-table th,
.report-table td {
  border: 1px solid #e6e9f0;
  padding: 8px 10px;
  text-align: left;
}

.report-table th {
  background: #f4f6fa;
  font-weight: 800;
  color: #33465c;
}

.report-table tfoot td {
  font-weight: 900;
  background: #fbfcfe;
}

@media (max-width: 900px) {
  .report-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-body {
    grid-template-columns: 1fr;
  }
}


/* --- Incentive editor (v14) --- */
.startband {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #33465c;
  flex-wrap: wrap;
}

.startband input {
  width: 90px;
  padding: 6px 8px;
  border: 1px solid #cfd6e0;
  border-radius: 8px;
}

.slab-head {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5a6b80;
}

.slab-head span:last-child {
  width: 40px;
}

@media (max-width: 900px) {
  .slab-head { display: none; }
}

/* ===== Verifications (RM) console ===== */
.verify-wrap{display:grid;grid-template-columns:340px 1fr;gap:16px}
.verify-tabs{display:flex;gap:8px;margin-bottom:12px}
.vtab{padding:7px 14px;border:1px solid #d7dae0;border-radius:8px;background:#fff;cursor:pointer;font-size:13px}
.vtab.active{background:#12203a;color:#fff;border-color:#12203a}
.verify-empty{padding:24px;text-align:center;color:#7a828e;font-size:14px}
.verify-item{display:block;width:100%;text-align:left;padding:12px;margin-bottom:8px;border:1px solid #e2e5ea;border-radius:10px;background:#fff;cursor:pointer}
.verify-item:hover{border-color:#12203a}
.verify-item.urgent{border-color:#d33;background:#fff6f6}
.vi-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.vi-sub{font-size:12.5px;color:#4a4f57;margin-top:3px}
.vi-sub.muted{color:#9099a4}
.pill.danger{background:#fde8e8;color:#c0392b}
.pill.ok{background:#e7f6ec;color:#1e7d43}
.pill.navy{background:#e7ecf6;color:#26406e}
.cal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.cal-head button{border:1px solid #d7dae0;background:#fff;border-radius:8px;width:32px;height:32px;cursor:pointer;font-size:18px}
.cal-dow{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;font-size:11px;color:#8b929c;text-align:center;margin-bottom:4px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-cell{aspect-ratio:1;border:1px solid #eceef2;border-radius:8px;position:relative;padding:4px;font-size:12px}
.cal-cell.empty{border:none}
.cal-cell.has{background:#eef4ff;border-color:#c9dbff;cursor:pointer}
.cal-cell .cn{position:absolute;right:4px;bottom:3px;background:#12203a;color:#fff;border-radius:10px;font-size:10px;padding:1px 6px}
#calDayList{margin-top:12px}
#calDayList h4{margin:0 0 8px}
.vc-detail .vc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}
.vc-detail .card{padding:12px;margin-bottom:10px}
.vc-detail h4{margin:0 0 8px;font-size:13.5px}
.rev{display:flex;justify-content:space-between;gap:12px;padding:4px 0;border-bottom:1px dashed #eef0f3;font-size:13px}
.rev span:first-child{color:#7a828e}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{background:#eef1f5;border-radius:6px;padding:3px 8px;font-size:12px}
ul.wf{margin:0;padding-left:16px;font-size:12.5px;line-height:1.7}
.rm-call .rm-videos{position:relative;background:#000;border-radius:12px;overflow:hidden;aspect-ratio:16/10}
.rm-videos #rmRemote{width:100%;height:100%;object-fit:cover}
.rm-videos #rmLocal{position:absolute;right:10px;bottom:10px;width:22%;max-width:150px;border:2px solid #fff;border-radius:8px;object-fit:cover;background:#222}
.rm-status{text-align:center;font-size:13px;color:#555;margin:8px 0}
.rm-questions{margin:8px 0}
.rm-questions ul{list-style:none;padding:0;margin:6px 0}
.rm-questions li{padding:4px 0;font-size:13.5px}
#rmNotes{width:100%;min-height:60px;border:1px solid #d7dae0;border-radius:8px;padding:8px;font:inherit;margin:8px 0}
.rm-verdict{display:flex;gap:8px}
.rm-verdict button{flex:1;padding:11px;border-radius:9px;border:1px solid #d7dae0;cursor:pointer;font-size:14px}
.rm-verdict .primary{background:#1e7d43;color:#fff;border-color:#1e7d43}
.rm-verdict .danger{background:#d33;color:#fff;border-color:#d33}
@media(max-width:820px){.verify-wrap{grid-template-columns:1fr}}

/* expected answer shown under each verification question */
.rmq-ans{margin:4px 0 2px 26px;padding:4px 10px;background:#eef6ee;border-left:3px solid #1e7d43;border-radius:4px;font-size:13px;color:#1c4d2e}

ul.qlog{margin:8px 0 0;padding-left:16px;font-size:12.5px;line-height:1.6;color:#33404f}
ul.qlog .muted{color:#8b929c}

/* ===== Per-person Access & Permissions (iOS-style) ===== */
.access-block{margin-top:16px;border-top:1px solid #e3e7ec;padding-top:14px}
.access-head{display:flex;flex-direction:column;margin-bottom:10px}
.access-head strong{font-size:15px}
.access-head .muted{font-size:12px;margin-top:2px}
.acc-group{margin-bottom:14px}
.acc-cat{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:#8b929c;margin:0 0 6px}
.acc-row{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;background:#fff;border:1px solid #eceef2;border-radius:10px;margin-bottom:6px}
.acc-row.changed{border-color:#1e7d43;box-shadow:0 0 0 1px rgba(30,125,67,.15)}
.acc-label{font-size:13.5px;color:#25303c}
.acc-tag{font-size:10px;background:#eef1f5;color:#6b7482;border-radius:4px;padding:1px 6px;margin-left:6px}
.ios-switch{position:relative;width:44px;height:26px;min-width:44px;border-radius:13px;background:#d3d8de;border:none;cursor:pointer;padding:0;transition:background .18s ease}
.ios-switch.on{background:#1e7d43}
.ios-switch .knob{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.28);transition:left .18s ease}
.ios-switch.on .knob{left:21px}
.acc-actions{margin-top:12px;display:flex;gap:8px}

/* RM call — verification question checkboxes: small & aligned to the sentence */
.rm-questions ul{list-style:none;padding:0;margin:6px 0}
.rm-questions li{padding:6px 0}
.rm-questions li label{display:flex;align-items:flex-start;gap:10px;cursor:pointer;line-height:1.45;font-size:13.5px}
.rm-questions li input[type=checkbox]{width:16px;height:16px;min-width:16px;margin:2px 0 0 0;flex:0 0 auto;accent-color:#1e7d43}

/* Change-password modal */
#cpwOverlay{position:fixed;inset:0;background:rgba(10,15,25,.5);display:flex;align-items:center;justify-content:center;z-index:9999}
#cpwOverlay .cpw-card{background:#fff;border-radius:14px;padding:22px;width:340px;max-width:92vw;box-shadow:0 20px 60px rgba(0,0,0,.3)}
#cpwOverlay h3{margin:0 0 14px}
#cpwOverlay label{display:block;font-size:12.5px;color:#4a5260;margin-bottom:10px}
#cpwOverlay input{width:100%;padding:9px 10px;border:1px solid #d7dae0;border-radius:8px;margin-top:4px;font:inherit;box-sizing:border-box}
#cpwOverlay .modal-actions{display:flex;gap:8px;margin-top:8px}
#cpwOverlay .modal-actions .primary{flex:1;padding:10px;border:none;border-radius:8px;background:#12203a;color:#fff;cursor:pointer}
#cpwOverlay .modal-actions .ghost{padding:10px 14px;border:1px solid #d7dae0;border-radius:8px;background:#fff;cursor:pointer}
#cpwOverlay .cpw-err{color:#c0392b;font-size:12.5px;min-height:16px;margin-bottom:6px}

/* ===== Beautiful form controls (small, aligned) ===== */
.admin-form input[type=checkbox], .admin-form input[type=radio],
.check-grid input[type=checkbox], .bc-target input[type=radio], .chip-grid input[type=checkbox]{
  width:16px;height:16px;min-width:16px;margin:0;accent-color:#12203a;cursor:pointer;flex:0 0 auto;
}
.check-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.check-option,.bc-check{display:flex;align-items:center;gap:8px;font-size:13.5px;padding:8px 11px;border:1px solid #e3e7ec;border-radius:8px;background:#fff;cursor:pointer;line-height:1.3}

/* Broadcast composer */
.bc-target{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:8px 0}
.bc-target-label{font-size:12.5px;color:#6b7482;margin-right:2px}
.bc-target .opt{display:flex;align-items:center;gap:7px;font-size:13.5px;padding:7px 13px;border:1px solid #e3e7ec;border-radius:20px;background:#fff;cursor:pointer}
.bc-target .opt input:checked + span{color:#12203a;font-weight:600}
.chip-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:8px;margin:8px 0}
.chip-grid.scroll{max-height:240px;overflow:auto;padding:2px}
.chk{display:flex;align-items:center;gap:8px;font-size:13px;padding:8px 10px;border:1px solid #e3e7ec;border-radius:8px;background:#fff;cursor:pointer;line-height:1.3}
.chk em{color:#8b929c;font-style:normal;font-size:11.5px;margin-left:2px}
.chk.hidden{display:none}
.bc-search{width:100%;padding:8px 10px;border:1px solid #d7dae0;border-radius:8px;margin-bottom:8px;font:inherit;box-sizing:border-box}

/* Notices bell + modal */
.notices-badge{position:absolute;top:-5px;right:-5px;background:#d33;color:#fff;border-radius:10px;font-size:10px;min-width:16px;height:16px;line-height:16px;text-align:center;padding:0 4px}
#noticesOverlay{position:fixed;inset:0;background:rgba(10,15,25,.5);display:flex;align-items:flex-start;justify-content:center;z-index:9999;padding-top:70px}
.notices-card{background:#fff;border-radius:14px;width:430px;max-width:94vw;max-height:76vh;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.notices-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #eceef2}
.notices-head strong{font-size:15px}
.notices-list{overflow:auto;padding:10px 12px 14px}
.notice{padding:10px 12px;border:1px solid #eceef2;border-radius:10px;margin-bottom:8px}
.notice.unread{border-color:#12203a;background:#f5f8ff}
.notice-top{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;color:#8b929c;margin-bottom:4px}
.notice-top strong{color:#25303c;font-size:13.5px}
.notice-body{font-size:13px;white-space:pre-wrap;line-height:1.45}

/* ===== Definitive checkbox/radio reset (overrides global input sizing) ===== */
.admin-form input[type=checkbox], .admin-form input[type=radio],
.check-option input, .bc-target input[type=radio], .chip-grid input[type=checkbox],
#broadcastCompose input[type=checkbox], #broadcastCompose input[type=radio]{
  -webkit-appearance:auto; appearance:auto;
  width:16px !important; height:16px !important; min-width:16px !important; min-height:0 !important;
  padding:0 !important; margin:0 !important; border:0 !important; background:none !important; box-shadow:none !important;
  accent-color:#12203a; cursor:pointer; flex:0 0 auto;
}
#broadcastCompose .check-grid, #broadcastCompose .chip-grid{align-items:start}
#broadcastCompose .chk, #broadcastCompose .bc-target .opt{align-items:center}
#broadcastCompose .chk span, #broadcastCompose .opt span{line-height:1.25}
.check-option{align-items:center !important}

/* ============================================================
   OnnTime CMS — Professional theme refresh (v2)
   ============================================================ */
:root{
  --navy:#0f2544; --navy-2:#1c3557; --ink:#1b2733;
  --brand:#ef6a24; --brand-600:#e05e18;
  --bg:#eef1f6; --surface:#ffffff; --line:#e5e8ef; --line-2:#eef1f5;
  --muted:#64748b; --ok:#16a34a; --danger:#dc2626;
  --ring:0 0 0 3px rgba(239,106,36,.18);
  --shadow-sm:0 1px 2px rgba(15,37,68,.06);
  --shadow:0 1px 2px rgba(15,37,68,.05), 0 10px 28px rgba(15,37,68,.08);
  --radius:14px;
}
body{background:var(--bg) !important;color:var(--ink);-webkit-font-smoothing:antialiased;letter-spacing:.1px}
.topbar{background:var(--surface) !important;border-bottom:1px solid var(--line);box-shadow:var(--shadow-sm);padding:12px clamp(14px,3vw,26px)}
.brand strong{color:var(--navy);letter-spacing:-.2px}
.brand span,#envLabel{color:var(--muted)}
h1,h2,h3{color:var(--navy);letter-spacing:-.3px}
.status,.muted{color:var(--muted)}
button{min-height:38px;border-radius:9px;font-weight:600;transition:background .15s,border-color .15s,box-shadow .15s,transform .02s}
button:active{transform:translateY(1px)}
.primary{background:var(--brand) !important;color:#fff !important;border:1px solid var(--brand) !important;padding:9px 18px;box-shadow:var(--shadow-sm)}
.primary:hover{background:var(--brand-600) !important;border-color:var(--brand-600) !important}
.ghost{background:var(--surface) !important;color:var(--navy) !important;border:1px solid var(--line) !important;padding:8px 15px}
.ghost:hover{background:#f5f7fa !important;border-color:#d5dae3 !important}
.danger-action{background:var(--danger) !important;color:#fff !important;border:1px solid var(--danger) !important}
.module-tabs{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:5px;gap:2px;box-shadow:var(--shadow-sm)}
.module-tab{background:transparent !important;color:var(--muted) !important;border:0 !important;border-radius:8px;padding:8px 14px;font-weight:600}
.module-tab:hover{background:#f4f6fa !important;color:var(--navy) !important}
.module-tab.active{background:#fff4ee !important;color:var(--brand-600) !important;box-shadow:inset 0 0 0 1px rgba(239,106,36,.25)}
.card,.stat-card,.login-card,.detail-panel,.case-list-panel,.action-panel,.evidence-section{
  background:var(--surface) !important;border:1px solid var(--line) !important;border-radius:var(--radius) !important;box-shadow:var(--shadow) !important;}
.content-module{gap:16px}
.sidebar{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}
input,select,textarea{border:1px solid #d7dbe3 !important;border-radius:9px !important;background:#fff !important;color:var(--ink) !important;min-height:40px}
input:focus,select:focus,textarea:focus{outline:none !important;border-color:var(--brand) !important;box-shadow:var(--ring) !important}
label{color:#4a5568}
.case-list-panel,.detail-panel{padding:16px}
.case-item{border:1px solid var(--line);border-radius:11px;background:#fff;transition:border-color .15s,box-shadow .15s}
.case-item:hover,.case-item.active{border-color:var(--brand);box-shadow:0 0 0 1px rgba(239,106,36,.15)}
.pill{border-radius:999px;font-weight:600;font-size:11.5px;padding:3px 10px;border:1px solid transparent}
.pill.navy{background:#eaf0f9 !important;color:var(--navy) !important;border-color:#d8e2f1 !important}
.pill.ok{background:#e8f7ee !important;color:#137a3d !important;border-color:#c6ecd3 !important}
.pill.danger{background:#fdecec !important;color:#c0392b !important;border-color:#f6cfcf !important}
.mini-pill{border-radius:999px;background:#f1f4f8;border:1px solid #e4e9f0;color:#516079;font-size:11px;padding:2px 9px}
.stat-card strong{color:var(--navy)}
.login-panel h1{letter-spacing:-.5px}
.login-card{padding:26px}
.empty-state{color:var(--muted);text-align:center;padding:26px}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:#cdd4de;border-radius:8px;border:2px solid var(--bg)}
*::-webkit-scrollbar-thumb:hover{background:#b9c1cd}
/* keep the small aligned form-controls from the earlier fix authoritative */
.admin-form input[type=checkbox],.admin-form input[type=radio],.check-option input,
.bc-target input[type=radio],.chip-grid input[type=checkbox],
#broadcastCompose input[type=checkbox],#broadcastCompose input[type=radio]{
  width:16px !important;height:16px !important;min-width:16px !important;min-height:0 !important;
  padding:0 !important;margin:0 !important;border:0 !important;background:none !important;box-shadow:none !important;accent-color:var(--navy)}

/* ===== List pagination ===== */
.pager{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:12px 2px 2px}
.pager .pg-info{font-size:12.5px;color:var(--muted)}
.pager .pg-btns{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.pg-btn{min-height:32px;min-width:34px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--navy);font-size:13px;font-weight:600;cursor:pointer}
.pg-btn:hover:not(:disabled){background:#f4f6fa;border-color:#d5dae3}
.pg-btn.act{background:var(--brand);border-color:var(--brand);color:#fff}
.pg-btn:disabled{opacity:.45;cursor:not-allowed}
.pg-dots{padding:0 4px;color:var(--muted)}

/* ===== Bank Referral (lead source / commission) — internal ===== */
.br-block { border:1px solid #e6e9f0; }
.br-title { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.br-title h3 { margin:0 0 2px; }
.br-title p { margin:0; font-size:12.5px; color:#6b7482; max-width:520px; }
.br-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
.br-person { border:1px solid #eef1f5; border-radius:10px; padding:12px 14px; margin:12px 0; background:#fbfcfe; }
.br-person-head { font-weight:600; font-size:13.5px; color:#12203a; margin-bottom:10px; }
.br-person-head .req { color:#ef6a24; }
.br-photo { display:flex; align-items:center; gap:14px; margin-top:10px; flex-wrap:wrap; }
.br-photo-thumb { width:84px; height:84px; border-radius:10px; border:1px dashed #cfd6e0; display:flex; align-items:center; justify-content:center; overflow:hidden; background:#fff; font-size:11px; text-align:center; }
.br-img { width:84px; height:84px; object-fit:cover; border-radius:10px; }
.br-photo-pick { font-size:12.5px; color:#33465c; }
.br-status { margin-left:12px; font-size:12.5px; }
.br-status.ok { color:#1e7d43; }
.br-status.danger { color:#c3392b; }
.pill.navy { background:#12203a; color:#fff; }

/* ===== Case detail: full-width stage + status tabs (v12) — mobile friendly ===== */
.case-stage { display: block; }
.case-list-view { width: 100%; background: #fff; border: 1px solid rgba(6,31,61,0.08); border-radius: 12px; padding: 14px; }
.case-detail-view { width: 100%; }
.case-detail-view .back-btn { margin-bottom: 12px; }

/* Case list uses the whole width as a responsive grid of cards */
#caseListView .case-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* Next-step banner — highlighted when a CMS action is pending */
.case-next {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: 12px; margin-bottom: 14px;
  background: #f2f5f9; border: 1px solid #e4e9f0;
}
.case-next .cn-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 2px; }
.case-next strong { font-size: 15px; color: var(--navy); }
.case-next.action { background: linear-gradient(135deg,#fff4ec,#ffe9d8); border-color: #ffcfa8; }
.case-next.action strong { color: #b5450a; }
.case-next .primary { white-space: nowrap; min-height: 0; padding: 10px 16px; }

/* Tab bar */
.ctabs { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #e7ebf1; }
.ctab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid #e0e6ee; background: #fff; color: #46536a; font-size: 13px; font-weight: 600; min-height: 0;
}
.ctab .ctab-dot { width: 8px; height: 8px; border-radius: 50%; background: #cfd6e0; flex: 0 0 auto; }
.ctab.done { color: #137a3d; border-color: #bfe6cd; background: #f0faf4; }
.ctab.done .ctab-dot { background: #1aa257; }
.ctab.todo { color: #5a6472; }
.ctab.todo .ctab-dot { background: #cfd6e0; }
.ctab.info { color: #4a5566; }
.ctab.info .ctab-dot { background: #9fb0c4; }
.ctab.action { color: #b5450a; border-color: #ffcfa8; background: #fff4ec; }
.ctab.action .ctab-dot { background: #ff6b00; }
.ctab .ctab-flag { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #ff6b00; color: #fff; font-size: 11px; font-weight: 800; }
.ctab.active { box-shadow: 0 0 0 2px var(--navy) inset; color: var(--navy); }
.ctab.active.done { box-shadow: 0 0 0 2px #1aa257 inset; color: #137a3d; }
.ctab.active.action { box-shadow: 0 0 0 2px #ff6b00 inset; color: #b5450a; }

/* Panes — only the active one shows */
.cpanes { display: block; }
.cpane { display: none; }
.cpane.active { display: grid; gap: 12px; }
.cpane .card { padding: 14px; }
.cpane .card h4 { margin: 0 0 8px; font-size: 14px; color: var(--navy); }

/* Mobile */
@media (max-width: 720px) {
  .ctabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ctab { flex: 0 0 auto; }
  .case-next { flex-direction: column; align-items: stretch; }
  .case-next .primary { width: 100%; }
  #caseListView .case-list { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ===== Incoming video-verification call ring ===== */
#ringOverlay { position: fixed; inset: 0; z-index: 4000; display: none; align-items: center; justify-content: center; background: rgba(6,31,61,.55); backdrop-filter: blur(3px); }
.ring-card { position: relative; width: 320px; max-width: 92vw; background: #fff; border-radius: 18px; padding: 26px 22px 20px; text-align: center; box-shadow: 0 30px 80px rgba(6,31,61,.45); border-top: 6px solid #ef6a24; }
.ring-badge { width: 66px; height: 66px; margin: 0 auto 12px; border-radius: 50%; background: #fff4ec; display: flex; align-items: center; justify-content: center; font-size: 30px; position: relative; z-index: 2; }
.ring-ripple { position: absolute; top: 20px; left: 50%; width: 66px; height: 66px; margin-left: -33px; border-radius: 50%; border: 3px solid #ef6a24; opacity: .6; animation: ringpulse 1.4s ease-out infinite; }
@keyframes ringpulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.4); opacity: 0; } }
.ring-card h3 { margin: 4px 0 6px; font-size: 15px; color: #12203a; }
.ring-who { margin: 0; font-size: 20px; font-weight: 800; color: #12203a; }
.ring-sub { margin: 2px 0 16px; font-size: 12.5px; color: #6b7482; }
.ring-actions { display: flex; gap: 10px; justify-content: center; }
.ring-answer, .ring-dismiss { border: 0; border-radius: 24px; padding: 12px 22px; font-size: 14px; font-weight: 700; cursor: pointer; }
.ring-answer { background: #1aa257; color: #fff; }
.ring-dismiss { background: #eef1f5; color: #33465c; }
.ring-hint { margin: 12px 0 0; font-size: 10.5px; color: #9aa4b1; }


/* Document review: a document the customer has been asked to send again. */
.doc-flag {
  margin: 6px 0 4px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #fdecea;
  border: 1px solid #f3c7c0;
  color: #96271a;
  font-size: 13px;
  font-weight: 600;
}
.evidence-actions .doc-review { margin-left: 6px; font-size: 12.5px; }


/* Timeline: who completed each step, and when. */
.timeline-item .tl-copy { display: flex; flex-direction: column; gap: 2px; }
.timeline-item .tl-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.detail-history li .by { display: block; font-size: 12px; color: var(--navy); font-weight: 600; }
.detail-history li .by.muted { color: var(--muted); font-weight: 400; }

/* Identity card in the RM verification console: UIDAI's photo of the Aadhaar
   holder beside the verified details, so the live call has something official
   to be compared against. */
.kycid { display: flex; gap: 14px; align-items: flex-start; }
.kycid-rows { flex: 1; min-width: 0; }
.kycid-photo { flex: 0 0 96px; width: 96px; }
.kycid-photo img { width: 96px; height: 118px; object-fit: cover; border-radius: 8px; border: 1px solid #dfe3e8; background: #f4f6f9; display: block; }
.kycid-cap { font-size: 10.5px; color: #7a828e; text-align: center; margin-top: 4px; letter-spacing: .02em; }
.kycid-nophoto { width: 96px; height: 118px; border: 1px dashed #dfe3e8; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; color: #9aa2ad; padding: 6px; box-sizing: border-box; }
@media (max-width: 560px) { .kycid { flex-direction: column; } }

/* ==========================================================================
   Website Enquiries module
   ========================================================================== */
.enquiry-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 12px; }
.enquiry-toolbar #enquirySearch { flex: 1 1 220px; min-width: 180px; }
.enquiry-toolbar #enquiryStatusFilter { flex: 0 0 auto; }

.enquiry-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.enq-card { background: #fff; border: 1px solid #e4e7ee; border-left: 4px solid #cfd5df; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.enq-card.status-new { border-left-color: #e0891f; }
.enq-card.status-in_progress { border-left-color: #1257d6; }
.enq-card.status-resolved, .enq-card.status-closed { border-left-color: #12a05a; }

.enq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.enq-head strong { display: block; font-size: 15px; color: #061f3d; }
.enq-phone { font-size: 13px; color: #1257d6; text-decoration: none; font-variant-numeric: tabular-nums; }
.enq-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.enq-meta { font-size: 11.5px; color: #8a929e; }
.enq-subject { font-size: 13.5px; font-weight: 700; color: #26364c; }
.enq-message { margin: 0; font-size: 13.5px; color: #435062; line-height: 1.6; white-space: pre-wrap; }
.enq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.enq-chip { background: #f3f5f9; border: 1px solid #e4e7ee; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; color: #435062; }
.enq-chip em { font-style: normal; color: #8a929e; margin-right: 4px; }
.enq-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.enq-actions .enq-status { flex: 0 0 auto; }
.enq-actions .enq-note { flex: 1 1 160px; min-width: 140px; }
.enq-handled { font-size: 11px; color: #8a929e; }
/* Base .pill is already amber, which is what "New" wants; name it so the markup
   reads intentionally rather than relying on an undefined class falling back. */
.pill.warn { border-color: rgba(201, 134, 43, 0.5); color: #7c4a03; background: #fff7d6; }
/* Enquiry cards are narrow — the 104px pill minimum crowds them. */
.enq-badges .pill { min-width: 0; min-height: 24px; padding: 3px 10px; font-size: 10.5px; font-weight: 800; }

/* ==========================================================================
   Login: Operations Team vs Merchant Partner
   Two radios styled as a segmented control. Radios rather than buttons so the
   choice is exclusive to assistive tech as well as to the eye.
   ========================================================================== */
.login-stack { display: grid; gap: 14px; align-content: start; }

.portal-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px; border: 1px solid rgba(234, 216, 187, 0.86); border-radius: 10px; background: #fbf7f0; }
.portal-option { position: relative; margin: 0; display: block; cursor: pointer; }
.portal-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.portal-option span { display: block; padding: 10px 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; text-align: center; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.portal-option strong { display: block; font-size: 13.5px; color: #314963; line-height: 1.3; }
.portal-option small { display: block; margin-top: 2px; font-size: 11px; color: #8a929e; }
.portal-option input:checked + span { background: #fff; border-color: rgba(201, 134, 43, 0.55); box-shadow: 0 4px 12px rgba(15, 37, 68, .07); }
.portal-option input:checked + span strong { color: var(--navy, #061f3d); }
.portal-option input:focus-visible + span { outline: 2px solid #1257d6; outline-offset: 2px; }

.login-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; max-width: 560px; }
.login-points li { position: relative; padding-left: 26px; font-size: 15.5px; color: #233c5a; line-height: 1.5; }
.login-points li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 18px; height: 18px; border-radius: 50%; background: #eefaf3; color: #137a3d; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }

.merchant-tabs { display: flex; gap: 6px; border-bottom: 1px solid rgba(234, 216, 187, 0.86); margin-bottom: 4px; }
.mtab { appearance: none; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: #8a929e; padding: 8px 4px; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer; }
.mtab.active { color: var(--navy, #061f3d); border-bottom-color: #e0891f; }

.merchant-notice { background: #fff8ec; border: 1px solid #f4dcb4; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.merchant-notice strong { display: block; font-size: 13.5px; color: #7a5a15; margin-bottom: 4px; }
.merchant-notice span { font-size: 12.5px; color: #8a6f30; line-height: 1.55; }
.merchant-lede { font-size: 13px; color: #5b6675; line-height: 1.55; margin-bottom: 12px; }
.merchant-help { margin-top: 14px; font-size: 12px; color: #8a929e; line-height: 1.55; }
#merchantCard form { display: grid; gap: 12px; }
.merchant-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#merchantCard textarea { font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid #d9dee6; border-radius: 8px; resize: vertical; color: #314963; }
.status.ok { color: #137a3d; font-weight: 600; }
.status.err { color: #b42318; font-weight: 600; }

@media (max-width: 720px) {
  .portal-switch { grid-template-columns: 1fr; }
  .merchant-row { grid-template-columns: 1fr; }
}
/* Link styled as a primary button — the merchant panes now hand people off to
   the separate Partner Portal instead of pretending to log them in here. */
a.portal-link{display:block;text-align:center;text-decoration:none;padding:12px;border-radius:8px;background:var(--navy,#061f3d);color:#fff;font-weight:700;font-size:14px}
a.portal-link:hover{opacity:.92}

/* ==========================================================================
   Partner desk — pagination, query rows, threads
   ========================================================================== */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 4px; }
.pager .ghost { padding: 7px 12px; font-size: 13px; }
.pager .ghost:disabled { opacity: .4; cursor: not-allowed; }
.pager-info { font-size: 12px; color: #8a929e; font-variant-numeric: tabular-nums; }

/* Status is carried by colour so the list can be scanned, not read. */
.enq-row { border-left: 4px solid #cfd5df; }
.enq-row.st-new { border-left-color: #e0891f; }
.enq-row.st-in_progress { border-left-color: #1257d6; }
.enq-row.st-resolved { border-left-color: #12a05a; }
.enq-row.st-closed { border-left-color: #98a2b3; }

.enq-origin { font-size: 12px; font-weight: 700; margin: 4px 0 2px; }
.enq-origin.is-partner { color: #0b5c8a; }
.enq-origin.is-new { color: #8a5a00; }
.enq-flag { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 800; color: #b42318; background: #fdeceb; border-radius: 999px; padding: 2px 9px; }

.enq-origin-banner { border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.55; margin-bottom: 12px; }
.enq-origin-banner.is-partner { background: #eaf4fb; border: 1px solid #bcdcf0; color: #0b4a6e; }
.enq-origin-banner.is-new { background: #fff8ec; border: 1px solid #f4dcb4; color: #7a5a15; }

.thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.msg { border-radius: 12px; padding: 10px 12px; background: #f3f5f9; border: 1px solid #e4e7ee; }
.msg.staff { background: #eaf4fb; border-color: #cbe3f4; }
.msg.system { background: #fafbfc; border-style: dashed; }
.msg.internal { background: #fff8ec; border-color: #f4dcb4; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #5c6a7d; }
.msg-head strong { font-size: 12.5px; color: #061f3d; }
.msg-head time { margin-left: auto; font-size: 11px; color: #98a2b3; }
.msg p { margin: 6px 0 0; font-size: 13.5px; color: #33465c; line-height: 1.6; white-space: pre-wrap; }
.msg-tag { font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: #eef2f8; color: #5c6a7d; }
.msg-tag.ok { background: #eefaf3; color: #137a3d; }
.msg-tag.warn { background: #fff7d6; color: #7c4a03; }
.msg-file { margin-top: 8px; padding: 6px 11px; font-size: 12.5px; }

.grouptags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.grouptag { font-size: 10.5px; font-weight: 700; background: #eef2f8; color: #5c6a7d; border-radius: 999px; padding: 2px 9px; }

/* Export group in the partner toolbar — three formats, one control. */
.exportbar { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid rgba(234, 216, 187, 0.86); border-radius: 999px; background: #fbf7f0; }
.exportbar > span { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #8a929e; }
.exportbar .ghost { padding: 6px 12px; font-size: 12.5px; border-radius: 999px; }
.enquiry-toolbar input { min-width: 0; }
.enquiry-toolbar #partnerPincode { max-width: 110px; }
.enquiry-toolbar #partnerCity,
.enquiry-toolbar #partnerArea,
.enquiry-toolbar #partnerState { max-width: 130px; }

/* Document review rows on the partner detail. */
.docrow { border: 1px solid #e4e7ee; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.docrow-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.docrow-name { font-size: 13.5px; font-weight: 700; color: #061f3d; }
.docrow-name small { display: block; font-weight: 400; font-size: 11.5px; color: #8a929e; word-break: break-all; }
.docrow-note { margin-top: 8px; background: #fdeceb; border: 1px solid #f6cfcb; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: #96271a; line-height: 1.5; }
.docrow-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.docrow-actions .ghost { padding: 6px 12px; font-size: 12.5px; }
.docrow-reject { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.docrow-reject input { flex: 1 1 220px; min-width: 160px; }
.docrow-reject .primary, .docrow-reject .ghost { padding: 7px 13px; font-size: 12.5px; width: auto; }
.docrow .pill { min-width: 0; min-height: 22px; padding: 3px 10px; font-size: 10.5px; }

/* Always on show under the staff login: a partner who lands here is told where
   their own portal is, rather than trying credentials that can never work. */
.staff-only-note { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid rgba(234, 216, 187, 0.7); font-size: 12px; line-height: 1.6; color: #8a929e; }
.staff-only-note a { color: #1257d6; font-weight: 600; }

/* Filter strips that sit in a toolbar rather than the sidebar. `.tabs` is a
   vertical grid because the Cases filter lives in the left rail; these two run
   across the top of their module instead. */
.tabs-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs-row .tab { justify-content: center; text-align: center; padding: 0 16px; min-height: 36px; white-space: nowrap; }

/* The two counts a Partner Manager acts on, called out when they are not zero. */
.stat-card.kpi-new.hot { border-color: rgba(201, 134, 43, .55); background: #fff8ec; }
.stat-card.kpi-new.hot strong { color: #9a6a00; }

/* File pickers inside the Add-partner form — plain inputs there look like empty
   text boxes. */
#partnerDetail input[type="file"] { padding: 8px 10px; font-size: 13px; background: #fff; }

/* An explicit way into the review panel — the whole card is clickable, but the
   button says so. */
.case-card .card-open { width: 100%; margin-top: 10px; min-height: 34px; font-size: 12.5px; }

/* --- Partners: the register uses the Employees card layout --- */
#partnerList.employee-grid { margin-top: 4px; }
#partnerList .employee-card .ec-line b { font-weight: 800; color: #9a6a00; }
#partnerList .grouptags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* the applicant's own photograph at the head of their file */
.pd-ident { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pd-avatar { width: 62px; height: 62px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(234, 216, 187, 0.9); background: #fff; flex: 0 0 auto; }
.pd-ident h3 { margin: 0 0 2px; }

/* the search box is the widest thing in the toolbar — it searches the whole
   register, not just the page on screen */
.enquiry-toolbar #partnerSearch { flex: 1 1 260px; min-width: 200px; }

/* busy marker on the partner search — the query runs across the whole register */
.searchwrap { position: relative; display: flex; flex: 1 1 260px; min-width: 200px; }
.searchwrap input { flex: 1; padding-right: 34px; }
.spin { position: absolute; right: 10px; top: 50%; width: 15px; height: 15px; margin-top: -8px;
  border: 2px solid rgba(6, 31, 61, .18); border-top-color: var(--orange, #ff6b00);
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pager-jump { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pager-jump input { width: 68px; padding: 6px 8px; text-align: center; }

/* What the Partners list is currently filtered by. Filters combine, so all of
   them have to be visible at once — a short page of results is misleading when
   you cannot see the four filters that produced it. */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 0 0 12px; padding: 9px 14px; border: 1px solid rgba(234, 216, 187, .9);
  border-radius: 8px; background: #fbf7f0; font-size: 12.5px; }
.filterbar .fb-label { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.filterbar .fb-terms { font-weight: 800; color: var(--navy, #061f3d); }
.filterbar .fb-count { color: var(--muted); margin-left: auto; }
.filterbar .ghost { min-height: 28px; padding: 4px 12px; font-size: 12px; margin-top: 0; width: auto; }
.enquiry-toolbar #partnerGroupFilter { flex: 0 0 auto; max-width: 210px; }
.enquiry-toolbar #partnerDistrict { max-width: 130px; }

/* --- Partners: a calmer module header and toolbar (v35) --- */
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-self: end; }
.head-actions .ghost, .head-actions .primary { width: auto; margin-top: 0; white-space: nowrap; }

/* Six KPI cards wrapped 5 + 1 and looked broken. Three per row divides evenly. */
#partnerKpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { #partnerKpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The location boxes belong together, and the bank select should not eat a row. */
.enquiry-toolbar #partnerBankFilter { flex: 0 0 auto; width: auto; min-width: 180px; max-width: 220px; }
.filtergroup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 12px 8px 10px; border: 1px dashed rgba(6, 31, 61, .16); border-radius: 10px; background: #fcfcfd; }
.filtergroup .fg-label { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.filtergroup input { max-width: 118px; }
.filtergroup #partnerGroupFilter { max-width: 190px; }
.statetoggle { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.statetoggle .ghost, .statetoggle .primary { width: auto; margin-top: 0; }
.statetoggle .ghost.danger { color: #b42318; border-color: rgba(180, 35, 24, .3); }
.statenow { font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 999px; }
.statenow.on { color: #137a3d; background: #eefaf3; }
.statenow.off { color: #b42318; background: #fdf0ee; }

/* --- Partner file: references, and the status pill as an on/off switch (v36) --- */
.refblock { border: 1px solid rgba(234, 216, 187, .8); border-radius: 10px; padding: 13px 15px; margin-bottom: 10px; background: #fdfbf7; }
.reftag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #8a5a00; background: var(--warn-bg, #fff6e6); border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }
.refname { font-size: 15px; font-weight: 800; color: var(--navy, #061f3d); margin-bottom: 8px; }
.refrows { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; }
.refrows span { font-size: 13px; color: #314963; }
.refrows b { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2px; }
.refrows a { color: #1257d6; font-weight: 700; text-decoration: none; }
.refrows a:hover { text-decoration: underline; }

/* One click to switch a partner on or off, from the top of their file. */
.statepill { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 14px;
  border-radius: 999px; font-size: 13px; font-weight: 800; cursor: pointer; width: auto; margin-top: 0;
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease; }
.statepill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.statepill .swap { font-size: 11px; font-weight: 700; opacity: 0; padding-left: 8px;
  border-left: 1px solid currentColor; transition: opacity .15s ease; }
.statepill:hover .swap, .statepill:focus-visible .swap { opacity: .85; }
.statepill.on { color: #137a3d; background: #eefaf3; border-color: rgba(19, 122, 61, .28); }
.statepill.off { color: #b42318; background: #fdf0ee; border-color: rgba(180, 35, 24, .28); }
.statepill.on:hover { background: #fdf0ee; color: #b42318; border-color: rgba(180, 35, 24, .32); }
.statepill.off:hover { background: #eefaf3; color: #137a3d; border-color: rgba(19, 122, 61, .32); }
