/* =============================================================
   Nirmaata UI — Light Theme CSS
   Dashboard + Shell (other views) override layer
   ============================================================= */

/* =============================================================
   SHELL LAYOUT — Light theme overrides for non-dashboard views
   (nrps-shell, nrps-sidebar, nrps-content, nrps-app-header)
   ============================================================= */

/* ── Body / page background ──────────────────────────────── */
body{
    background:#f4f7fb;
    color:#0f172a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

input,
select,
textarea {
  outline: none;
  box-shadow: none;
}

input:hover,
input:focus,
input:active,
select:hover,
select:focus,
select:active,
textarea:hover,
textarea:focus,
textarea:active {
  outline: none !important;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: none !important;

  /* Remove Tailwind ring */
  --tw-ring-shadow: 0 0 #0000;
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
}

[hidden] {
    display: none !important;
}

/* ── Shell grid ──────────────────────────────────────────── */
.nrps-shell {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: 100vh;
}

/* ── Sidebar — keep existing dark style, just tighten gaps ── */
.nrps-sidebar {
  background: rgb(15, 15, 93);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Content area ────────────────────────────────────────── */
.nrps-content {
  background: #f4f7fb;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Top app bar — replace dark gradient with clean light bar ── */
.nrps-app-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
}
.nrps-app-header div {
  display: grid;
  justify-items: end;
}
.nrps-app-header strong {
  font-size: 0.875rem;
  font-weight: 800;
  color: #0f172a;
}
.nrps-app-header span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ── Inner content padding ───────────────────────────────── */
.nrps-content > *:not(.nrps-app-header) {
  padding: 1.5rem 1.75rem;
}
/* But not nested children — only direct children after the header */
.nrps-content > .nrps-app-header + * {
  padding-top: 1.5rem;
}

/* ── Page title / subtitle inside content ────────────────── */
.nrps-title h1 {
  color: #0f172a;
  font-size: 1.65rem;
  font-weight: 900;
  margin: 0;
}
.nrps-title p {
  color: #64748b;
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

/* ── Topbar / page header bar ────────────────────────────── */
.nrps-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Inputs / selects — light card style ─────────────────── */
.nrps-input,
.nrps-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.7rem 1rem;
  color: #0f172a;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nrps-input:focus,
.nrps-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.nrps-select option {
  color: #0f172a;
  background: #ffffff;
}

/* ── Action buttons inside shell ─────────────────────────── */
.nrps-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.7rem 1.1rem;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.nrps-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.nrps-action.primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}
.nrps-action.primary:hover {
  background: #4338ca;
  border-color: #4338ca;
}

/* ── Nav active/hover — already good in app.css, just ensure ─ */
.nrps-nav a.active {
  background: #1167ff;
  color: #fff;
}
.nrps-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* ── Sidebar user card ───────────────────────────────────── */
.nrps-sidebar-user {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 31, 52, 0.96), rgba(8, 18, 31, 0.98));
  border-radius: 1rem;
  padding: 1rem;
  margin-top: 1.75rem;
}
.nrps-sidebar-user p {
  color: #fff;
  font-weight: 900;
  margin: 0;
}
.nrps-sidebar-user span {
  display: block;
  color: #19c37d;
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 0.25rem;
}
.nrps-sidebar-user button {
  width: 100%;
  text-align: left;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eaf2ff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.65rem 0.875rem;
  margin-top: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.nrps-sidebar-user button:hover {
  background: rgba(17, 103, 255, 0.2);
}

/* ── Glass / soft card inside content ────────────────────── */
.nrps-glass,
.nrps-soft {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ── Tabs ────────────────────────────────────────────────── */
.nrps-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.nrps-tab {
  border-radius: 0.75rem;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  background: transparent;
  color: #64748b;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nrps-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.nrps-tab.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

/* ── KPI grid ────────────────────────────────────────────── */
.nrps-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.nrps-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.nrps-kpi-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 2.75rem;
  margin-bottom: 0.85rem;
}

.nrps-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.75rem;
  font-size: 0.86rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-align: center;
}

.nrps-icon.green { background: rgba(25, 195, 125, 0.14); color: #059669; }
.nrps-icon.blue { background: rgba(17, 103, 255, 0.14); color: #1167ff; }
.nrps-icon.orange { background: rgba(255, 159, 28, 0.16); color: #f59e0b; }
.nrps-icon.violet { background: rgba(124, 92, 255, 0.14); color: #7c5cff; }
.nrps-icon.cyan { background: rgba(24, 214, 255, 0.16); color: #0891b2; }
.nrps-icon.red { background: rgba(255, 77, 90, 0.14); color: #dc2626; }

#nrps-dashboard .nrps-kpi > span {
  display: block;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
}

#nrps-dashboard .nrps-kpi > strong {
  display: block;
  margin-top: 0.55rem;
  color: #0f172a;
  font-size: 1.6rem;
  line-height: 1.1;
  font-weight: 950;
}

#nrps-dashboard .nrps-kpi > small {
  display: block;
  margin-top: 0.65rem;
  color: #10b981;
  font-size: 0.82rem;
  font-weight: 850;
}

/* ── Responsive: collapse sidebar on mobile ──────────────── */
@media (max-width: 1024px) {
  .nrps-shell {
    grid-template-columns: 1fr;
  }
  .nrps-sidebar {
    display: none;
  }
}

/* ── Reset: neutralize app.css main element constraint ──────── */
main.unified-main {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding-block: 0 !important;
}

/* ── Reset: neutralize app.css global element color rules ───── */
#nrps-dashboard p {
  color: inherit;
}
#nrps-dashboard h1,
#nrps-dashboard h2 {
  color: inherit;
  margin: 0;
}

/* ── Reset: neutralize app.css global button/input rules ────── */
#nrps-dashboard button {
  background: transparent;
  color: inherit;
  border: none;
  border-radius: 0;
  padding: 0;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}
#nrps-dashboard button:hover {
  background: transparent;
}
#nrps-dashboard :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  width: auto;
  min-height: 2.75rem;
  border: 1px solid var(--dash-border);
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--dash-text);
  background: #fff;
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
#nrps-dashboard :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea):focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* ── Reset: neutralize app.css global table rules ───────────── */
#nrps-dashboard table {
  width: 100%;
  border-collapse: collapse;
}
#nrps-dashboard th {
  background: transparent;
  color: inherit;
  font-size: inherit;
  text-transform: uppercase;
  letter-spacing: normal;
  padding: 12px 0px;
  border-top: none;
}
#nrps-dashboard td {
  padding: 0;
  border-top: none;
}

