/*!
 * NitronPay admin — lightweight Gentelella-inspired RTL layout
 */
:root,
html[data-theme="light"] {
  --np-bg: #f7f7f7;
  --np-sidebar: #2a3f54;
  --np-sidebar-text: #e7e7e7;
  --np-accent: #1abb9c;
  --np-top: #ededed;
  --np-card: #fff;
  --np-border: #e6e9ed;
  --np-text: #73879c;
  --np-dark: #2a3f54;
  --np-table-head: #fafafa;
  --np-input-bg: #fff;
  --np-input-border: #ccd0d4;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  color-scheme: light;
}

html[data-theme="dark"] {
  --np-bg: #1a1d21;
  --np-sidebar: #111418;
  --np-sidebar-text: #c9d1d9;
  --np-accent: #1abb9c;
  --np-top: #22262b;
  --np-card: #24292f;
  --np-border: #30363d;
  --np-text: #adbac7;
  --np-dark: #e6edf3;
  --np-table-head: #1c2128;
  --np-input-bg: #1c2128;
  --np-input-border: #30363d;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .28), 0 1px 2px rgba(0, 0, 0, .2);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --np-bg: #1a1d21;
    --np-sidebar: #111418;
    --np-sidebar-text: #c9d1d9;
    --np-accent: #1abb9c;
    --np-top: #22262b;
    --np-card: #24292f;
    --np-border: #30363d;
    --np-text: #adbac7;
    --np-dark: #e6edf3;
    --np-table-head: #1c2128;
    --np-input-bg: #1c2128;
    --np-input-border: #30363d;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, .28), 0 1px 2px rgba(0, 0, 0, .2);
    color-scheme: dark;
  }
}

@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --np-bg: #f7f7f7;
    --np-sidebar: #2a3f54;
    --np-sidebar-text: #e7e7e7;
    --np-accent: #1abb9c;
    --np-top: #ededed;
    --np-card: #fff;
    --np-border: #e6e9ed;
    --np-text: #73879c;
    --np-dark: #2a3f54;
    --np-table-head: #fafafa;
    --np-input-bg: #fff;
    --np-input-border: #ccd0d4;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { direction: rtl; }
body {
  margin: 0;
  font-family: Tahoma, "Segoe UI", sans-serif;
  background: var(--np-bg);
  color: var(--np-text);
  font-size: 14px;
}

