:root {
  --bg: #070d17;
  --bg-2: #101b2b;
  --bg-3: #142235;
  --bg-4: #1b2f48;
  --border: rgba(167, 204, 242, 0.18);
  --border-2: rgba(167, 204, 242, 0.3);
  --text: #eaf4ff;
  --text-2: #bfd3ea;
  --text-3: #8ea8c6;
  --cyan: #38bdf8;
  --cyan-d: #0ea5e9;
  --cyan-soft: rgba(56, 189, 248, 0.16);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.16);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.15);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.16);
  --shadow: 0 18px 44px rgba(2, 9, 18, 0.45);
  --radius: 12px;
  --sidebar-w: 170px;
  --brand-logo: url("/assets/images/logos/multibiz-logo.png?v=20260521-logo-final-v1");
  --sidebar-brand-logo: url("/assets/images/logos/multibiz-logo-transparent.png?v=20260522-sidebar-logo-v1");
  --brand-surface: #011635;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 13px;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -12%, rgba(56, 189, 248, 0.14), transparent 34%),
    radial-gradient(circle at 92% 2%, rgba(14, 165, 233, 0.1), transparent 34%),
    linear-gradient(180deg, #060c16 0%, #0b1422 45%, #070d17 100%);
  line-height: 1.58;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
}

body[data-page="api-user-dashboard"] {
  --sidebar-w: 170px;
  overflow-x: hidden;
}

body[data-page="api-user-login"] {
  background: #ffffff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(to right, rgba(134, 180, 228, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(134, 180, 228, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}

a { color: inherit; text-decoration: none; }

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}


.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 14px 12px;
  background: var(--brand-surface);
  border-bottom: 1px solid var(--border);
}
.brand::before {
  content: "";
  width: 118px;
  height: 46px;
  display: block;
  margin-bottom: 2px;
  background: var(--sidebar-brand-logo) left center/contain no-repeat;
}


.brand .mark {
  display: none;
}

body[data-page="api-user-dashboard"] .brand::before {
  content: none;
}

body[data-page="api-user-dashboard"] .brand-logo {
  width: 118px;
  height: 46px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}

.brand .title { font-weight: 700; font-size: 13px; line-height: 1.15; }
.brand .sub { color: var(--text-3); font-size: 12px; margin-top: 0; }

.nav-group { padding: 14px 12px 8px; }
.nav-label {
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 8px 8px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-item + .nav-item { margin-top: 4px; }

.nav-item:hover {
  background: rgba(24, 46, 74, 0.8);
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.34);
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.14);
  color: #bceaff;
  border-color: rgba(56, 189, 248, 0.45);
}

.nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 550;
  border-radius: 10px;
  border: 1px solid transparent;
  color: #bfd3ea;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  background: transparent;
  width: 100%;
}
.nav-parent:hover {
  background: rgba(24, 46, 74, 0.8);
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.34);
}
.nav-parent.child-active {
  background: rgba(56, 189, 248, 0.08);
  color: #eef8ff;
}
.nav-parent-arrow {
  display: inline-flex;
  transition: transform 0.2s;
  width: 16px; height: 16px;
}
.nav-parent[aria-expanded="true"] .nav-parent-arrow {
  transform: rotate(90deg);
}
.nav-sub {
  display: none;
  flex-direction: column;
  padding-left: 14px;
  margin-top: 4px;
  gap: 4px;
}
.nav-sub.open {
  display: flex;
}
.nav-sub-item {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #bfd3ea;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}
.nav-sub-item:hover {
  background: rgba(24, 46, 74, 0.8);
  color: var(--text);
}
.nav-sub-item.active {
  background: rgba(56, 189, 248, 0.14);
  color: #bceaff;
  border-color: rgba(56, 189, 248, 0.45);
}

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  color: #e9f7ff;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.admin-chip {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17, 34, 53, 0.75);
  color: var(--text-3);
  font-size: 12px;
}

.sidebar-logout-btn {
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
}

[data-menu] {
  display: none;
}

.main { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #011635 0%, #011635 62%, #021636 100%);
  backdrop-filter: blur(16px) saturate(1.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; margin-right: auto; }

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--border);
  background: rgba(17, 34, 53, 0.75);
  color: var(--text);
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); border-color: var(--border-2); }

.btn-primary {
  color: #ecf8ff;
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.btn-primary:hover { background: linear-gradient(135deg, #0369a1, #0ea5e9); }

.btn.btn-danger {
  color: #fff1f2;
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.btn.btn-danger:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
  border-color: rgba(248, 113, 113, 0.65);
}

.btn.btn-low-vision-danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.18);
  background: rgba(127, 29, 29, 0.06);
  opacity: 0.82;
}

.btn.btn-low-vision-danger:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.12);
  opacity: 1;
}

.btn-compact {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
}

.btn-compact-xs {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 9px;
}

.container {
  padding: 16px 12px;
  display: grid;
  min-width: 0;
  gap: 16px;
}

.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 29, 45, 0.96), rgba(12, 23, 37, 0.96));
  box-shadow: var(--shadow);
  min-width: 0;
}

.card-h {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.card-h h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); }
.card-text-link {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.card-text-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}
.card-b { padding: 16px; }