/* Shared NRPS page controls, panels and data tables */
#nrps-dashboard .dash-main > .page-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin: -0.35rem 0 1rem;
}
#nrps-dashboard .dash-main > .page-head > div:first-child {
  display: none;
}
#nrps-dashboard .dash-main > .page-head:not(:has(.action-link, .btn, button, a[href])) {
  display: none;
}
#nrps-dashboard .dash-main > .nrps-topbar {
  justify-content: flex-end;
}
#nrps-dashboard .dash-main > .nrps-topbar .nrps-title {
  display: none;
}
#nrps-dashboard .panel,
#nrps-dashboard .table-wrap,
#nrps-dashboard .nrps-card {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
#nrps-dashboard .panel {
  margin-bottom: 1.5rem;
}
#nrps-dashboard .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--dash-border);
}
#nrps-dashboard .panel-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--dash-text);
}
#nrps-dashboard .panel-body {
  padding: 1.25rem;
}
#nrps-dashboard .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  align-items: end;
}
#nrps-dashboard .form-grid label,
#nrps-dashboard .field {
  display: grid;
  gap: 0.45rem;
}
#nrps-dashboard label > span,
#nrps-dashboard .field-label {
  color: var(--dash-text);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}
#nrps-dashboard .form-grid input:not([type="checkbox"]):not([type="radio"]),
#nrps-dashboard .form-grid select,
#nrps-dashboard .form-grid textarea,
#nrps-dashboard .panel input:not([type="checkbox"]):not([type="radio"]),
#nrps-dashboard .panel select,
#nrps-dashboard .panel textarea {
  width: 100%;
}
#nrps-dashboard .form-grid .check-row {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.2rem 0;
  color: var(--dash-text);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: none;
}
#nrps-dashboard .form-grid .check-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex: 0 0 auto;
}
#nrps-dashboard .panel button,
#nrps-dashboard .action-link,
#nrps-dashboard .btn,
#nrps-dashboard .button,
#nrps-dashboard a.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.65rem 1rem;
  background: #1167ff;
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(17, 103, 255, 0.16);
  box-sizing: border-box;
  white-space: nowrap;
}
#nrps-dashboard .action-link {
  background: #eef2ff;
  color: #1d4ed8;
  box-shadow: none;
}
#nrps-dashboard .topbar-btn.test {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
  box-shadow: none;
}
#nrps-dashboard .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  border-radius: 0.7rem;
  padding: 0.65rem 1rem;
  background: #fff;
  color: #1d4ed8;
  border-color: var(--dash-border);
  box-shadow: none;
  font-weight: 900;
  font-size: 0.85rem;
  text-decoration: none;
}
#nrps-dashboard .btn-secondary:hover {
  background: #f8fafc;
  color: #1d4ed8;
}
#nrps-dashboard .table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}
#nrps-dashboard .data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}
#nrps-dashboard .nrps-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.88rem;
}
#nrps-dashboard .nrps-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--dash-border);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}
#nrps-dashboard .nrps-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #edf2f7;
}
#nrps-dashboard .nrps-table-wrap {
  overflow-x: auto;
}
#nrps-dashboard .data-table thead {
  background: #f8fafc;
}
#nrps-dashboard .data-table th {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--dash-border);
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}
#nrps-dashboard .data-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #edf2f7;
  color: var(--dash-text);
  vertical-align: middle;
}
#nrps-dashboard .data-table tbody tr:hover {
  background: #f8fafc;
}
#nrps-dashboard .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}
#nrps-dashboard .badge-brand,
#nrps-dashboard .badge-info {
  background: #eef2ff;
  color: #1d4ed8;
}
#nrps-dashboard .badge-success,
#nrps-dashboard .badge-green {
  background: #dcfce7;
  color: #15803d;
}
#nrps-dashboard .badge-warning,
#nrps-dashboard .badge-orange {
  background: #ffedd5;
  color: #c2410c;
}
#nrps-dashboard .badge-danger,
#nrps-dashboard .badge-red {
  background: #fee2e2;
  color: #b91c1c;
}
#nrps-dashboard .muted {
  color: #64748b;
}
#nrps-dashboard .log-json {
  max-width: 32rem;
  max-height: 7.5rem;
  overflow: auto;
  margin: 0;
  padding: 0.65rem;
  border-radius: 0.6rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.75rem;
  white-space: pre-wrap;
}

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --dash-bg:        #f4f7fb;
  --dash-card-bg:   #ffffff;
  --dash-border:    #e2e8f0;
  --dash-text:      #0f172a;
  --dash-muted:     #64748b;
  --dash-muted-sm:  #94a3b8;
  --dash-sidebar-bg:rgb(15, 15, 93);

  --dash-blue:      #1167ff;
  --dash-cy:        #18d6ff;
  --dash-green:     #19c37d;
  --dash-orange:    #ff9f1c;
  --dash-red:       #ff4d5a;
  --dash-violet:    #7c5cff;
}