a { color: var(--np-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.np-wrap { display: flex; min-height: 100vh; }
.np-sidebar {
  width: 230px;
  background: var(--np-sidebar);
  color: var(--np-sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
}
.np-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.np-sidebar .brand {
  padding: 18px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.np-sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--np-sidebar-text);
  cursor: pointer;
}
.np-sidebar-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.np-sidebar-backdrop {
  display: none;
}
.np-sidebar nav { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.np-sidebar-foot {
  display: none;
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.np-sidebar-logout {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(231, 76, 60, .12);
  color: #ff8a80;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.np-sidebar-logout:hover {
  background: rgba(231, 76, 60, .22);
  color: #fff;
}
.np-sidebar nav a {
  display: block;
  padding: 12px 18px;
  color: var(--np-sidebar-text);
  border-right: 3px solid transparent;
}
.np-sidebar nav a:hover,
.np-sidebar nav a.active {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-right-color: var(--np-accent);
  text-decoration: none;
}
.np-sidebar-form {
  margin: 8px 14px 12px;
}
.np-sidebar-nav-btn {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-right: 3px solid transparent;
  background: transparent;
  color: var(--np-sidebar-text);
  font-family: inherit;
  font-size: inherit;
  text-align: right;
  cursor: pointer;
}
.np-sidebar-nav-btn:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-right-color: var(--np-accent);
}
.np-sidebar-cache-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  padding: .7rem .9rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #1abb9c, #148f77);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(26, 187, 156, .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
a.np-sidebar-cache-btn.is-active {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(26, 187, 156, .5);
}
.np-sidebar-cache-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(26, 187, 156, .45);
  transform: translateY(-1px);
}
.np-sidebar-cache-btn:active {
  transform: translateY(0);
  filter: brightness(.96);
}
.np-sidebar-cache-btn svg {
  flex-shrink: 0;
  opacity: .95;
}
.np-sidebar .nav-section {
  padding: 14px 18px 6px;
  font-size: 11px;
  opacity: .55;
  text-transform: uppercase;
}

.np-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.np-topnav {
  background: var(--np-top);
  border-bottom: 1px solid var(--np-border);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 80;
}
.np-topnav-start {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.np-topnav-title {
  font-weight: 600;
  color: var(--np-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--np-border);
  border-radius: 10px;
  background: var(--np-card);
  color: var(--np-dark);
  cursor: pointer;
  padding: 0;
}
.np-menu-btn:hover { border-color: var(--np-accent); color: var(--np-accent); }
.np-logout-form { display: inline; margin: 0; }
.np-content { padding: 20px; }
.np-footer {
  padding: 12px 20px;
  color: var(--np-text);
  font-size: 12px;
  border-top: 1px solid var(--np-border);
  opacity: .85;
}

/* Mobile bottom nav (PWA-style) — desktop hidden */
.np-mobile-nav {
  display: none;
}
.np-page-title {
  margin: 0 0 16px;
  color: var(--np-dark);
  font-size: 22px;
}

.np-card {
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.np-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.np-stat {
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 6px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.np-stat::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--np-accent);
  opacity: .85;
}
.np-stat--primary::before { background: #3498db; }
.np-stat--accent::before { background: var(--np-accent); }
.np-stat--success::before { background: #26b99a; }
.np-stat--danger::before { background: #e74c3c; }
.np-stat .label { font-size: 12px; margin-bottom: 8px; }
.np-stat .value { font-size: 22px; color: var(--np-dark); font-weight: 700; letter-spacing: .2px; }

.np-dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1fr;
  gap: 14px;
}
.np-chart-card { margin-bottom: 0; min-height: 280px; }
.np-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 8px;
}
.np-chart-head h3 {
  margin: 0;
  color: var(--np-dark);
  font-size: 15px;
}
.np-chart-hint { font-size: 11px; opacity: .7; }
.np-chart-wrap { position: relative; height: 220px; }
.np-chart-wrap--donut { height: 230px; }

.np-alert {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
  border: 1px solid var(--np-border);
  background: var(--np-card);
  color: var(--np-dark);
}
.np-alert--warning {
  border-color: rgba(243, 156, 18, .45);
  background: rgba(243, 156, 18, .12);
}
.np-alert a { font-weight: 700; }

.np-progress {
  height: 8px;
  background: var(--np-border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
  max-width: 220px;
}
.np-progress__bar {
  height: 100%;
  border-radius: 99px;
  background: #26b99a;
  transition: width .25s ease;
}
.np-progress__bar--warning { background: #f39c12; }
.np-progress__bar--over { background: #e74c3c; }
.np-progress__bar--ok { background: #26b99a; }
.np-progress__bar--unlimited { background: #73879c; }
.np-cap-meta { font-size: 12px; color: var(--np-dark); }
.np-cap-pct { font-size: 11px; opacity: .7; margin-top: 3px; }
.np-cap-row--over td { background: rgba(231, 76, 60, .06); }
.np-cap-row--warning td { background: rgba(243, 156, 18, .06); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--np-border);
  text-align: right;
  vertical-align: middle;
}
.table th { background: var(--np-table-head); color: var(--np-dark); font-weight: 600; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--np-dark); }
.form-control, .form-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--np-input-border);
  border-radius: 3px;
  background: var(--np-input-bg);
  color: var(--np-dark);
  font-family: inherit;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--np-accent);
  box-shadow: 0 0 0 2px rgba(26,187,156,.15);
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.btn-primary { background: var(--np-accent); color: #fff; }
.btn-secondary { background: #73879c; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-link { background: transparent; color: var(--np-accent); }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  color: #fff;
}
.bg-success { background: #26b99a; }
.bg-danger { background: #e74c3c; }
.bg-secondary { background: #73879c; }
.bg-info { background: #3498db; }
.bg-warning { background: #f39c12; color: #fff; }

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.filter-actions { display: flex; gap: 8px; align-items: end; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  border-right: 3px solid var(--np-accent);
  padding: 10px 14px;
  margin-bottom: 10px;
  background: var(--np-table-head);
}
.timeline li.fail { border-right-color: #e74c3c; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a3f54, #1abb9c);
}
.login-card {
  width: 380px;
  background: #fff;
  padding: 28px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.login-card h1 { margin: 0 0 8px; color: var(--np-dark); font-size: 22px; }
.login-card p { margin: 0 0 20px; }
.login-alert {
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.6;
}
.login-alert-error {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5c6cb;
}
.login-alert-success {
  background: #e8f8f5;
  color: #1e8449;
  border: 1px solid #a9dfbf;
}

.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pagination li a, .pagination li span {
  display: block;
  padding: 6px 10px;
  border: 1px solid var(--np-border);
  background: var(--np-card);
  color: var(--np-dark);
}

/* Nitron pager */
.np-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--np-border);
  background:
    linear-gradient(135deg, rgba(26, 187, 156, .06), transparent 42%),
    var(--np-card);
}
.np-pager__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12.5px;
  color: var(--np-text);
}
.np-pager__meta strong { color: var(--np-dark); font-weight: 700; }
.np-pager__badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(26, 187, 156, .14);
  color: #0f8f78;
  border: 1px solid rgba(26, 187, 156, .28);
}
.np-pager__badge--simple {
  background: rgba(243, 156, 18, .16);
  color: #c47d0a;
  border-color: rgba(243, 156, 18, .35);
}
.np-pager__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.np-pager__list li a,
.np-pager__list li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--np-border);
  background: var(--np-bg);
  color: var(--np-dark);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.np-pager__list li a:hover {
  border-color: var(--np-accent);
  color: var(--np-accent);
  transform: translateY(-1px);
}
.np-pager__list li.active span {
  background: linear-gradient(135deg, #1abb9c, #148f77);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(26, 187, 156, .28);
}
.np-pager__list li.disabled span {
  opacity: .45;
  cursor: not-allowed;
}

.np-settings-block-title {
  margin: 0 0 6px;
  color: var(--np-dark);
  font-size: 1.05rem;
}
.np-settings-block-desc {
  margin: 0 0 1.1rem;
  color: var(--np-text);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .np-pager { padding: 10px; }
  .np-pager__list li a,
  .np-pager__list li span {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }
}

/* Gentelella-style single theme toggle */
.np-theme-toggle {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--np-text);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .15s ease, color .15s ease;
}
.np-theme-toggle:hover {
  background: var(--np-bg);
  color: var(--np-dark);
}
.np-theme-toggle .theme-icon-light,
.np-theme-toggle .theme-icon-dark {
  display: none;
  pointer-events: none;
}
/* light effective → show moon; dark effective → show sun */
html[data-theme="light"] .np-theme-toggle .theme-icon-dark { display: block; }
html[data-theme="dark"] .np-theme-toggle .theme-icon-light { display: block; }
@media (prefers-color-scheme: light) {
  html[data-theme="system"] .np-theme-toggle .theme-icon-dark { display: block; }
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .np-theme-toggle .theme-icon-light { display: block; }
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.np-admin-name {
  color: var(--np-dark);
  font-size: 13px;
}
.np-logout-btn {
  width: auto;
  min-height: 34px;
  padding: 0 10px !important;
  border-radius: 8px;
  color: var(--np-text) !important;
  text-decoration: none !important;
  transition: background .15s ease, color .15s ease;
}
.np-logout-btn:hover {
  background: var(--np-bg);
  color: var(--np-accent) !important;
}

/* Material-style row actions */
.np-card { overflow: visible; }
.np-actions-cell {
  width: 56px;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.np-action-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
}
.np-action-menu.open { z-index: 60; }
.np-action-trigger {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--np-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.np-action-trigger:hover {
  background: rgba(26, 187, 156, .12);
  color: var(--np-dark);
}
.np-action-menu.open .np-action-trigger {
  background: rgba(26, 187, 156, .18);
  color: var(--np-dark);
  box-shadow: inset 0 0 0 1px rgba(26, 187, 156, .25);
}
.np-action-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 168px;
  padding: 8px;
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.08);
  z-index: 60;
  opacity: 0;
  transform: scale(.96) translateY(-4px);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.np-action-menu.open .np-action-dropdown {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.np-action-menu.open .np-action-dropdown[hidden] {
  display: block;
}
.np-action-form {
  margin: 0;
}
.np-action-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--np-border);
}
.np-action-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--np-dark);
  font-size: 13px;
  font-family: inherit;
  text-align: right;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease;
  outline: none;
}
.np-action-item:hover,
.np-action-item:focus {
  background: rgba(26, 187, 156, .12);
  text-decoration: none;
  color: var(--np-dark);
}
.np-action-item svg {
  flex-shrink: 0;
  opacity: .75;
}
.np-action-danger {
  color: #c0392b;
}
.np-action-danger:hover,
.np-action-danger:focus {
  background: rgba(192, 57, 43, .1);
  color: #c0392b;
}
html[data-theme="dark"] .np-action-dropdown {
  box-shadow: 0 14px 32px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.3);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .np-action-dropdown {
    box-shadow: 0 14px 32px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.3);
  }
}

/* Custom select — simple & theme-aware */
.np-select {
  position: relative;
  width: 100%;
}
.np-select-source {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  inset-inline-start: 0;
  top: 0;
}
.np-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--np-input-border);
  border-radius: 8px;
  background: var(--np-input-bg);
  color: var(--np-dark);
  font-family: inherit;
  font-size: 13px;
  text-align: right;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.np-select-trigger:hover {
  border-color: var(--np-accent);
}
.np-select.open .np-select-trigger,
.np-select-trigger:focus {
  outline: none;
  border-color: var(--np-accent);
  box-shadow: 0 0 0 2px rgba(26, 187, 156, .15);
}
.np-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-select-label.is-placeholder {
  color: var(--np-text);
  opacity: .75;
}
.np-select-chevron {
  display: inline-flex;
  color: var(--np-text);
  transition: transform .15s ease;
  flex-shrink: 0;
}
.np-select.open .np-select-chevron {
  transform: rotate(180deg);
}
.np-select-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 55;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
}
.np-select-option {
  width: 100%;
  display: block;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--np-dark);
  font-family: inherit;
  font-size: 13px;
  text-align: right;
  cursor: pointer;
}
.np-select-option:hover,
.np-select-option:focus {
  background: rgba(26, 187, 156, .12);
  outline: none;
}
.np-select-option.is-selected {
  background: rgba(26, 187, 156, .18);
  color: var(--np-accent);
  font-weight: 600;
}
.np-select-option.is-placeholder {
  opacity: .7;
}
.np-select.is-disabled .np-select-trigger {
  opacity: .55;
  cursor: not-allowed;
}
html[data-theme="dark"] .np-select-panel {
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .np-select-panel {
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
  }
}