.kpi h3 { font-size: 10px; color: var(--text-3); margin-bottom: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.kpi .v { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.kpi .meta { color: var(--text-2); font-size: 10px; margin-top: 6px; }
.kpi.green .v { color: var(--green); }
.kpi.amber .v { color: var(--amber); }
.kpi.red .v { color: var(--red); }

.table-wrap { overflow-x: auto; width: 100%; }
.table { width: 100%; border-collapse: collapse; min-width: 1000px; }
.table th, .table td { padding: 5px 8px; text-align: left; font-size: 8px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.table th { color: var(--text-3); font-size: 7px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; }
.table td { color: var(--text-2); }
.table .status { padding: 1.5px 5px; font-size: 7.5px; }
.table .btn { min-height: 20px; padding: 0 6px; font-size: 8px; border-radius: 4px; }
.table .table-user-link { font-size: 8px; }
.table .txn-ref-link { font-size: 8px; }
.table tr:hover td { background: rgba(24, 46, 74, 0.45); }
.api-user-txn-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.api-user-txn-table th,
.api-user-txn-table td {
  vertical-align: middle;
  padding: 6px 6px;
}
.api-user-txn-table th {
  padding: 6px 6px;
  font-size: 7px;
  line-height: 1.25;
}
.api-user-txn-table td {
  font-size: 8px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.api-user-txn-table .status {
  padding: 2px 6px;
  font-size: 8px;
}
.api-user-txn-table th:nth-child(1),
.api-user-txn-table td:nth-child(1) { width: 4%; }
.api-user-txn-table th:nth-child(2),
.api-user-txn-table td:nth-child(2) { width: 8%; }
.api-user-txn-table th:nth-child(3),
.api-user-txn-table td:nth-child(3) { width: 13%; }
.api-user-txn-table th:nth-child(4),
.api-user-txn-table td:nth-child(4) { width: 9%; }
.api-user-txn-table th:nth-child(5),
.api-user-txn-table td:nth-child(5) { width: 15%; }
.api-user-txn-table th:nth-child(6),
.api-user-txn-table td:nth-child(6) { width: 9%; }
.api-user-txn-table th:nth-child(7),
.api-user-txn-table td:nth-child(7) { width: 8%; }
.api-user-txn-table th:nth-child(8),
.api-user-txn-table td:nth-child(8) { width: 7%; }
.api-user-txn-table th:nth-child(9),
.api-user-txn-table td:nth-child(9) { width: 9%; }
.api-user-txn-table th:nth-child(10),
.api-user-txn-table td:nth-child(10) { width: 9%; }
.api-user-txn-table th:nth-child(11),
.api-user-txn-table td:nth-child(11) { width: 9%; }
.api-user-txn-table .btn {
  min-height: 28px;
  min-width: 0;
  width: 100%;
  padding: 0 6px;
  font-size: 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.api-user-txn-table .table-user-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.api-user-txn-table td:nth-child(8),
.api-user-txn-table td:nth-child(9),
.api-user-txn-table td:nth-child(10),
.api-user-txn-table td:nth-child(11) {
  white-space: normal;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
}

.status.ok { background: var(--green-soft); color: var(--green); }
.status.verified { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.status.warn { background: var(--amber-soft); color: var(--amber); }
.status.err { background: var(--red-soft); color: var(--red); }
.status.has-icon { gap: 6px; }
.status .kyc-tick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}
.status .kyc-tick-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.3;
}

.filters { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 10px; }
.report-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.report-switch .btn {
  min-width: 180px;
}
.api-report-filters {
  grid-template-columns: 1fr 1.4fr 1fr 1fr 1fr 1fr 1fr auto;
}
.fund-ledger-filters { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr auto; }
body[data-page="api-user-dashboard"] .fund-ledger-filters {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)) auto;
}
body[data-page="api-user-dashboard"] .api-report-filters {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) repeat(5, minmax(0, 1fr)) auto;
}
body[data-page="api-user-dashboard"] .api-report-filters > *,
body[data-page="api-user-dashboard"] .fund-ledger-filters > * {
  min-width: 0;
}
body[data-page="api-user-dashboard"] .api-report-filters .input,
body[data-page="api-user-dashboard"] .api-report-filters .select,
body[data-page="api-user-dashboard"] .fund-ledger-filters .input,
body[data-page="api-user-dashboard"] .fund-ledger-filters .select {
  width: 100%;
}
body[data-page="api-user-dashboard"] .api-report-filters .btn,
body[data-page="api-user-dashboard"] .fund-ledger-filters .btn {
  min-width: 0;
  width: 100%;
}
body[data-page="api-user-dashboard"] .api-user-layout {
  min-width: 0;
}
.ledger-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ledger-recipient {
  display: grid;
  gap: 2px;
}
.ledger-recipient strong {
  font-size: 10px;
  color: var(--text);
}
.ledger-recipient span {
  color: var(--text-3);
  font-size: 9px;
}
.field { display: grid; gap: 6px; }
.field label { font-size: 9px; color: var(--text-3); font-weight: 600; }
.input, .select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(11, 24, 40, 0.84);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}
.input:focus, .select:focus { outline: 2px solid rgba(56, 189, 248, 0.55); outline-offset: 1px; }

.api-credential-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.api-credential-grid .btn {
  min-width: 152px;
}

.api-profile-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.api-profile-controls {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.api-profile-form #apiProfileSaveBtn {
  width: 100%;
}

.api-password-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.api-note {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 10px;
}

.api-divider {
  margin: 14px 0;
  height: 1px;
  background: var(--border);
}

.api-user-layout {
  gap: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  align-content: start;
  grid-auto-rows: max-content;
  background:
    linear-gradient(90deg, rgba(9, 26, 44, 0.78), rgba(4, 14, 29, 0.82) 36%, rgba(6, 30, 51, 0.76) 72%, rgba(4, 14, 29, 0.84)),
    linear-gradient(180deg, rgba(8, 18, 32, 0.95), rgba(7, 16, 28, 0.95));
  min-height: calc(100vh - 138px);
}

.api-head-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
}

.api-profile-summary {
  margin-bottom: 12px;
  padding: 12px 14px;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--border);
  border-radius: 10px;
  border-bottom-width: 1px;
  background: rgba(11, 24, 40, 0.62);
}

.api-head-item h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.api-head-item p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
  min-height: 20px;
  overflow-wrap: anywhere;
}

.api-tab-panel {
  margin: 14px 18px 0;
  display: none;
}

.api-tab-panel.is-active {
  display: block;
}

.api-tab-panel .card-h h2 {
  font-size: 12px;
}

.api-token-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.api-reset-result {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  background: rgba(9, 23, 37, 0.72);
}

.api-reset-title {
  color: var(--text-2);
  font-size: 11px;
  margin-bottom: 8px;
}

.api-reset-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

body[data-page="api-user-dashboard"] .nav-group { padding: 14px 12px 8px; }

body[data-page="api-user-dashboard"] .nav-item {
  min-height: 40px;
  font-size: 11px;
  font-weight: 650;
  padding: 8px 9px;
  border-radius: 8px;
}

body[data-page="api-user-dashboard"] 
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 14px 12px;
  background: var(--brand-surface);
  border-bottom: 1px solid var(--border);
}

body[data-page="api-user-dashboard"] .api-subnav {
  display: grid;
  gap: 4px;
  padding: 0 0 2px 10px;
}

body[data-page="api-user-dashboard"] .api-subnav[hidden] {
  display: none !important;
}