/* ── Scrollbar ───────────────────────────────────────────── */
#nrps-dashboard * {
  scrollbar-width: thin;
  scrollbar-color: #24405f #07111f;
}

/* ── Dashboard page wrapper ──────────────────────────────── */
#nrps-dashboard {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--dash-text);
  background: var(--dash-bg);
  /* Override body background set by layout */
  background-image: none;
}

/* ── Overlay for mobile sidebar ──────────────────────────── */
#nrps-dashboard #overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 40;
}
#nrps-dashboard #overlay.open {
  display: block;
}

/* ── Sidebar ─────────────────────────────────────────────── */
#nrps-dashboard #sidebar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  height: 100vh;
  width: 18rem;          /* 288px / w-72 */
  background: rgb(15, 15, 93);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

/* Logo area */
#nrps-dashboard .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
#nrps-dashboard .sidebar-brand img {
  width: 13rem;
  height: auto;
}

/* Nav */
#nrps-dashboard .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.875rem;
}
#nrps-dashboard .sidebar-nav-section-title {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

/* Nav item */
#nrps-dashboard .nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.75rem;
  color: #cbd5e1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
#nrps-dashboard .nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
#nrps-dashboard .nav-item.active {
  background: var(--dash-blue);
  color: #fff;
  box-shadow: 0 0 28px rgba(17, 103, 255, 0.22);
  font-weight: 700;
}
#nrps-dashboard .nav-item svg,
#nrps-dashboard .nav-item i {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

/* Sidebar user card */
#nrps-dashboard .sidebar-user-card {
  margin-top: 2rem;
  background: linear-gradient(180deg, rgba(16, 31, 52, 0.96), rgba(8, 18, 31, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  color: #eaf2ff;
}
#nrps-dashboard .sidebar-user-card p {
  color: inherit;
  font-weight: 700;
}
#nrps-dashboard .sidebar-user-card .user-role {
  color: var(--dash-green);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
#nrps-dashboard .sidebar-user-card form {
  margin-top: 1rem;
}
#nrps-dashboard .sidebar-user-card .logout-btn {
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(16, 31, 52, 0.96), rgba(8, 18, 31, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eaf2ff;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  transition: background 0.15s;
}
#nrps-dashboard .sidebar-user-card .logout-btn:hover {
  background: rgba(17, 103, 255, 0.2);
}