/* Confirm modal — theme tokens */
.rms-confirm-modal-container {
  top: 0;
  left: 0;
  z-index: 10000;
  background: rgba(15, 18, 22, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rms-confirm-modal {
  border-radius: 16px;
  min-width: 360px;
  max-width: 480px;
  width: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--np-border);
  background: var(--np-card) !important;
  color: var(--np-dark) !important;
  box-shadow: 0 20px 48px rgba(0,0,0,.28);
  animation: modalSlideIn .28s ease-out;
}
.rms-confirm-modal .rms-confirm-title {
  margin: 0 0 8px;
  color: var(--np-dark);
  font-size: 17px;
  font-weight: 700;
}
.rms-confirm-modal .rms-confirm-message {
  margin: 0;
  color: var(--np-text);
  font-size: 14px;
  line-height: 1.7;
}
.rms-confirm-modal .rms-confirm-desc {
  display: block;
  margin-top: 8px;
  color: var(--np-text);
  opacity: .8;
  font-size: 12px;
}
.rms-confirm-modal .rms-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #fff;
}
.rms-confirm-modal .rms-confirm-icon svg {
  display: block;
}
.rms-confirm-modal .btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--np-input-border);
  color: var(--np-dark);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.rms-confirm-modal .btn-outline-secondary:hover {
  background: var(--np-bg);
  border-color: var(--np-accent);
  color: var(--np-accent);
}
.rms-confirm-modal .btn-danger,
.rms-confirm-modal .btn-success,
.rms-confirm-modal .btn-warning,
.rms-confirm-modal .btn-primary {
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
.rms-confirm-modal .btn-danger { background: #e74c3c; }
.rms-confirm-modal .btn-success { background: #26b99a; }
.rms-confirm-modal .btn-warning { background: #f39c12; }
.rms-confirm-modal .btn-primary { background: var(--np-accent); }

/* thin scrollbar (Gentelella-inspired) */
.np-main,
.np-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 135, 156, .45) transparent;
}
.np-main::-webkit-scrollbar,
.np-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.np-main::-webkit-scrollbar-thumb,
.np-content::-webkit-scrollbar-thumb {
  background: rgba(115, 135, 156, .45);
  border-radius: 99px;
}
.np-main::-webkit-scrollbar-track,
.np-content::-webkit-scrollbar-track {
  background: transparent;
}
.pagination li.active span { background: var(--np-accent); color: #fff; border-color: var(--np-accent); }

/* Toggle switch (theme-aware) — label.np-switch beats .form-group label { display:block } */
label.np-switch,
.np-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin: 0;
  margin-bottom: 0;
  color: var(--np-dark);
  font-size: 13px;
  line-height: 1.4;
  position: relative;
}
.np-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.np-switch-track {
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  min-width: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--np-input-border);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.np-switch-thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22), 0 1px 1px rgba(0, 0, 0, .08);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1), background .2s ease;
  transform: translateX(0);
}
.np-switch-input:checked + .np-switch-track {
  background: var(--np-accent);
  border-color: rgba(26, 187, 156, .35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 3px rgba(26, 187, 156, .12);
}
.np-switch-input:checked + .np-switch-track .np-switch-thumb {
  transform: translateX(-22px);
  background: #fff;
}
.np-switch-input:focus-visible + .np-switch-track {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 187, 156, .28);
}
.np-switch-input:checked:focus-visible + .np-switch-track {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 3px rgba(26, 187, 156, .28);
}
.np-switch:hover .np-switch-track {
  filter: brightness(1.05);
}
.np-switch-input:disabled + .np-switch-track {
  opacity: .5;
  cursor: not-allowed;
}
.np-switch:has(.np-switch-input:disabled) {
  cursor: not-allowed;
  opacity: .7;
}
.np-switch-text {
  color: var(--np-dark);
}
html[data-theme="dark"] .np-switch-track {
  background: #3a424c;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .np-switch-thumb {
  background: #e6edf3;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .np-switch-input:checked + .np-switch-track {
  background: var(--np-accent);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .np-switch-track {
    background: #3a424c;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
  }
  html[data-theme="system"] .np-switch-thumb {
    background: #e6edf3;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  }
  html[data-theme="system"] .np-switch-input:checked + .np-switch-track {
    background: var(--np-accent);
  }
}

/* helpers for confirm-modal */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.text-center { text-align: center; }
.gap-2 { gap: .5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1.5rem; }
.p-4 { padding: 1.25rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.fw-bold { font-weight: 700; }
.text-muted { color: var(--np-text); opacity: .85; }
.text-white { color: #fff; }
.btn-outline-secondary { background: transparent; border: 1px solid #ccd0d4; color: #73879c; padding: 8px 14px; border-radius: 3px; cursor: pointer; }
.rounded { border-radius: .5rem; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,.15); }
.position-fixed { position: fixed; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.fs-1 { font-size: 2rem; }

@media (max-width: 1100px) {
  .np-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .np-stats { grid-template-columns: 1fr 1fr; }
  .np-menu-btn { display: inline-flex; }
  .np-sidebar-close { display: inline-flex; }
  .np-sidebar-foot { display: block; }
  .np-admin-name { display: none; }
  .np-logout-btn { display: none; }

  .np-wrap { position: relative; }

  /* Off-canvas drawer (RTL: from right) */
  .np-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 86vw);
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    box-shadow: none;
    overflow: hidden;
  }
  body.np-sidebar-open .np-sidebar {
    transform: translateX(0);
    box-shadow: -8px 0 32px rgba(0, 0, 0, .35);
  }
  .np-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0, 0, 0, .48);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
    backdrop-filter: blur(2px);
  }
  body.np-sidebar-open .np-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  body.np-sidebar-open {
    overflow: hidden;
  }

  .np-topnav { padding: 8px 12px; }
  .np-content {
    padding: 14px 12px 88px;
  }
  .np-footer { display: none; }
  .np-page-title { font-size: 18px; margin-bottom: 12px; }

  /* PWA-style sticky bottom bar */
  .np-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    align-items: flex-end;
    justify-content: space-around;
    background: var(--np-card);
    border-top: 1px solid var(--np-border);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .12);
    overflow: visible;
  }
  html[data-theme="dark"] .np-mobile-nav {
    background: #1e2329;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .4);
  }
  @media (prefers-color-scheme: dark) {
    html[data-theme="system"] .np-mobile-nav {
      background: #1e2329;
      box-shadow: 0 -8px 28px rgba(0, 0, 0, .4);
    }
  }
  .np-mobile-nav__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
    height: 64px;
    padding: 6px 2px 8px;
    border: 0;
    background: transparent;
    color: var(--np-text);
    text-decoration: none;
    font-family: inherit;
    font-size: 10px;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease;
  }
  .np-mobile-nav__item:hover,
  .np-mobile-nav__item:focus-visible {
    color: var(--np-accent);
    text-decoration: none;
    outline: none;
  }
  .np-mobile-nav__item.is-active {
    color: var(--np-accent);
  }
  .np-mobile-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    transition: background .15s ease;
  }
  .np-mobile-nav__item.is-active .np-mobile-nav__icon {
    background: rgba(26, 187, 156, .14);
  }
  .np-mobile-nav__label {
    flex: 0 0 auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
  }
  .np-mobile-nav__item--main {
    overflow: visible;
  }
  .np-mobile-nav__fab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    min-height: 48px;
    max-height: 48px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--np-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 187, 156, .4);
    margin: -18px 0 2px;
    overflow: hidden;
    transform: none;
  }
  .np-mobile-nav__fab svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
  }
  .np-mobile-nav__item--main.is-active .np-mobile-nav__fab,
  .np-mobile-nav__item--main:active .np-mobile-nav__fab {
    box-shadow: 0 6px 18px rgba(26, 187, 156, .55);
  }
  .np-mobile-nav__item--main .np-mobile-nav__label {
    color: var(--np-accent);
  }

  /* Filter grids tighter on phones */
  .filter-row { grid-template-columns: 1fr 1fr; }
  .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .np-stats { grid-template-columns: 1fr; }
  .np-content { padding-left: 10px; padding-right: 10px; }
  .filter-row { grid-template-columns: 1fr; }
}