body[data-page="api-user-dashboard"] .api-subnav-item,
body[data-page="api-user-dashboard"] .api-service-nav-item {
  min-height: 34px;
  font-size: 11px;
  font-weight: 550;
  padding-top: 6px;
  padding-bottom: 6px;
}

body[data-page="api-user-dashboard"] .api-service-nav-item {
  width: 42px;
  min-width: 42px;
  padding: 6px;
  justify-content: center;
  align-items: center;
}

body[data-page="api-user-dashboard"] .api-service-nav-icon,
body[data-page="api-user-dashboard"] .api-service-nav-fallback {
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 999px;
  object-fit: contain;
  flex: 0 0 auto;
}

body[data-page="api-user-dashboard"] .api-service-nav-fallback {
  display: grid;
  place-items: center;
  background: rgba(56, 189, 248, 0.14);
  color: #d6f4ff;
  font-size: 11px;
  font-weight: 700;
}

body[data-page="api-user-dashboard"] .api-subnav .service-empty {
  color: var(--text-3);
  font-size: 11px;
  padding: 8px 10px;
}

/* API dashboard: merge switch + filter + report into one visual card stack */
body[data-page="api-user-dashboard"] .api-tab-panel[data-api-tab-panel="dashboard"] {
  margin: 0 18px;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="api-user-dashboard"] .api-tab-panel[data-api-tab-panel="dashboard"]:first-of-type {
  margin-top: 14px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

#apiReportSwitchCard,
#apiTxnFilterCard,
#apiTxnReportCard,
#apiLedgerFilterCard,
#apiLedgerCard,
#apiServiceControlCard,
#apiIntegrationKitCard,
#apiProfilePanel,
#apiTokenPanel,
#apiChangePasswordPanel {
  scroll-margin-top: 18px;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode {
  min-height: 0 !important;
  align-content: start;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard {
  margin-top: 8px;
  margin-bottom: 8px;
  border-radius: 10px;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .card-b {
  padding-top: 14px;
  padding-bottom: 14px;
  min-height: 0 !important;
  min-height: 140px !important;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-note {
  display: none;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-integration-guide {
  display: grid;
  gap: 12px;
  width: 100%;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-integration-summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(9, 22, 38, 0.38);
  color: #000;
  font-size: 11px;
  line-height: 1.5;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-integration-summary strong {
  color: #000;
  font-size: 12px;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-integration-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-step {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(9, 22, 38, 0.34);
  color: #000;
  font-size: 11px;
  line-height: 1.45;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-step strong {
  display: block;
  margin-bottom: 4px;
  color: #000;
  font-size: 12px;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-step code,
body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-integration-summary code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #000;
  font-size: 10px;
  word-break: break-word;
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .service-form-actions {
  margin-top: 0;
  justify-content: flex-start;
  grid-column: auto;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(9, 22, 38, 0.62);
}

body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .service-form-actions .btn {
  min-height: 44px;
  min-width: 180px;
  padding: 0 18px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-integration-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .api-integration-steps {
    grid-template-columns: 1fr;
  }
}

body[data-page="api-user-dashboard"] #apiTxnFilterCard,
body[data-page="api-user-dashboard"] #apiLedgerFilterCard,
body[data-page="api-user-dashboard"] #apiTxnReportCard,
body[data-page="api-user-dashboard"] #apiLedgerCard {
  border-top: 0;
}

body[data-page="api-user-dashboard"] #apiTxnReportCard,
body[data-page="api-user-dashboard"] #apiLedgerCard {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin-bottom: 14px;
}

body[data-page="api-user-dashboard"] #apiServiceControlCard,
body[data-page="api-user-dashboard"] #apiRechargeCard {
  margin-top: 12px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}

body[data-page="api-user-dashboard"] #apiServiceControlCard .card-b,
body[data-page="api-user-dashboard"] #apiRechargeCard .card-b {
  padding: 12px;
}

.api-recharge-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.api-recharge-pack-field {
  grid-column: span 2;
}

.api-recharge-form .service-form-actions {
  justify-content: flex-start;
}

.api-recharge-output {
  margin-top: 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(9, 23, 37, 0.72);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  padding: 10px 12px;
  max-height: 260px;
  overflow: auto;
}

.customer-filter-card .card-b { padding: 12px; }
.customer-filter-card .filters {
  gap: 8px;
  grid-template-columns: 1.55fr 1.1fr 1.1fr 1.1fr 1fr 0.68fr;
}
.customer-filter-card .field { gap: 4px; }
.customer-filter-card .field label { font-size: 8px; }
.customer-filter-card .input,
.customer-filter-card .select {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}
.customer-filter-card .btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}
.customer-filter-card #customerApplyBtn {
  width: 100%;
  align-self: end;
}

#txnFilterCard .card-b { padding: 12px; }
#txnFilterCard,
#txnLiveCard {
  overflow: hidden;
}
#txnFilterCard .filters {
  gap: 8px;
  grid-template-columns: minmax(170px, 1.15fr) minmax(110px, 0.72fr) minmax(130px, 0.86fr) minmax(140px, 0.92fr) minmax(118px, 0.74fr) 88px;
}
#txnFilterCard .field { gap: 4px; }
#txnFilterCard .field label { font-size: 8px; }
#txnFilterCard .input,
#txnFilterCard .select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 8px;
  font-size: 9px;
}
#txnFilterCard .btn {
  min-height: 32px;
  padding: 0 8px;
  font-size: 9px;
}
#txnFilterCard #txnApplyBtn {
  width: 100%;
  align-self: end;
}
#txnLiveCard .card-b.table-wrap {
  padding-top: 10px;
  padding-bottom: 10px;
  overflow-x: hidden;
}