/* Pending badge inside nav */
#nrps-dashboard .nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
}

/* ── Main content area ───────────────────────────────────── */
#nrps-dashboard .dash-main {
  margin-left: 18rem;
  width: auto;
  max-width: none;
  margin-right: 0;
  margin-inline-end: 0;
  padding: 1rem 1.5rem 2rem;
  min-height: 100vh;
}

/* ── Top header bar ─────────────────────────────────────────
   Light theme: transparent bg, dark text, soft-white controls
   ──────────────────────────────────────────────────────────── */
#nrps-dashboard .dashboard-topbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  margin-bottom: 1.25rem;
  padding: 0;
  background: transparent;
  color: var(--dash-text);
}
#nrps-dashboard .dashboard-topbar > div:first-child {
  flex: 0 0 22rem;
  min-width: 18rem;
}
#nrps-dashboard .dashboard-topbar h1,
#nrps-dashboard .dashboard-topbar .page-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--dash-text);
  margin: 0;
}
#nrps-dashboard .dashboard-topbar .page-subtitle {
  color: #64748b;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
/* Controls wrapper */
#nrps-dashboard .topbar-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex: 1 1 auto;
  min-width: 0;
}
/* Search box — white card */
#nrps-dashboard .topbar-search {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 0.75rem;
  padding: 0rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 20rem;
  max-width: 20rem;
  color: var(--dash-text);
  flex-shrink: 0;
}
#nrps-dashboard .topbar-search input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.875rem;
  flex: 1;
  color: var(--dash-text);
  font-family: inherit;
  padding: 0;
  width: auto;
  min-width: 0;
}
#nrps-dashboard .topbar-search-form {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
#nrps-dashboard .topbar-search-form input {
  width: 100%;
}
#nrps-dashboard .topbar-search input::placeholder {
  color: #94a3b8;
}
#nrps-dashboard .topbar-search .kbd-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  border: 1px solid var(--dash-border);
  border-radius: 0.25rem;
  padding: 0 0.375rem;
}
/* Selects — white card */
#nrps-dashboard .topbar-select {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.8rem;
  color: var(--dash-text);
  outline: none;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  width: 10rem;
}
#nrps-dashboard .topbar-select option {
  background: #fff;
  color: var(--dash-text);
}
#nrps-dashboard .topbar-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Buttons — white card */
#nrps-dashboard .topbar-btn {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8rem;
  color: var(--dash-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
#nrps-dashboard .topbar-btn:hover {
  background: #f1f5f9;
}
#nrps-dashboard .topbar-btn.live {
  color: var(--dash-green);
}
#nrps-dashboard .dashboard-date-picker {
  padding: 0rem 0.75rem;
}
#nrps-dashboard .dashboard-date-picker input {
  width: 7.85rem;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--dash-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
#nrps-dashboard .dashboard-date-picker input::-webkit-calendar-picker-indicator {
  cursor: pointer;
}
#nrps-dashboard .topbar-btn.export-btn {
  background: var(--dash-blue);
  border-color: var(--dash-blue);
  color: #fff;
}
#nrps-dashboard .topbar-btn.export-btn:hover {
  background: #0d56e8;
  border-color: #0d56e8;
}
#nrps-dashboard .topbar-btn.menu-btn {
  padding: 0.75rem;
}
/* User avatar */
#nrps-dashboard .topbar-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: #0d1a2b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
#nrps-dashboard .topbar-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
}


/* ── Scope / Mode tab bar ────────────────────────────────── */
#nrps-dashboard .mode-bar {
  background: #fff;
  border: 1px solid var(--dash-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  border-radius: 1rem;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
#nrps-dashboard .mode-tab {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid var(--dash-border);
  color: var(--dash-text);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
#nrps-dashboard .mode-tab:hover {
  background: #eef4ff;
}
#nrps-dashboard .mode-tab.tab-active {
  background: var(--dash-blue);
  color: #fff;
  border-color: var(--dash-blue);
}
#nrps-dashboard .mode-bar-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: auto;
}