/* ── Payment timeline modal ── */
body.np-tl-open { overflow: hidden; }

.np-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--np-accent);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.np-link-btn:hover { text-decoration: underline; }

.np-gw-chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(26, 187, 156, .12);
  color: var(--np-dark);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(26, 187, 156, .28);
}

.np-tl-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.np-tl-overlay[hidden] { display: none !important; }

.np-tl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 32, .55);
  backdrop-filter: blur(3px);
}

.np-tl-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  animation: npTlIn .28s ease-out;
  overflow: hidden;
}

@keyframes npTlIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.np-tl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem .75rem;
  border-bottom: 1px solid var(--np-border);
}
.np-tl-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--np-accent);
  font-weight: 700;
}
.np-tl-title {
  margin: .2rem 0 0;
  font-size: 1.15rem;
  color: var(--np-dark);
}
.np-tl-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--np-border);
  background: var(--np-bg);
  color: var(--np-dark);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.np-tl-close:hover { border-color: var(--np-accent); color: var(--np-accent); }

.np-tl-summary { padding: .9rem 1.25rem 0; }
.np-tl-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem .85rem;
}
.np-tl-meta-grid .k {
  display: block;
  font-size: 11px;
  color: var(--np-text);
  margin-bottom: 2px;
}
.np-tl-meta-grid .v {
  color: var(--np-dark);
  font-weight: 600;
  font-size: 13px;
  word-break: break-word;
}
.np-tl-meta-grid small { font-weight: 500; opacity: .7; }