#retailersCard .card-b.table-wrap {
  min-height: 460px;
}

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.service-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.commission-plan-form {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 0.9fr 0.8fr auto;
  gap: 10px;
  align-items: end;
}
.service-form .field { min-width: 0; }
.commission-plan-form .field { min-width: 0; }
.service-logo-field { grid-column: span 2; }
.service-users-field { grid-column: span 2; }
.service-extra-field { grid-column: span 2; }
.service-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.commission-plan-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  align-self: end;
  flex-wrap: wrap;
}
.commission-plan-actions .btn {
  min-height: 32px;
  padding: 0 12px;
}
.commission-plan-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.commission-plan-name-cell strong {
  color: var(--text);
  font-size: 12px;
}
.commission-plan-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.commission-assignment-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 1.8fr auto;
  gap: 10px;
  align-items: end;
}
.commission-assignment-grid .field { min-width: 0; }
.commission-assignment-summary-field { align-self: stretch; }
.commission-assignment-summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}
.commission-plan-assigned-state {
  display: grid;
  gap: 6px;
}
.commission-plan-assigned-state strong {
  color: var(--text);
  font-size: 12px;
}
.commission-plan-assigned-state p {
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.45;
}
.commission-plan-assignment-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.commission-plan-assignment-inline .select {
  min-width: 220px;
  flex: 1 1 220px;
}
.product-commission-editor {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(110px, 0.5fr) minmax(130px, 0.6fr) auto;
  gap: 10px;
  align-items: center;
}
.product-commission-editor .select,
.product-commission-editor .input {
  min-width: 0;
  width: 100%;
}
.product-commission-editor .btn {
  white-space: nowrap;
}
.api-user-detail-commissions {
  margin-top: 12px;
}
.api-user-detail-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.action-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.product-commission-empty {
  padding-top: 2px;
}
.product-commission-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}
.product-commission-list-head,
.product-commission-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}
.product-commission-list-head {
  background: rgba(245, 248, 252, 0.95);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.product-commission-list-row {
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}
.product-commission-list-row strong {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(46, 211, 143, 0.14);
  color: var(--success);
  font-size: 11px;
}
.product-commission-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.product-commission-row-actions .btn {
  min-width: 72px;
}
.service-switch-field { min-height: 66px; }
.service-switch {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(9, 22, 38, 0.72);
  cursor: pointer;
}
.service-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.service-switch span {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.3);
  position: relative;
  flex: 0 0 auto;
}
.service-switch span::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  left: 3px;
  top: 3px;
  transition: left 0.18s ease;
}
.service-switch input:checked + span { background: rgba(52, 211, 153, 0.5); }
.service-switch input:checked + span::after { left: 23px; }
.service-switch strong { font-size: 12px; }
.service-logo-upload {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(9, 22, 38, 0.72);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-logo-preview {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(167, 204, 242, 0.28);
  object-fit: contain;
  background: rgba(13, 27, 43, 0.9);
  flex: 0 0 auto;
}
.service-logo-hint {
  flex: 1 1 auto;
  color: var(--text-3);
  font-size: 9px;
  line-height: 1.2;
}
#serviceLogoClearBtn {
  min-height: 24px;
  padding: 0 8px;
  font-size: 8px;
}
.service-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.service-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  object-fit: contain;
  background: #ffffff;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.service-logo-fallback {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.service-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-3);
  background: rgba(17, 34, 53, 0.45);
}
.service-tile {
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  padding: 10px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}
.service-tile h3 {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.service-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.service-row-actions {
  margin-top: auto;
  align-items: center;
}
.service-meta-grid {
  display: grid;
  grid-template-columns: minmax(80px, auto) 1fr;
  column-gap: 16px;
  row-gap: 6px;
  align-items: center;
}
.service-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #94a3b8;
  white-space: nowrap;
}
.service-meta-value {
  font-size: 10px;
  line-height: 1.3;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}
.service-public-code {
  font-size: 10px;
  color: #334155;
  font-weight: 400;
  margin: 2px 0;
}
.service-public-code strong {
  font-weight: 700;
  color: #0f172a;
}
.service-inline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
  flex-wrap: wrap;
}
.service-link-btn {
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.service-link-btn:hover { color: #0ea5e9; }
.service-control {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}
.service-readonly {
  font-size: 10px;
  color: #64748b;
}
.commission-plan-empty {
  text-align: center;
  color: #64748b;
}

#adminUserAccessCard .card-b.grid.cols-2 {
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  align-items: start;
  column-gap: 12px;
}

#adminUserAccessCard .card-h {
  padding: 6px 12px;
  min-height: 44px;
}

#adminUserAccessCard .card-h h2 {
  margin: 0;
  line-height: 1.1;
  font-size: 10px;
}

#adminUserAccessCard #adminUsersRefreshBtn {
  min-height: 30px;
  padding: 0 12px;
  font-size: 10px;
}

#adminUserCreateForm {
  align-self: start;
  gap: 10px;
}

#adminUserCreateForm .field {
  gap: 4px;
}

#adminUserCreateForm .input {
  min-height: 34px;
  border-radius: 9px;
  padding: 0 10px;
}

#adminUserCreateForm p {
  margin: 0;
}
.toggle {
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.3);
  position: relative;
  cursor: pointer;
}
.toggle::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
}
.toggle.on { background: rgba(52, 211, 153, 0.5); }
.toggle.on::after { left: 21px; }
.service-tile .toggle {
  width: 32px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
  box-sizing: border-box;
}
.service-tile .toggle::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: left 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-tile .toggle.on {
  background: #a7f3d0;
}
.service-tile .toggle.on::after {
  left: 17px;
}

#addServiceCard .card-h {
  padding: 9px 10px;
}
#addServiceCard .card-h h2 {
  font-size: 10px;
  letter-spacing: 0.1em;
}
#addServiceCard .card-b {
  padding: 10px;
}
#addServiceCard .status {
  padding: 2px 6px;
  font-size: 9px;
}
#addServiceCard .service-form {
  gap: 8px;
}
#addServiceCard .field {
  gap: 4px;
}
#addServiceCard .field label {
  font-size: 8px;
}
#addServiceCard .input,
#addServiceCard .select {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 10px;
}
#addServiceCard #serviceUserSearch {
  min-height: 28px;
}
#addServiceCard #serviceAssignedUsers {
  min-height: 92px;
  padding: 4px 6px;
  font-size: 9px;
  line-height: 1.2;
}
#addServiceCard #serviceExtraField {
  min-height: 70px;
  padding: 7px 9px;
  line-height: 1.25;
}
#addServiceCard #serviceLogoFile {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 9px;
}
#addServiceCard .service-logo-upload {
  min-height: 34px;
  border-radius: 8px;
  padding: 4px 6px;
  gap: 6px;
}
#addServiceCard .service-logo-preview {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
#addServiceCard .service-logo-hint {
  font-size: 8px;
}
#addServiceCard #serviceLogoClearBtn {
  min-height: 20px;
  font-size: 8px;
  padding: 0 6px;
}
#addServiceCard .service-switch-field {
  min-height: 46px;
}
#addServiceCard .service-switch {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 8px;
  gap: 8px;
}
#addServiceCard .service-switch span {
  width: 30px;
  height: 16px;
}
#addServiceCard .service-switch span::after {
  width: 10px;
  height: 10px;
  left: 3px;
  top: 3px;
}
#addServiceCard .service-switch input:checked + span::after {
  left: 17px;
}
#addServiceCard .service-switch strong {
  font-size: 10px;
}
#addServiceCard .service-form-actions {
  gap: 6px;
}
#addServiceCard .service-form-actions .btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 9px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background: #ffffff;
}