/* ── Glass & Soft cards ──────────────────────────────────── */
#nrps-dashboard .glass {
  background: #fff;
  border: 1px solid var(--dash-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  color: var(--dash-text);
}
#nrps-dashboard .soft {
  background: #fff;
  border: 1px solid var(--dash-border);
  color: var(--dash-text);
}
/* Headings inside cards */
#nrps-dashboard .glass h1,
#nrps-dashboard .glass h2,
#nrps-dashboard .glass h3,
#nrps-dashboard .glass strong,
#nrps-dashboard .glass b,
#nrps-dashboard .soft h1,
#nrps-dashboard .soft h2,
#nrps-dashboard .soft h3,
#nrps-dashboard .soft strong,
#nrps-dashboard .soft b {
  color: var(--dash-text);
}
#nrps-dashboard .glass p,
#nrps-dashboard .soft p {
  color: inherit;
}

/* KPI cards: stand-alone soft cards need to be white */
#nrps-dashboard section .soft.rounded-2xl {
  background: #fff;
  border: 1px solid var(--dash-border);
  color: var(--dash-text);
}

/* ── Pill toggle (chart period, filter) ──────────────────── */
#nrps-dashboard .pill {
  border: 1px solid var(--dash-border);
  background: #f8fafc;
}
#nrps-dashboard .pill button,
#nrps-dashboard .pill a {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--dash-text);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  display: inline-flex;
  text-decoration: none;
}
#nrps-dashboard .pill button:hover,
#nrps-dashboard .pill a:hover {
  background: #eef4ff;
}
/* Active pill button */
#nrps-dashboard .pill button.bg-bluex,
#nrps-dashboard .pill a.bg-bluex {
  background: var(--dash-blue);
  color: #fff;
}

/* ── Grid background for charts ──────────────────────────── */
#nrps-dashboard .grid-bg {
  background:
    linear-gradient(to top,  rgba(15, 23, 42, 0.08) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px) 0 0 / 12.5% 100%;
  background-color: #f8fafc;
}

#nrps-dashboard .trend-axis-labels {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

/* ── Donut chart ─────────────────────────────────────────── */
#nrps-dashboard .donut {
  position: relative;
  border-radius: 9999px;
}
#nrps-dashboard .donut::after {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid var(--dash-border);
}

#nrps-dashboard .status-legend p {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

#nrps-dashboard .chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #64748b;
  font-weight: 800;
}

#nrps-dashboard .status-legend .float-right {
  margin-left: auto;
}

#nrps-dashboard .legend-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  flex: 0 0 auto;
}

#nrps-dashboard .legend-blue { background: #3b82f6; }
#nrps-dashboard .legend-green { background: #19c37d; }
#nrps-dashboard .legend-orange { background: #ff9f1c; }
#nrps-dashboard .legend-red { background: #ff4d5a; }

/* ── Heatmap cells ───────────────────────────────────────── */
#nrps-dashboard .heat-cell {
  height: 22px;
  border-radius: 6px;
  background: rgba(25, 195, 125, 0.18);
}
#nrps-dashboard .heat-cell:nth-child(3n) { background: rgba(25, 195, 125, 0.45); }
#nrps-dashboard .heat-cell:nth-child(4n) { background: rgba(17, 103, 255, 0.45); }
#nrps-dashboard .heat-cell:nth-child(5n) { background: rgba(25, 195, 125, 0.75); }
#nrps-dashboard .heat-cell:nth-child(7n) { background: rgba(255, 159,  28, 0.55); }

/* ── Status pills ────────────────────────────────────────── */
#nrps-dashboard .status-pill {
  padding: 0.25rem 0.55rem;
  border-radius: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  white-space: nowrap;
}

/* ── Data table (dashboard) ──────────────────────────────── */
#nrps-dashboard .desktop-table th {
  color: #94a3b8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: transparent;
  border-top: none;
  padding-bottom: 0.75rem;
}
#nrps-dashboard .desktop-table td {
  padding: 0.85rem 0.5rem;
  border-top: 1px solid #e2e8f0;
  vertical-align: top;
  color: var(--dash-text);
}
#nrps-dashboard .desktop-table tbody tr:hover {
  background: #f8fbff;
}

/* ── Real-time activity list ─────────────────────────────── */
#nrps-dashboard .activity-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

/* ── Quick action buttons ────────────────────────────────── */
#nrps-dashboard .quick-action-btn {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--dash-text);
  text-align: left;
  text-decoration: none;
  transition: background 0.15s;
}
#nrps-dashboard .quick-action-btn:hover {
  background: #f0f6ff;
}
#nrps-dashboard .quick-action-btn small {
  color: #64748b;
}
#nrps-dashboard .quick-action-btn .action-arrow {
  color: #3b82f6;
}

/* ── Report link buttons ─────────────────────────────────── */
#nrps-dashboard .report-btn {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--dash-text);
  cursor: pointer;
  display: block;
  text-decoration: none;
  transition: background 0.15s;
}
#nrps-dashboard .report-btn:hover {
  background: #f0f6ff;
}