.np-tl-progress-wrap { padding: .85rem 1.25rem .35rem; }
.np-tl-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--np-text);
  margin-bottom: 6px;
}
.np-tl-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--np-border);
  overflow: hidden;
}
.np-tl-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1abb9c, #148f77);
  transition: width .45s ease;
}
.np-tl-progress-bar.is-fail {
  background: linear-gradient(90deg, #e67e22, #e74c3c);
}

.np-tl-body {
  padding: .5rem 1.1rem 1rem;
  overflow: auto;
  flex: 1;
}

.np-tl-loading, .np-tl-error, .np-tl-skeleton {
  text-align: center;
  padding: 1.5rem .5rem;
  color: var(--np-text);
}
.np-tl-error { color: #e74c3c; }
.np-tl-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border: 2px solid rgba(26, 187, 156, .25);
  border-top-color: var(--np-accent);
  border-radius: 50%;
  vertical-align: -4px;
  animation: npTlSpin .7s linear infinite;
}
@keyframes npTlSpin { to { transform: rotate(360deg); } }

.np-tl-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.np-tl-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: .65rem;
  position: relative;
  padding-bottom: .85rem;
  animation: npTlStep .4s ease both;
  animation-delay: calc(var(--i, 0) * .05s);
}
@keyframes npTlStep {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.np-tl-rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.np-tl-rail::before {
  content: '';
  position: absolute;
  top: 22px;
  bottom: -10px;
  width: 2px;
  background: var(--np-border);
}
.np-tl-step:last-child .np-tl-rail::before { display: none; }

.np-tl-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  border: 2px solid var(--np-border);
  background: var(--np-card);
  box-sizing: border-box;
}
.np-tl-step.is-done .np-tl-dot {
  border-color: #1abb9c;
  background: #1abb9c;
  box-shadow: 0 0 0 4px rgba(26, 187, 156, .18);
}
.np-tl-step.is-done .np-tl-dot::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.np-tl-step.is-fail .np-tl-dot {
  border-color: #e74c3c;
  background: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, .18);
}
.np-tl-step.is-fail .np-tl-dot::after {
  content: '×';
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 14px;
  display: block;
  text-align: center;
}
.np-tl-step.is-current .np-tl-dot {
  border-color: #f39c12;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(243, 156, 18, .2);
  animation: npTlPulse 1.2s ease infinite;
}
.np-tl-step.is-current .np-tl-rail::before {
  background: linear-gradient(#f39c12, var(--np-border));
}
.np-tl-step.is-done .np-tl-rail::before { background: rgba(26, 187, 156, .45); }
.np-tl-step.is-pending .np-tl-dot,
.np-tl-step.is-skipped .np-tl-dot {
  opacity: .55;
}
@keyframes npTlPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(243, 156, 18, .2); }
  50% { box-shadow: 0 0 0 8px rgba(243, 156, 18, .08); }
}