body[data-page="admin-login"] .login-wrap {
  padding: 20px;
  background: #ffffff;
}

body[data-page="admin-login"] .login-shell {
  width: min(1320px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  gap: 0;
  align-items: stretch;
}

body[data-page="admin-login"] .login-hero-panel,
body[data-page="admin-login"] .login-card {
  min-height: 760px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
}

body[data-page="admin-login"] .login-hero-panel {
  position: relative;
  overflow: hidden;
  padding: 56px 58px;
  border-radius: 28px 0 0 28px;
  background: #ffffff;
}

body[data-page="admin-login"] .login-hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.04) 0%, rgba(96, 165, 250, 0.01) 58%, transparent 72%);
}

body[data-page="admin-login"] .login-hero-dots {
  position: absolute;
  top: 26px;
  right: 58px;
  width: 180px;
  height: 180px;
  background-image: radial-gradient(rgba(148, 163, 184, 0.04) 1.6px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: 0.14;
  mask-image: linear-gradient(180deg, rgba(0,0,0,1), rgba(0,0,0,0.08));
}

body[data-page="admin-login"] .login-brand-mark {
  width: 210px;
  height: auto;
  margin-top: 92px;
  margin-bottom: 48px;
  filter: none;
}

body[data-page="admin-login"] .login-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 360px;
}

body[data-page="admin-login"] .login-title-hero {
  font-size: 30px;
  line-height: 1.08;
  color: #16315c;
  margin-bottom: 10px;
}

body[data-page="admin-login"] .login-sub-hero {
  max-width: 340px;
  font-size: 15px;
  line-height: 1.55;
  color: #5a6880;
  margin-bottom: 40px;
}

body[data-page="admin-login"] .login-hero-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(191, 219, 254, 0.8);
  color: #1f3b68;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 16px 36px rgba(59, 130, 246, 0.08);
}

body[data-page="admin-login"] .login-hero-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, #dbeafe, #bfdbfe);
  font-size: 20px;
}

body[data-page="admin-login"] .login-card {
  width: 100%;
  max-width: none;
  border-radius: 0 28px 28px 0;
  padding: 64px 72px;
  background: #ffffff;
}

body[data-page="admin-login"] .admin-login-card-top {
  margin: 0 0 18px;
}

body[data-page="admin-login"] .admin-login-card-top .login-title {
  font-size: 28px;
  color: #16315c;
}

body[data-page="admin-login"] .admin-login-card-top .login-sub {
  margin-bottom: 0;
  font-size: 14px;
  color: #64748b;
}

body[data-page="admin-login"] .login-card .field {
  gap: 8px;
}

body[data-page="admin-login"] .login-card .field label {
  font-size: 10px;
  color: #475569;
}

body[data-page="admin-login"] .login-card .input {
  min-height: 54px;
  border-radius: 14px;
  background: #f8fbff;
  color: #0f172a;
  border-color: #d7e3f2;
}

body[data-page="admin-login"] .login-card .input::placeholder {
  color: #94a3b8;
}

body[data-page="admin-login"] .login-grid {
  gap: 14px;
  margin-top: 26px;
}

body[data-page="admin-login"] .login-card .btn.btn-primary {
  min-height: 54px;
  border-radius: 14px;
  font-size: 14px;
}

body[data-page="admin-login"] .login-note,
body[data-page="admin-login"] .login-note-compact {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.api-login-wrap {
  position: relative;
  overflow: hidden;
  background: #ffffff !important;
}

.api-login-wrap::before {
  content: none;
}

.login-shell {
  width: min(580px, 100%);
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  position: relative;
  z-index: 1;
}

.api-login-wrap .login-hero-panel,
.api-login-wrap .login-card {
  border: 1px solid rgba(167, 204, 242, 0.18);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(7, 17, 31, 0.06);
  backdrop-filter: none;
}

.login-hero-panel {
  min-width: 0;
  padding: 28px 30px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  background: #ffffff;
}

.login-brandbar {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
}

.login-brand-mark {
  width: 178px;
  height: 58px;
  object-fit: contain;
}

.login-brandbar strong,
.login-brandbar small {
  display: block;
}

.login-brandbar strong {
  font-size: 16px;
  color: var(--text);
}

.login-brandbar small {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-hero-empty {
  display: block;
  min-height: 24px;
}

.login-card {
  width: min(100%, 360px);
  max-width: 360px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 255, 0.99));
  box-shadow: 0 12px 28px rgba(7, 17, 31, 0.05);
  padding: 16px 16px 14px;
}

.api-login-wrap .login-card {
  width: min(100%, 420px);
  max-width: none;
  align-self: center;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 255, 0.99));
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 16px;
}

.login-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.login-sub { color: var(--text-2); font-size: 11px; margin-bottom: 12px; line-height: 1.4; }
.api-login-wrap .login-title { font-size: 26px; font-weight: 900; }
.api-login-wrap .login-sub {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.45;
}
.login-secure-badge {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(52, 211, 153, 0.34);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-grid { display: grid; gap: 8px; }
.api-login-wrap .login-grid { gap: 14px; }
.api-login-wrap .otp-step[hidden] { display: none !important; }
.api-login-wrap .otp-step {
  display: grid;
  gap: 10px;
}
.api-login-wrap [data-api-login-mode] { display: none; }
.api-login-wrap [data-api-login-mode].is-active { display: grid; }
.api-login-wrap .login-card .field { gap: 8px; }
.api-login-wrap .login-card .field label {
  color: #516182;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.api-login-wrap .login-card .input {
  min-height: 46px;
  border-radius: 11px;
  background: #5b6572;
  border-color: rgba(167, 204, 242, 0.22);
  font-size: 13px;
  color: #fff;
}

.api-login-wrap .login-card .input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.api-login-wrap .login-card .input:focus {
  outline: 3px solid rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.66);
}