/* ── Live badge ──────────────────────────────────────────── */
#nrps-dashboard .live-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(25, 195, 125, 0.15);
  color: var(--dash-green);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ── Color tokens (used as text/bg via Tailwind-generated classes) */
#nrps-dashboard .text-greenx  { color: var(--dash-green);  }
#nrps-dashboard .text-orangex { color: var(--dash-orange); }
#nrps-dashboard .text-redx    { color: var(--dash-red);    }
#nrps-dashboard .text-violetx { color: var(--dash-violet); }
#nrps-dashboard .text-cy      { color: var(--dash-cy);     }

/* ── Responsive: mobile sidebar ──────────────────────────── */
@media (max-width: 1024px) {
  #nrps-dashboard #sidebar {
    transform: translateX(-100%);
  }
  #nrps-dashboard #sidebar.open {
    transform: translateX(0);
  }
  #nrps-dashboard .dash-main {
    margin-left: 0;
  }
  #nrps-dashboard .topbar-search {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 1500px) and (min-width: 1025px) {
  #nrps-dashboard .dashboard-topbar {
    align-items: flex-start;
  }
  #nrps-dashboard .dashboard-topbar > div:first-child {
    flex-basis: 20rem;
  }
  #nrps-dashboard .topbar-controls {
    flex-wrap: wrap;
  }
  #nrps-dashboard .topbar-form {
    flex-wrap: nowrap;
  }
  #nrps-dashboard .topbar-search {
    width: 18rem;
    max-width: 18rem;
  }
}

@media (min-width: 1024px) {
  #nrps-dashboard .topbar-btn.menu-btn {
    display: none;
  }
}

/* ── Section spacing helpers ─────────────────────────────── */
#nrps-dashboard .dash-section-gap {
  margin-bottom: 1.25rem;
}

/* =============================================================
   Transactions View
   Matches transactions.html reference design
   ============================================================= */

/* ── Page wrapper ────────────────────────────────────────── */
.tx-page {
  width: 100%;
  max-width: none;
  margin: 0;
  color: #0f172a;
}
.tx-page .page-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}
.tx-page .page-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}
.tx-page .page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.tx-page .create-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #4f46e5;
  color: #fff;
  font-weight: 800;
  font-size: 0.875rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.tx-page .create-btn:hover {
  background: #4338ca;
}

/* ── Main card ───────────────────────────────────────────── */
.tx-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.05rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.tx-filter-reference {
  display: grid;
  grid-template-columns: minmax(22rem, 1.4fr) minmax(16rem, 0.95fr) minmax(8rem, 0.55fr) minmax(7.5rem, 0.5fr) minmax(10rem, 0.65fr) auto;
  gap: 0.8rem;
  padding: 1.12rem 1.25rem;
  align-items: center;
}

.tx-search-combo {
  display: grid;
  grid-template-columns: 1fr 3rem;
}

.tx-search-input {
  height: 2.75rem;
  border-color: var(--dash-border);
  border-right: 0;
  border-radius: 0.62rem 0 0 0.62rem;
  padding: 0 1rem;
  font-size: 0.86rem;
  color: #0f172a;
  background: #fff;
  outline: none;
}

.tx-search-input::placeholder {
  color: #8491a7;
}

.tx-search-btn {
  height: 2.75rem;
  border: 1px solid var(--dash-border);
  border-radius: 0 0.62rem 0.62rem 0;
  background: #fff;
  color: #64748b;
  display: grid;
  place-items: center;
}

.tx-search-btn svg,
.tx-filter-btn svg {
  width: 1rem;
  height: 1rem;
}

.tx-date-range {
  height: 2.75rem;
  border: 1px solid var(--dash-border);
  border-radius: 0.62rem;
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) auto minmax(7.5rem, 1fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.75rem;
  background: #fff;
}

.tx-date-range span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tx-date-input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: none;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
  background: transparent;
}

.tx-date-input::placeholder {
  color: #64748b;
  opacity: 1;
}