.np-tl-card {
  background: var(--np-bg);
  border: 1px solid var(--np-border);
  border-radius: 12px;
  padding: .7rem .8rem;
}
.np-tl-step.is-current .np-tl-card {
  border-color: rgba(243, 156, 18, .45);
  background: rgba(243, 156, 18, .06);
}
.np-tl-step.is-fail .np-tl-card {
  border-color: rgba(231, 76, 60, .35);
  background: rgba(231, 76, 60, .06);
}
.np-tl-step.is-done .np-tl-card {
  border-color: rgba(26, 187, 156, .28);
}

.np-tl-card-top { display: flex; flex-direction: column; gap: .25rem; }
.np-tl-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.np-tl-card-title strong { color: var(--np-dark); font-size: 13.5px; }
.np-tl-state {
  font-size: 11px;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: var(--np-border);
  color: var(--np-text);
  white-space: nowrap;
}
.np-tl-step.is-done .np-tl-state { background: rgba(26, 187, 156, .15); color: #148f77; }
.np-tl-step.is-fail .np-tl-state { background: rgba(231, 76, 60, .15); color: #c0392b; }
.np-tl-step.is-current .np-tl-state { background: rgba(243, 156, 18, .18); color: #d68910; }

.np-tl-card-sub {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  font-size: 11px;
  color: var(--np-text);
}
.np-tl-msg {
  margin: .45rem 0 0;
  font-size: 12.5px;
  color: var(--np-dark);
  line-height: 1.55;
}
.np-tl-details {
  margin-top: .45rem;
  font-size: 12px;
}
.np-tl-details summary {
  cursor: pointer;
  color: var(--np-accent);
  font-weight: 600;
}
.np-tl-details pre {
  margin: .4rem 0 0;
  padding: .55rem;
  border-radius: 8px;
  background: var(--np-card);
  border: 1px solid var(--np-border);
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow: auto;
  color: var(--np-dark);
}

.np-tl-foot {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: .85rem 1.25rem 1.1rem;
  border-top: 1px solid var(--np-border);
  background: var(--np-card);
}

.np-tl-static {
  margin-top: 1rem;
}
.np-tl-static .np-tl-steps { max-width: 720px; }

@media (max-width: 560px) {
  .np-tl-meta-grid { grid-template-columns: 1fr; }
  .np-tl-dialog { max-height: 94vh; border-radius: 14px; }
}

/* ── Payment inquiry modal ── */
body.np-inq-open { overflow: hidden; }

.np-inq-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.np-inq-overlay[hidden] { display: none !important; }

.np-inq-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 32, .62);
  backdrop-filter: blur(4px);
}

.np-inq-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 16px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, .32);
  animation: npInqIn .22s ease-out;
  overflow: hidden;
}

@keyframes npInqIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.np-inq-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem .85rem;
  border-bottom: 1px solid var(--np-border);
}

.np-inq-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--np-accent);
  font-weight: 700;
}

.np-inq-title {
  margin: .15rem 0 0;
  font-size: 1.05rem;
  color: var(--np-dark);
}

.np-inq-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--np-border);
  background: var(--np-bg);
  color: var(--np-dark);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.np-inq-close:hover { border-color: var(--np-accent); color: var(--np-accent); }

.np-inq-body {
  padding: 1rem 1.15rem;
  overflow: auto;
  flex: 1;
  min-height: 180px;
}

.np-inq-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  gap: .65rem;
  padding: .5rem;
}

.np-inq-loading[hidden] { display: none !important; }

.np-inq-loading-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(26, 187, 156, .18);
  border-top-color: var(--np-accent);
  animation: npTlSpin .75s linear infinite;
}

.np-inq-loading-title {
  margin: .25rem 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--np-dark);
}

.np-inq-loading-sub {
  margin: 0;
  font-size: 12px;
  color: var(--np-text);
}

.np-inq-result[hidden] { display: none !important; }

.np-inq-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem .75rem;
  margin-bottom: .85rem;
  padding: .75rem;
  border-radius: 12px;
  background: var(--np-bg);
  border: 1px solid var(--np-border);
}

.np-inq-meta-item .k {
  display: block;
  font-size: 11px;
  color: var(--np-text);
  margin-bottom: 2px;
}

.np-inq-meta-item .v {
  display: block;
  color: var(--np-dark);
  font-weight: 600;
  font-size: 12.5px;
  word-break: break-word;
}

.np-inq-meta-item .v small { font-weight: 500; opacity: .75; }
.np-inq-mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }

.np-inq-status-card {
  border-radius: 12px;
  border: 1px solid var(--np-border);
  background: var(--np-bg);
  padding: .85rem .9rem;
}

.np-inq-status-card.is-success {
  border-color: rgba(26, 187, 156, .35);
  background: rgba(26, 187, 156, .07);
}

.np-inq-status-card.is-fail,
.np-inq-status-card.is-error {
  border-color: rgba(231, 76, 60, .35);
  background: rgba(231, 76, 60, .07);
}