.login-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(167, 204, 242, 0.2);
  border-radius: 12px;
  padding: 6px;
  background: rgba(4, 15, 28, 0.52);
}

.login-mode-btn {
  min-height: 42px;
  border-radius: 10px;
  border-color: transparent;
  background: transparent;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.login-mode-btn.is-active {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.22);
  color: #d7edff;
}

.login-actions {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 8px;
}

.login-actions.login-actions-single {
  grid-template-columns: 1fr;
}

.login-actions .btn {
  min-height: 50px;
  border-radius: 12px;
  font-size: 12px;
}

.api-login-wrap .otp-send-row .btn,
.api-login-wrap .otp-verify-row .btn {
  width: 100%;
  min-height: 50px;
}

.login-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-3);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.api-login-wrap .login-note {
  font-size: 12px;
  border-radius: 12px;
}

.login-help {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commission-plan-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commission-assignment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell {
    min-height: auto;
  }
  .api-login-wrap .login-card {
    align-self: stretch;
  }
}

@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  
  [data-menu] {
    display: inline-flex;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w, 170px);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 14px 12px;
  background: var(--brand-surface);
  border-bottom: 1px solid var(--border);
}
body[data-page="api-user-dashboard"] 
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 14px 12px;
  background: var(--brand-surface);
  border-bottom: 1px solid var(--border);
}
.sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 14px; }
  .topbar h1 { font-size: 20px; }
  .container { padding: 14px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .service-grid { grid-template-columns: 1fr; }
  #adminUserAccessCard .card-b.grid.cols-2 { grid-template-columns: 1fr; }
  .service-form { grid-template-columns: 1fr; }
  .commission-plan-form { grid-template-columns: 1fr; }
  .commission-assignment-grid { grid-template-columns: 1fr; }
  .api-recharge-form { grid-template-columns: 1fr; }
  .api-recharge-pack-field { grid-column: auto; }
  .service-users-field,
  .service-extra-field { grid-column: auto; }
  .service-form-actions { justify-content: stretch; }
  .service-form-actions .btn { flex: 1 1 140px; }
  .commission-plan-actions { justify-content: stretch; }
  .commission-plan-actions .btn { flex: 1 1 140px; }
  .commission-plan-assignment-inline { flex-direction: column; align-items: stretch; }
  .product-commission-editor { grid-template-columns: 1fr; }
  .product-commission-list-head,
  .product-commission-list-row { grid-template-columns: 1fr; }
  .product-commission-row-actions { justify-content: flex-start; }
  .filters { grid-template-columns: 1fr; }
  .report-switch .btn { min-width: 0; flex: 1 1 160px; }
  .ledger-head-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .api-credential-grid { grid-template-columns: 1fr; }
  .api-credential-grid .btn { min-width: 0; width: 100%; }
  .api-user-layout {
    min-height: auto;
  }
  .api-head-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px;
  }
  .api-head-item h3 {
    font-size: 14px;
  }
  .api-head-item p {
    font-size: 12px;
  }
  .api-tab-panel {
    margin: 12px 12px 0;
  }
  body[data-page="api-user-dashboard"] .api-tab-panel[data-api-tab-panel="dashboard"] {
    margin: 0 12px;
  }
  body[data-page="api-user-dashboard"] #apiTxnReportCard,
  body[data-page="api-user-dashboard"] #apiLedgerCard {
    margin-bottom: 12px;
  }
  .api-password-form {
    grid-template-columns: 1fr;
  }
  .api-token-row {
    grid-template-columns: 1fr;
  }
  .api-reset-copy-row {
    grid-template-columns: 1fr;
  }
  .login-wrap {
    padding: 14px;
    place-items: start center;
  }
  .login-shell {
    width: min(100%, 580px);
    gap: 18px;
  }
  body[data-page="admin-login"] .login-shell {
    grid-template-columns: 1fr;
  }
  body[data-page="admin-login"] .login-hero-panel,
  body[data-page="admin-login"] .login-card {
    min-height: auto;
    border-radius: 22px;
    padding: 18px 16px;
  }
  .api-login-wrap .login-hero-panel,
  .api-login-wrap .login-card {
    border-radius: 18px;
    padding: 18px 16px;
  }
  .api-login-wrap .login-card {
    order: 0;
    max-width: none;
    width: 100%;
  }
  .login-hero-panel {
    gap: 16px;
  }
  .api-login-wrap .login-brand-mark {
    width: 126px;
    height: 40px;
  }
  .login-brandbar {
    gap: 10px;
  }
  .login-brandbar strong {
    font-size: 14px;
  }
  .login-brandbar small {
    margin-top: 1px;
    font-size: 9px;
  }
  .login-hero-panel h1 {
    font-size: clamp(18px, 6vw, 24px);
  }
  .login-card-top {
    margin: 16px 0 18px;
  }
  .api-login-wrap .login-title {
    font-size: 22px;
  }
  .api-login-wrap .login-sub {
    font-size: 11px;
  }
  .login-mode-switch {
    gap: 6px;
    padding: 5px;
    margin-bottom: 12px;
  }
  .login-mode-btn {
    min-height: 40px;
    font-size: 10px;
  }
  .login-grid {
    gap: 12px;
  }
  .api-login-wrap .login-card .field label {
    font-size: 9px;
  }
  .api-login-wrap .login-card .input {
    min-height: 48px;
    font-size: 13px;
    border-radius: 11px;
  }
  .login-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .login-actions .btn {
    min-height: 46px;
    font-size: 11px;
  }
  .login-help {
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .login-wrap {
    padding: 10px;
  }
  body[data-page="admin-login"] .login-hero-panel {
    padding: 20px 16px 16px;
  }
  body[data-page="admin-login"] .login-brand-mark {
    width: 150px;
    margin-top: 18px;
    margin-bottom: 24px;
  }
  body[data-page="admin-login"] .login-title-hero {
    font-size: 22px;
  }
  body[data-page="admin-login"] .login-sub-hero {
    font-size: 12px;
    margin-bottom: 20px;
  }
  body[data-page="admin-login"] .login-card {
    padding: 18px 16px;
  }
  .login-shell {
    width: min(100%, 580px);
    gap: 16px;
  }
  .login-hero-panel {
    padding: 22px 16px 14px;
    gap: 14px;
  }
  .api-login-wrap .login-card {
    padding: 18px 16px;
  }
  .login-card-top {
    display: grid;
    gap: 10px;
    margin: 14px 0 16px;
  }
  .login-secure-badge {
    align-self: flex-start;
  }
  .login-actions {
    grid-template-columns: 1fr;
  }
  .login-actions .btn {
    min-height: 44px;
  }
  .api-login-wrap .login-card .input {
    min-height: 46px;
  }
  .login-help {
    font-size: 9px;
  }
}