/* ── Filter bar ──────────────────────────────────────────── */
.tx-filter {
  padding: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 2fr 1fr 0.7fr 0.7fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.tx-filter.tx-filter-reference {
  grid-template-columns: minmax(22rem, 1.4fr) minmax(16rem, 0.95fr) minmax(8rem, 0.55fr) minmax(7.5rem, 0.5fr) minmax(10rem, 0.65fr) auto;
  gap: 0.8rem;
  padding: 1.12rem 1.25rem;
}
.tx-search-wrap {
  position: relative;
}
.tx-search-wrap .tx-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.9rem;
}
.tx-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tx-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.tx-filter-btn {
  width: 100%;
  border-color: var(--dash-border);
  border-radius: 0.62rem;
  padding: 0 1rem;
  height: 2.75rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tx-search-combo,
.tx-date-range,
.tx-filter-btn {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tx-filter-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 1rem) 50%, calc(100% - 0.72rem) 50%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2rem;
}
.tx-filter-select[name="status"] {
  max-width: 10rem;
}
.tx-filter-select[name="source"] {
  max-width: 9rem;
}
.tx-filter-select[name="method"] {
  max-width: 11rem;
}
.tx-filter-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.tx-clear-btn {
  border: 1px solid var(--dash-border);
  border-radius: 0.62rem;
  background: #fff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0 1rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.tx-clear-btn:hover {
  color: #0f3bb5;
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* ── Table ───────────────────────────────────────────────── */
.tx-table-wrap {
  overflow-x: auto;
}

.tx-table {
  width: 100%;
  min-width: 1450px;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.tx-table thead {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tx-table th {
  padding: 1rem 0.65rem;
  text-align: left;
  font-weight: 800;
  white-space: nowrap;
  background: transparent;
  border-top: none;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tx-table th a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
}
.tx-table th svg {
  width: 0.78rem;
  height: 0.78rem;
  display: inline-block;
  vertical-align: -0.1rem;
  color: #8aa0bb;
}
.tx-table th.th-right  { text-align: right; }
.tx-table th.th-center { text-align: center; }
.tx-table td {
  padding: 1.35rem 0.65rem;
  border-top: none;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  color: #0f172a;
}
.tx-table tbody tr:hover {
  background: #f8fafc;
}
.tx-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Cell styles ─────────────────────────────────────────── */
.tx-id {
  color: #4338ca;
  font-weight: 900;
  font-size: 0.86rem;
}
.tx-sub {
  color: #64748b;
  font-size: 0.72rem;
  margin-top: 0.25rem;
}
.tx-merchant {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tx-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: #ede9fe;
  color: #6d28d9;
  font-weight: 900;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.tx-merchant strong,
.tx-customer strong {
  display: block;
  font-weight: 800;
  color: #0f172a;
}
.tx-amount {
  text-align: right;
  font-size: 1.05rem;
  font-weight: 900;
  white-space: nowrap;
  color: #0f172a;
}
.tx-center {
  text-align: center;
}

/* ── Status / source pills ───────────────────────────────── */
.tx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 9999px;
  padding: 0.32rem 0.82rem;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.tx-pill-indigo { background: #e0e7ff; color: #4338ca; }
.tx-pill-green  { background: #dcfce7; color: #15803d; }
.tx-pill-orange { background: #ffedd5; color: #c2410c; }
.tx-pill-red    { background: #fee2e2; color: #b91c1c; }
.tx-pill-slate  { background: #f1f5f9; color: #475569; }
.tx-pill-blue   { background: #dbeafe; color: #1d4ed8; }

/* ── Payment method cell ─────────────────────────────────── */
.tx-method-icon {
  width: 4rem;
  height: 1.8rem;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

.tx-method-fallback {
  font-weight: 800;
  color: #334155;
}

.tx-check-cell {
  width: 2.35rem;
  min-width: 2.35rem;
  padding-left: 0.95rem !important;
  padding-right: 0.35rem !important;
  text-align: center;
}

.tx-check {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  vertical-align: middle;
  margin: 0;
  accent-color: #4f46e5;
}

/* ── Action buttons ──────────────────────────────────────── */
.tx-row-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
}

.tx-icon-action {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.62rem;
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #fff;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.tx-icon-action svg {
  width: 1rem;
  height: 1rem;
}

.tx-icon-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* ── Empty state ─────────────────────────────────────────── */
.tx-empty {
  text-align: center;
  color: #64748b;
  padding: 2.5rem 1rem;
}

/* ── Footer / pagination ─────────────────────────────────── */
.tx-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.45rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
}
.tx-footer p {
  color: #64748b;
}
.tx-pages {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tx-pages .tx-page-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.6rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.tx-pages .tx-page-btn svg {
  width: 1rem;
  height: 1rem;
}
.tx-pages .tx-page-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.tx-pages .tx-page-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.tx-per-page {
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.tx-page-gap {
  color: #64748b;
  font-weight: 800;
  padding: 0 0.2rem;
}
.tx-per-page-form {
  display: inline-flex;
  align-items: center;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tx-filter,
  .tx-filter-reference {
    grid-template-columns: 1fr 1fr;
  }
  .tx-clear-btn {
    width: 100%;
  }
}
@media (max-width: 640px) {
  .tx-filter,
  .tx-filter-reference {
    grid-template-columns: 1fr;
  }
  .tx-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.merchant-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.merchant-access-item {
  border: 1px solid #dbe3ef;
  border-radius: 0.9rem;
  padding: 0.95rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.merchant-access-item:hover,
.merchant-access-item.selected {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.merchant-access-item input {
  width: 1rem;
  height: 1rem;
}

.merchant-access-item strong,
.merchant-access-item small {
  display: block;
}

.merchant-access-item small {
  margin-top: 0.2rem;
  color: #64748b;
}

.merchant-access-item em {
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.25rem 0.55rem;
}

.manager-access-page {
  display: grid;
  gap: 1.5rem;
}

#nrps-dashboard .manager-access-panel {
  overflow: hidden;
}

.manager-access-subtitle,
.manager-access-table-head p {
  margin: 0.35rem 0 0;
  color: #52627a;
  font-size: 0.9rem;
  line-height: 1.5;
}

.manager-access-filter {
  max-width: 34rem;
}

.manager-access-filter label {
  display: grid;
  gap: 0.5rem;
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manager-access-filter select {
  min-height: 3rem;
  width: 100%;
  border: 1px solid #d6e0ee;
  border-radius: 0.8rem;
  background: #fff;
  padding: 0 0.9rem;
  color: #0f172a;
  font-size: 0.9rem;
  outline: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.manager-access-filter select:focus {
  border-color: #1f6bff;
  box-shadow: 0 0 0 4px rgba(31, 107, 255, 0.12);
}

.manager-access-form {
  margin-top: 1.4rem;
}

.manager-access-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.manager-access-actions .nrps-action {
  min-width: 14rem;
}

.manager-access-table-card {
  overflow: hidden;
}

.manager-access-table-wrap {
  overflow-x: auto;
  padding: 0 1.5rem 1.25rem;
}

.manager-access-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  border: 1px solid #dce5f2;
  border-radius: 0.9rem;
  overflow: hidden;
}

.manager-access-table thead {
  background: #f8fbff;
  border-bottom: 1px solid #dce5f2;
}

.manager-access-table th,
.manager-access-table td {
  text-align: left;
  vertical-align: middle;
  padding: 0.68rem 1rem;
  border-bottom: 1px solid #e5edf7;
}

.manager-access-table th {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.manager-access-table td {
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.manager-access-table th:nth-child(1),
.manager-access-table td:nth-child(1) {
  width: 30%;
}

.manager-access-table th:nth-child(2),
.manager-access-table td:nth-child(2) {
  width: 30%;
}

.manager-access-table th:nth-child(3),
.manager-access-table td:nth-child(3) {
  width: 16%;
}

.manager-access-table th:nth-child(4),
.manager-access-table td:nth-child(4) {
  width: 24%;
}

.manager-access-table tbody tr:hover {
  background: #f8fbff;
}

.manager-access-table tbody tr:last-child td {
  border-bottom: 0;
}

.manager-access-table td:first-child strong {
  display: block;
  margin-bottom: 0.1rem;
  font-weight: 900;
}

.manager-access-table .text-muted {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.2;
}

@media (max-width: 760px) {
  .manager-access-table-wrap {
    padding: 0 1rem 1rem;
    overflow: visible;
  }

  .manager-access-table,
  .manager-access-table tbody,
  .manager-access-table tr,
  .manager-access-table td {
    display: block;
    width: 100%;
  }

  .manager-access-table thead {
    display: none;
  }

  .manager-access-table {
    border: 0;
    border-radius: 0;
  }

  .manager-access-table tr {
    border: 1px solid #dce5f2;
    border-radius: 0.9rem;
    background: #fff;
    margin-bottom: 0.8rem;
    overflow: hidden;
  }

  .manager-access-table td {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
  }

  .manager-access-table td::before {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .manager-access-table td:nth-child(1)::before { content: "Manager"; }
  .manager-access-table td:nth-child(2)::before { content: "Merchant"; }
  .manager-access-table td:nth-child(3)::before { content: "Status"; }
  .manager-access-table td:nth-child(4)::before { content: "Assigned At"; }
}

.manager-access-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #dce5f2;
}

.manager-access-table-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0;
}

.empty-state {
  border: 1px dashed #c7d4e8;
  border-radius: 0.9rem;
  background: #f8fbff;
  padding: 1rem;
  color: #52627a;
  font-size: 0.9rem;
  font-weight: 700;
}

.table-empty {
  margin: 0.5rem 0;
  text-align: center;
}