.np-inq-status-card.is-warn {
  border-color: rgba(243, 156, 18, .35);
  background: rgba(243, 156, 18, .07);
}

.np-inq-status-head {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
}

.np-inq-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.is-success .np-inq-status-icon {
  background: rgba(26, 187, 156, .18);
  color: #148f77;
}

.is-fail .np-inq-status-icon,
.is-error .np-inq-status-icon {
  background: rgba(231, 76, 60, .18);
  color: #c0392b;
}

.is-warn .np-inq-status-icon {
  background: rgba(243, 156, 18, .18);
  color: #d68910;
}

.np-inq-status-text { flex: 1; min-width: 0; }

.np-inq-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .25rem;
}

.np-inq-status-row strong {
  color: var(--np-dark);
  font-size: 13.5px;
}

.np-inq-badge {
  font-size: 11px;
  font-weight: 700;
  padding: .18rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.is-success .np-inq-badge { background: rgba(26, 187, 156, .18); color: #148f77; }
.is-fail .np-inq-badge,
.is-error .np-inq-badge { background: rgba(231, 76, 60, .18); color: #c0392b; }
.is-warn .np-inq-badge { background: rgba(243, 156, 18, .18); color: #d68910; }

.np-inq-msg {
  margin: .35rem 0 0;
  font-size: 12.5px;
  color: var(--np-dark);
  line-height: 1.55;
}

.np-inq-bank {
  margin: .45rem 0 0;
  font-size: 12px;
  color: var(--np-text);
}

.np-inq-bank code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px;
  padding: .1rem .35rem;
  border-radius: 6px;
  background: var(--np-card);
  border: 1px solid var(--np-border);
  color: var(--np-dark);
}

.np-inq-details {
  margin-top: .65rem;
  font-size: 12px;
}

.np-inq-details summary {
  cursor: pointer;
  color: var(--np-accent);
  font-weight: 600;
}

.np-inq-details pre {
  margin: .45rem 0 0;
  padding: .55rem;
  border-radius: 8px;
  background: var(--np-card);
  border: 1px solid var(--np-border);
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow: auto;
  color: var(--np-dark);
}

.np-inq-foot {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: .8rem 1.15rem 1rem;
  border-top: 1px solid var(--np-border);
  background: var(--np-card);
}

@media (max-width: 560px) {
  .np-inq-meta { grid-template-columns: 1fr; }
  .np-inq-dialog { max-height: 94vh; border-radius: 14px; }
}

/* ===== Plugins admin ===== */
.np-plugins-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  animation: np-plugins-fade .45s ease both;
}
.np-plugins-lead {
  margin: .25rem 0 0;
  font-size: 13px;
  opacity: .85;
  max-width: 42rem;
}
.np-plugins-alert {
  padding: .7rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 13px;
  border: 1px solid var(--np-border);
  animation: np-plugins-fade .35s ease both;
}
.np-plugins-alert.is-ok { background: rgba(26,187,156,.12); color: #148f77; }
.np-plugins-alert.is-error { background: rgba(231,76,60,.12); color: #c0392b; }
.np-plugins-alert.is-warn { background: rgba(243,156,18,.12); color: #b9770e; }
.np-plugins-section {
  margin: .2rem 0 .75rem;
  font-size: 14px;
  color: var(--np-dark);
}
.np-plugins-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--np-border);
  border-radius: 14px;
  background: var(--np-card);
}
.np-plugins-empty code {
  display: inline-block;
  margin-top: .75rem;
  padding: .35rem .6rem;
  border-radius: 8px;
  background: var(--np-table-head);
  border: 1px solid var(--np-border);
  font-size: 12px;
}
.np-plugins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.np-plugin-card {
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  animation: np-plugins-rise .5s ease both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.np-plugin-card:hover {
  transform: translateY(-2px);
  border-color: rgba(26,187,156,.45);
  box-shadow: 0 8px 22px rgba(42,63,84,.08);
}
.np-plugin-card.is-disabled { opacity: .72; }
.np-plugin-card-top {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.np-plugin-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--np-table-head);
  border: 1px solid var(--np-border);
}
.np-plugin-logo { position: relative; }
.np-plugin-logo img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.np-plugin-logo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--np-dark);
}
.np-plugin-meta { flex: 1; min-width: 0; }
.np-plugin-meta h2 {
  margin: 0;
  font-size: 15px;
  color: var(--np-dark);
  font-weight: 700;
}
.np-plugin-meta p {
  margin: .2rem 0 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: .85;
}
.np-plugin-badge {
  font-size: 11px;
  font-weight: 700;
  padding: .18rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.np-plugin-badge.is-on { background: rgba(26,187,156,.18); color: #148f77; }
.np-plugin-badge.is-off { background: rgba(115,135,156,.18); color: var(--np-text); }
.np-plugin-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  font-size: 12px;
  color: var(--np-text);
}
.np-plugin-facts code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  padding: .1rem .35rem;
  border-radius: 6px;
  background: var(--np-table-head);
  border: 1px solid var(--np-border);
  color: var(--np-dark);
}
.np-plugin-bundled {
  font-size: 11px;
  font-weight: 700;
  color: var(--np-accent);
}
.np-plugin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: auto;
}
.np-plugin-actions form { display: inline; margin: 0; }
.np-plugins-modal[hidden] { display: none !important; }
.np-plugins-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.np-plugins-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 36, .45);
  animation: np-plugins-fade .25s ease both;
}
.np-plugins-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--np-card);
  border: 1px solid var(--np-border);
  border-radius: 16px;
  padding: 1.15rem 1.2rem 1.25rem;
  animation: np-plugins-rise .3s ease both;
}
.np-plugins-modal-dialog h3 {
  margin: 0 0 .9rem;
  font-size: 16px;
  color: var(--np-dark);
}
.np-plugins-modal-close {
  position: absolute;
  top: .55rem;
  left: .65rem;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--np-text);
}
.np-plugins-dropzone {
  border: 1.5px dashed var(--np-input-border);
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
  background: var(--np-table-head);
  transition: border-color .2s ease, background .2s ease;
}
.np-plugins-dropzone.is-drag {
  border-color: var(--np-accent);
  background: rgba(26,187,156,.08);
}
.np-plugins-dropzone p { margin: .55rem 0 .85rem; font-size: 13px; }
.np-plugins-dropzone input[type=file] { max-width: 100%; font-size: 12px; }
.np-plugins-force {
  display: flex;
  align-items: center;
  gap: .4rem;
  justify-content: center;
  font-size: 12px;
  margin: .5rem 0;
}
.np-gateways-no-drivers {
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: rgba(243,156,18,.12);
  border: 1px solid rgba(243,156,18,.35);
  color: #b9770e;
  font-size: 13px;
}
.np-plugin-badge.is-install { background: rgba(52,152,219,.16); color: #2471a3; }
.np-plugin-card.is-available { border-style: dashed; }
.np-plugin-progress-dialog { max-width: 460px; }
.np-plugin-progress-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: .9rem;
}
.np-plugin-progress-head h3 { margin: 0 0 .2rem; }
.np-plugin-progress-head p { margin: 0; font-size: 13px; color: var(--np-text); }
.np-plugin-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(26,187,156,.2);
  border-top-color: #1abb9c;
  animation: np-plugin-spin .7s linear infinite;
  flex-shrink: 0;
}
.np-plugin-spinner.is-done {
  animation: none;
  border-color: #1abb9c;
  background: #1abb9c;
  box-shadow: inset 0 0 0 8px #fff;
}
.np-plugin-spinner.is-error {
  animation: none;
  border-color: #e74c3c;
  background: #e74c3c;
  box-shadow: inset 0 0 0 8px #fff;
}
.np-plugin-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(115,135,156,.18);
  overflow: hidden;
  margin-bottom: .9rem;
}
.np-plugin-bar span {
  display: block;
  height: 100%;
  width: 6%;
  border-radius: inherit;
  background: linear-gradient(90deg, #148f77, #1abb9c);
  transition: width .35s ease;
}
.np-plugin-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.np-plugin-step {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .55rem .7rem;
  border-radius: 10px;
  background: var(--np-table-head, #fafafa);
  border: 1px solid transparent;
}
.np-plugin-step strong { display: block; font-size: 13px; }
.np-plugin-step em { display: block; font-style: normal; font-size: 12px; color: var(--np-text); margin-top: .1rem; }
.np-plugin-step-mark {
  width: 14px;
  height: 14px;
  margin-top: .15rem;
  border-radius: 50%;
  border: 2px solid rgba(115,135,156,.45);
  flex-shrink: 0;
}
.np-plugin-step.is-running { border-color: rgba(26,187,156,.35); }
.np-plugin-step.is-running .np-plugin-step-mark {
  border-color: #1abb9c;
  border-top-color: transparent;
  animation: np-plugin-spin .7s linear infinite;
}
.np-plugin-step.is-done .np-plugin-step-mark { border-color: #1abb9c; background: #1abb9c; }
.np-plugin-step.is-error { border-color: rgba(231,76,60,.35); }
.np-plugin-step.is-error .np-plugin-step-mark { border-color: #e74c3c; background: #e74c3c; }
.np-plugin-progress-detail {
  margin: .75rem 0 0;
  direction: ltr;
  text-align: left;
  font-size: 11px;
  word-break: break-all;
  color: var(--np-text);
}
.np-plugin-progress-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
}
@keyframes np-plugin-spin { to { transform: rotate(360deg); } }
@keyframes np-plugins-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes np-plugins-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .np-plugins-head { flex-direction: column; align-items: stretch; }
  .np-plugins-install-btn { width: 100%; }
}

/* TEMP DevMigrate — حذف همراه با ابزار موقت */
.np-dev-migrate-warn {
  margin: 0 0 1rem;
  padding: .65rem .85rem;
  border-radius: 10px;
  background: rgba(241, 196, 15, .15);
  color: #b7791f;
  font-size: 13px;
}
.np-dev-migrate-card { margin-bottom: 1rem; max-width: 760px; }
.np-dev-migrate-card h2 { margin: 0 0 .75rem; font-size: 1.05rem; }
.np-dev-migrate-empty { margin: 0; opacity: .7; font-size: 13px; }
.np-dev-migrate-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.np-dev-migrate-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .55rem .7rem;
  border: 1px solid var(--np-border, rgba(0,0,0,.08));
  border-radius: 8px;
  background: var(--np-surface-2, rgba(0,0,0,.02));
}
.np-dev-migrate-list.is-muted { opacity: .65; }
.np-dev-migrate-list code { font-size: 12px; }
.np-dev-migrate-list small { display: block; margin-top: .2rem; opacity: .7; font-size: 12px; }
.np-dev-migrate-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.np-dev-migrate-actions small { opacity: .7; font-size: 12px; }