/* ===== LIGHT SURFACE REFRESH (2026-05-21) ===== */
:root {
  --bg: #f4f6fb;
  --bg-2: #fbfcff;
  --bg-3: #eef2f8;
  --bg-4: #dde5f0;
  --border: rgba(7, 17, 31, 0.1);
  --border-2: rgba(7, 17, 31, 0.16);
  --text: #07111f;
  --text-2: #172638;
  --text-3: #304156;
  --shadow: 0 20px 48px rgba(10, 14, 26, 0.08);
}

body {
  background:
    radial-gradient(circle at 10% -12%, rgba(56, 189, 248, 0.08), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(14, 165, 233, 0.06), transparent 28%),
    linear-gradient(180deg, #f4f6fb 0%, #eef3f8 52%, #f8fbff 100%);
  color: var(--text);
}

body::before {
  opacity: 0.34;
  background-image:
    linear-gradient(to right, rgba(7, 17, 31, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(7, 17, 31, 0.05) 1px, transparent 1px);
}

.sidebar,
.brand,
.topbar {
  background: linear-gradient(180deg, #011635 0%, #011635 62%, #021636 100%);
}

.sidebar,
.brand,
.topbar,
.sidebar-foot {
  border-color: rgba(153, 205, 255, 0.18);
}

.brand .title,
.topbar h1,
.topbar .btn:not(.btn-primary),
.sidebar .btn:not(.btn-primary),
.admin-chip {
  color: #eef8ff;
}

.brand .sub,
.nav-label,
.nav-item,
.sidebar .logout-btn {
  color: #bfd3ea;
}

.nav-item:hover {
  background: rgba(24, 46, 74, 0.78);
  color: #eef8ff;
  border-color: rgba(56, 189, 248, 0.32);
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.16);
  color: #eef8ff;
}

.admin-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(153, 205, 255, 0.18);
}

.btn {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

.btn:hover {
  background: var(--bg-3);
}

.topbar .btn:not(.btn-primary),
.sidebar .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.04);
  color: #eef8ff;
  border-color: rgba(153, 205, 255, 0.18);
}

.topbar .btn:not(.btn-primary):hover,
.sidebar .btn:not(.btn-primary):hover {
  background: rgba(255, 255, 255, 0.1);
}

.card,
.login-card,
.api-login-wrap .login-card {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  border-color: var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
}

.card-h,
.table th,
.table td,
.api-head-row,
.api-profile-summary,
.api-divider {
  border-color: var(--border);
}

.table th {
  color: var(--text-3);
  background: #f6f9fd;
}

.table td {
  color: var(--text-2);
}

.table tr:hover td {
  background: var(--bg-3);
}

.input,
.select {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--border);
}

.input::placeholder {
  color: var(--text-3);
}

.api-user-layout {
  background: linear-gradient(180deg, #fafdff 0%, #eef3f8 100%);
  border-color: var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
}

.api-profile-summary,
.api-reset-result,
.api-recharge-output,
body[data-page="api-user-dashboard"] .api-user-layout.is-developer-mode #apiIntegrationKitCard .service-form-actions {
  background: #f5f8fc;
  border-color: var(--border);
}

.api-login-wrap {
  background: #ffffff !important;
}

.api-login-wrap::before {
  content: none;
}

.login-hero-panel {
  background:
    radial-gradient(circle at top left, rgba(248, 250, 252, 0.9), transparent 28%),
    radial-gradient(circle at bottom right, rgba(241, 245, 249, 0.75), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border-color: rgba(226, 232, 240, 0.9);
}

.api-login-wrap .login-brand-mark {
  display: block;
  width: 200px;
  height: 62px;
  background: none;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
  object-fit: contain;
}

.login-brandbar strong,
.login-title,
.login-hero-panel h1 {
  color: var(--text);
}

.login-brandbar small,
.login-sub,
.login-hero-panel p {
  color: var(--text-2);
}

.login-feature {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text-2);
}

body[data-page="admin-dashboard"] .grid.cols-4 {
  gap: 12px;
}

body[data-page="admin-dashboard"] .grid.cols-4 .card-b {
  padding: 12px 14px;
  min-height: 92px;
}

body[data-page="admin-dashboard"] .grid.cols-4 .kpi h3 {
  font-size: 9px;
  margin-bottom: 8px;
  letter-spacing: 0.07em;
}

body[data-page="admin-dashboard"] .grid.cols-4 .kpi .v {
  font-size: 18px;
}

body[data-page="admin-dashboard"] .grid.cols-4 .kpi .meta {
  font-size: 9px;
  margin-top: 4px;
}

.monitor-card .monitor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.monitor-card .monitor-stat {
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.monitor-card .monitor-stat .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.monitor-card .monitor-stat .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  word-break: break-word;
}

.monitor-card .monitor-stat .value.value-sm {
  font-size: 15px;
  font-weight: 600;
}

.monitor-card .monitor-stat.span-2 {
  grid-column: span 2;
}

@media (max-width: 1100px) {
  .monitor-card .monitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monitor-card .monitor-stat.span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .monitor-card .monitor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .monitor-card .monitor-stat.span-2 {
    grid-column: span 1;
  }
}


.brand .mark {
  display: none;
}








#txnFilterCard .filters {
  align-items: end;
}

body[data-page="admin-api-user-transactions"] #txnFilterCard .filters {
  grid-template-columns: minmax(180px, 1.35fr) minmax(110px, 0.7fr) minmax(130px, 0.9fr) minmax(150px, 1fr) minmax(120px, 0.85fr) minmax(120px, 0.85fr) 88px;
}

body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(1),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(1) { width: 4%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(2),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(2) { width: 11%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(3),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(3) { width: 10%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(4),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(4) { width: 9%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(5),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(5) { width: 9%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(6),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(6) { width: 11%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(7),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(7) { width: 12%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(8),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(8) { width: 13%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(9),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(9) { width: 7%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(10),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(10) { width: 8%; }
body[data-page="admin-api-user-transactions"] .api-user-txn-table th:nth-child(11),
body[data-page="admin-api-user-transactions"] .api-user-txn-table td:nth-child(11) { width: 6%; }

.api-log-result {
  display: grid;
  gap: 2px;
}

.api-log-result strong {
  color: var(--text);
  font-size: 9px;
}

.api-log-result span {
  color: var(--text-3);
  font-size: 8px;
}

.api-log-error {
  color: #b91c1c;
  font-weight: 700;
}

.api-log-clear {
  color: #0f766e;
  font-weight: 700;
}

.txn-action-stack {
  display: grid;
  gap: 6px;
}

.txn-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.txn-details-grid .txn-details-section {
  margin-top: 0;
}

.txn-details-section-note {
  margin-top: 6px;
  color: #5a6e88;
  font-size: 11px;
}

@media (max-width: 1480px) {
  #txnFilterCard .filters {
    grid-template-columns: minmax(160px, 1.1fr) minmax(100px, 0.7fr) minmax(120px, 0.82fr) minmax(130px, 0.88fr) minmax(112px, 0.7fr) 80px;
  }
  body[data-page="admin-api-user-transactions"] #txnFilterCard .filters {
    grid-template-columns: minmax(160px, 1.2fr) minmax(100px, 0.7fr) minmax(120px, 0.8fr) minmax(130px, 0.9fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) 80px;
  }
}

@media (max-width: 900px) {
  .txn-details-grid {
    grid-template-columns: 1fr;
  }
}

.table-user-link {
  color: #123a78;
  font-weight: 600;
  text-decoration: none;
}

.table-user-link:hover {
  color: #0a58ca;
  text-decoration: underline;
}

.txn-ref-link {
  border: 0;
  background: transparent;
  color: #123a78;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  padding: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.txn-ref-link:hover {
  color: #0a58ca;
  text-decoration: underline;
}

.txn-details-modal[hidden] {
  display: none;
}

.txn-details-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.txn-details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 13, 23, 0.52);
}

.txn-details-dialog {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  background: #ffffff;
  color: #142235;
  border-radius: 12px;
  border: 1px solid rgba(167, 204, 242, 0.28);
  box-shadow: 0 20px 48px rgba(2, 9, 18, 0.28);
  padding: 16px;
  overflow: auto;
}

.txn-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.txn-details-head h3,
.txn-details-section h4 {
  color: #142235;
}

.txn-details-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.txn-details-meta-item {
  border: 1px solid #d9e3f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fbff;
}

.txn-details-meta-item span {
  display: block;
  color: #5a6e88;
  font-size: 11px;
  margin-bottom: 4px;
}

.txn-details-meta-item strong {
  display: block;
  color: #142235;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.txn-details-section + .txn-details-section {
  margin-top: 14px;
}

.txn-details-pre {
  margin-top: 8px;
  border: 1px solid #d9e3f0;
  border-radius: 10px;
  background: #f8fbff;
  color: #142235;
  padding: 12px;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Timeline and Main Layout for Transaction Details Modal */
.txn-details-main-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .txn-details-main-layout {
    grid-template-columns: 1fr;
  }
}

.txn-details-left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.txn-details-right-col {
  min-width: 0;
}

.txn-timeline-container {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 24px;
  margin-top: 15px;
}

.txn-timeline-container::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e2e8f0;
}

.txn-timeline-step {
  position: relative;
  padding-bottom: 20px;
}

.txn-timeline-step:last-child {
  padding-bottom: 0;
}

.txn-timeline-dot {
  position: absolute;
  left: -24px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #cbd5e1;
  z-index: 1;
  box-sizing: border-box;
}

.txn-timeline-step.success .txn-timeline-dot {
  border-color: #10b981;
  background: #10b981;
}

.txn-timeline-step.pending .txn-timeline-dot {
  border-color: #f59e0b;
  background: #ffffff;
}

.txn-timeline-step.failed .txn-timeline-dot {
  border-color: #ef4444;
  background: #ef4444;
}

.txn-timeline-step.skipped .txn-timeline-dot {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.txn-timeline-content {
  display: flex;
  flex-direction: column;
}

.txn-timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.txn-timeline-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.txn-timeline-step.clickable {
  cursor: pointer;
}

.txn-timeline-step.clickable .txn-timeline-content {
  padding: 6px 8px;
  border-radius: 6px;
  transition: background-color 0.2s, box-shadow 0.2s;
  margin-left: -8px;
  margin-right: -8px;
}

.txn-timeline-step.clickable:hover .txn-timeline-content {
  background-color: #f1f5f9;
}

.txn-timeline-step.clickable.active .txn-timeline-content {
  background-color: #e2e8f0;
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

.txn-details-pre.highlight-flash {
  animation: txn-pre-flash-anim 0.8s ease-out;
}

@keyframes txn-pre-flash-anim {
  0% {
    background-color: #e0f2fe;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
  }
  100% {
    background-color: #f8fbff;
    border-color: #d9e3f0;
    box-shadow: none;
  }
}

/* Page specific overrides for Product Edit Page */
body[data-page="admin-service-edit"] .product-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 8px 0;
}
body[data-page="admin-service-edit"] .product-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body[data-page="admin-service-edit"] .product-summary-item span {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}
body[data-page="admin-service-edit"] .product-summary-item strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}
body[data-page="admin-service-edit"] .field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
body[data-page="admin-service-edit"] .input,
body[data-page="admin-service-edit"] .select,
body[data-page="admin-service-edit"] textarea {
  font-size: 14px;
  min-height: 44px;
}
body[data-page="admin-service-edit"] .field-note {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  display: block;
}
body[data-page="admin-service-edit"] .service-logo-hint {
  font-size: 11px;
  color: var(--text-3);
}
body[data-page="admin-service-edit"] .card-h h2 {
  font-size: 16px;
}
body[data-page="admin-service-edit"] table th {
  font-size: 12px;
  font-weight: 600;
}
body[data-page="admin-service-edit"] table td {
  font-size: 13px;
}
body[data-page="admin-service-edit"] .btn {
  font-size: 13px;
  min-height: 36px;
}

