﻿/**
 * Stitch — Glass Navy (midnight glass) GLOBAL theme for Thushara (dark + light).
 * Source: stitch_modern_ui_ux_design_system zip — Operations Overview.
 * Scoped to html.theme-{dark|light}.ipay-twin (all screens via main-css.php).
 */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

html.theme-dark.ipay-twin body {
  --st-bg: #070d1a;
  --st-bg-deep: #040711;
  --st-surface: rgba(16, 28, 56, 0.55);
  --st-surface-solid: #0b1326;
  --st-surface-2: rgba(22, 37, 74, 0.65);
  --st-border: rgba(255, 255, 255, 0.1);
  --st-border-strong: rgba(255, 255, 255, 0.16);
  --st-text: #f1f5f9;
  --st-text-muted: #94a3b8;
  --st-text-dim: #64748b;
  --st-cyan: #00f2fe;
  --st-blue: #4facfe;
  --st-blue-600: #2563eb;
  --st-emerald: #10b981;
  --st-amber: #f59e0b;
  --st-rose: #f43f5e;
  --st-radius: 16px;
  --st-glass-blur: blur(24px) saturate(190%);
  /* Surface tokens only — never remap --fx-navy (sidebar gradient uses it) */
  --fx-white: rgba(16, 28, 56, 0.72);
  --fx-snow: rgba(255, 255, 255, 0.03);
  --fx-border: rgba(255, 255, 255, 0.1);
  --fx-muted: #94a3b8;
  --fx-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
  letter-spacing: -0.011em;
  color: var(--st-text) !important;
  background: var(--st-bg) !important;
}

/* Ambient canvas */
html.theme-dark.ipay-twin body #layout-wrapper,
html.theme-dark.ipay-twin body #tt-main,
html.theme-dark.ipay-twin body .page-content,
html.theme-dark.ipay-twin body .main-content {
  background: transparent !important;
}

html.theme-dark.ipay-twin body #tt-main {
  position: relative;
  background:
    radial-gradient(650px 650px at -10% -20%, rgba(8, 145, 178, 0.18), transparent 55%),
    radial-gradient(500px 500px at 40% 20%, rgba(124, 58, 237, 0.12), transparent 50%),
    radial-gradient(700px 700px at 100% 100%, rgba(59, 130, 246, 0.14), transparent 55%),
    var(--st-bg) !important;
}

html.theme-dark.ipay-twin body #app.page {
  padding: 1.25rem 1.5rem 2rem;
  max-width: 1400px;
  position: relative;
  z-index: 1;
}

/* Topbar â€” glass dark */
html.theme-dark.ipay-twin body #tt-topbar {
  background: rgba(4, 7, 17, 0.55) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  border-bottom: 1px solid var(--st-border) !important;
  box-shadow: none !important;
}
html.theme-dark.ipay-twin body #tt-topbar .top-inner,
html.theme-dark.ipay-twin body #tt-topbar .page-title,
html.theme-dark.ipay-twin body #tt-topbar .twin-toolbar-title,
html.theme-dark.ipay-twin body #tt-topbar h2,
html.theme-dark.ipay-twin body #tt-topbar .breadcrumb,
html.theme-dark.ipay-twin body #tt-topbar .breadcrumb a {
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body #tt-topbar .breadcrumb,
html.theme-dark.ipay-twin body #tt-topbar .hint,
html.theme-dark.ipay-twin body #tt-topbar .page-sub {
  color: var(--st-text-muted) !important;
}
html.theme-dark.ipay-twin body #tt-topbar .top-search input,
html.theme-dark.ipay-twin body #tt-topbar input[type="search"] {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--st-border) !important;
  color: var(--st-text) !important;
  border-radius: 12px !important;
}
html.theme-dark.ipay-twin body #tt-topbar .top-search input::placeholder {
  color: var(--st-text-dim) !important;
}
html.theme-dark.ipay-twin body #tt-topbar .user {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--st-border) !important;
  border-radius: 14px !important;
}
html.theme-dark.ipay-twin body #tt-topbar .user .name,
html.theme-dark.ipay-twin body #tt-topbar .user strong {
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body #tt-topbar .user .role,
html.theme-dark.ipay-twin body #tt-topbar .user small {
  color: var(--st-text-muted) !important;
}
html.theme-dark.ipay-twin body #tt-topbar .btn-icon,
html.theme-dark.ipay-twin body #tt-topbar .top-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--st-border) !important;
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body #tt-topbar .live-pill,
html.theme-dark.ipay-twin body #tt-topbar [class*="live"] {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

/* Sidebar — midnight glass (match Stitch dark pack) */
html.theme-dark.ipay-twin body #tt-sidebar,
html.theme-dark.ipay-twin body #layout-wrapper > .sidebar {
  background: linear-gradient(180deg, rgba(4, 7, 17, 0.96) 0%, rgba(11, 19, 38, 0.98) 45%, rgba(7, 13, 26, 0.98) 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.45) !important;
  color: #f1f5f9 !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
html.theme-dark.ipay-twin body #tt-sidebar .brand,
html.theme-dark.ipay-twin body #tt-sidebar .sidebar-foot {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}
html.theme-dark.ipay-twin body #tt-sidebar .brand h1,
html.theme-dark.ipay-twin body #tt-sidebar .brand a {
  color: #fff !important;
}
html.theme-dark.ipay-twin body #tt-sidebar .brand-sub {
  color: rgba(148, 163, 184, 0.75) !important;
}
html.theme-dark.ipay-twin body #tt-sidebar .nav-cap {
  color: rgba(148, 163, 184, 0.55) !important;
}
html.theme-dark.ipay-twin body #tt-sidebar .nav,
html.theme-dark.ipay-twin body #tt-sidebar nav.nav {
  background: transparent !important;
  color: #e2e8f0 !important;
}
html.theme-dark.ipay-twin body #tt-sidebar .nav-item,
html.theme-dark.ipay-twin body #tt-sidebar details.nav-group > summary {
  color: rgba(226, 232, 240, 0.88) !important;
}
html.theme-dark.ipay-twin body #tt-sidebar .nav-item:hover,
html.theme-dark.ipay-twin body #tt-sidebar details.nav-group > summary:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
}
html.theme-dark.ipay-twin body #tt-sidebar .nav-item.on,
html.theme-dark.ipay-twin body #tt-sidebar .nav-link.active,
html.theme-dark.ipay-twin body #tt-sidebar a.active,
html.theme-dark.ipay-twin body #tt-sidebar details.nav-group[open] > summary,
html.theme-dark.ipay-twin body .side-nav .nav-link.active {
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.18), rgba(79, 172, 254, 0.22)) !important;
  border: 1px solid rgba(0, 242, 254, 0.35) !important;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(0, 242, 254, 0.15);
}
html.theme-dark.ipay-twin body #tt-sidebar .sidebar-foot,
html.theme-dark.ipay-twin body #tt-sidebar .sidebar-foot a {
  color: rgba(148, 163, 184, 0.7) !important;
}

/* Today header — same pattern light + dark (Stitch) */
html.ipay-twin body .st-today-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.35rem 1.35rem;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
}
html.theme-light.ipay-twin body .st-today-bar {
  border: 1px solid var(--st-border, rgba(11, 28, 48, 0.12));
  background: var(--st-surface, rgba(248, 249, 255, 0.88));
  backdrop-filter: var(--st-glass-blur, blur(20px) saturate(165%));
  -webkit-backdrop-filter: var(--st-glass-blur, blur(20px) saturate(165%));
  box-shadow: 0 8px 32px rgba(11, 28, 48, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
html.theme-light.ipay-twin body .st-today-bar .twin-toolbar-title {
  color: var(--st-text, #0b1c30);
}
html.theme-dark.ipay-twin body .st-today-bar {
  background: var(--st-surface);
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  border: 1px solid var(--st-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html.ipay-twin body .st-today-lead {
  min-width: 0;
  flex: 1 1 auto;
}
html.ipay-twin body .st-today-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex: 0 0 auto;
}
html.ipay-twin body .st-today-actions .btn {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 1rem !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
html.ipay-twin body .st-today-bar .twin-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0;
}
html.ipay-twin body .st-today-bar .st-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
html.ipay-twin body .st-today-bar .twin-toolbar-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
}
html.theme-dark.ipay-twin body .st-today-bar .twin-eyebrow { color: var(--st-text-dim); }
html.theme-dark.ipay-twin body .st-today-bar .twin-toolbar-title {
  color: var(--st-text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
html.ipay-twin body .st-session {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
}
html.ipay-twin body .st-session::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}
html.theme-dark.ipay-twin body .st-session {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
html.theme-dark.ipay-twin body .st-session::before {
  background: var(--st-emerald);
  box-shadow: 0 0 8px var(--st-emerald);
}
/* Light secondary / primary actions */
html.ipay-twin body .st-today-actions .btn-s {
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
html.ipay-twin body .st-today-actions .btn-s:hover {
  border-color: #93c5fd !important;
  background: #f0f9ff !important;
  color: #1d4ed8 !important;
}
html.ipay-twin body .st-today-actions .btn-p {
  background: linear-gradient(135deg, #2b6ff3, #1e56c9) !important;
  border: 1px solid #1e56c9 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(43, 111, 243, 0.28) !important;
}
html.theme-dark.ipay-twin body .st-today-actions .btn-s {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
}
html.theme-dark.ipay-twin body .st-today-actions .btn-s:hover {
  background: rgba(0, 242, 254, 0.12) !important;
  border-color: rgba(0, 242, 254, 0.4) !important;
  color: #fff !important;
}
html.theme-dark.ipay-twin body .st-today-actions .btn-p {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.35), rgba(79, 172, 254, 0.45)) !important;
  border: 1px solid rgba(0, 242, 254, 0.45) !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.25) !important;
}

/* KPI grid â€” glass cards */
html.theme-dark.ipay-twin body .kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.85rem !important;
  margin-bottom: 1rem !important;
}
@media (max-width: 1200px) {
  html.theme-dark.ipay-twin body .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 560px) {
  html.theme-dark.ipay-twin body .kpi-grid {
    grid-template-columns: 1fr !important;
  }
}
html.theme-dark.ipay-twin body .kpi {
  background: var(--st-surface) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  border: 1px solid var(--st-border) !important;
  border-radius: var(--st-radius) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  padding: 1rem 1.05rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
html.theme-dark.ipay-twin body .kpi:hover {
  border-color: rgba(0, 242, 254, 0.35) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.3), 0 0 24px rgba(0, 242, 254, 0.08) !important;
  transform: translateY(-1px);
}
html.theme-dark.ipay-twin body .kpi::before {
  display: none !important;
}
html.theme-dark.ipay-twin body .kpi.warn {
  border-color: rgba(244, 63, 94, 0.45) !important;
  background: rgba(244, 63, 94, 0.08) !important;
}
html.theme-dark.ipay-twin body .kpi.warn:hover {
  border-color: rgba(244, 63, 94, 0.65) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.3), 0 0 20px rgba(244, 63, 94, 0.15) !important;
}
html.theme-dark.ipay-twin body .kpi-head span {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  color: var(--st-text-dim) !important;
}
html.theme-dark.ipay-twin body .kpi.warn .kpi-head span {
  color: #fb7185 !important;
}
html.theme-dark.ipay-twin body .kpi-val {
  font-family: "JetBrains Mono", "Plus Jakarta Sans", monospace !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  color: var(--st-text) !important;
  letter-spacing: -0.03em !important;
}
html.theme-dark.ipay-twin body .kpi.warn .kpi-val {
  color: #fb7185 !important;
  text-shadow: 0 0 18px rgba(244, 63, 94, 0.35);
}
html.theme-dark.ipay-twin body .kpi-delta {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}
html.theme-dark.ipay-twin body .kpi-delta.up {
  color: #34d399 !important;
}
html.theme-dark.ipay-twin body .kpi-delta.down {
  color: #fb7185 !important;
}
html.theme-dark.ipay-twin body .kpi-note {
  font-size: 0.7rem !important;
  color: var(--st-text-dim) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0.55rem;
  padding-top: 0.45rem;
}
html.theme-dark.ipay-twin body .kpi-note a {
  color: var(--st-cyan);
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}
html.theme-dark.ipay-twin body .kpi-note a:hover {
  text-decoration: underline;
}
html.theme-dark.ipay-twin body .st-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 6px;
  background: rgba(0, 242, 254, 0.12);
  color: var(--st-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  vertical-align: middle;
}
html.theme-dark.ipay-twin body .st-ring {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  position: relative;
}
html.theme-dark.ipay-twin body .st-ring span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--st-text);
}

/* Cards / layout — Reorder + Next actions share one row, tops aligned */
html.ipay-twin body .layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  gap: 0.85rem !important;
  align-items: stretch !important;
}
@media (max-width: 1040px) {
  html.ipay-twin body .layout {
    grid-template-columns: 1fr !important;
  }
}
html.ipay-twin body .layout > section.card,
html.ipay-twin body .layout > aside.card {
  margin: 0 !important;
  min-width: 0;
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
}
html.ipay-twin body .layout > section.card .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

/* Light — Glass Navy dashboard tokens (shared with Today / Next actions parity) */
html.theme-light.ipay-twin body {
  --st-glass-blur: blur(20px) saturate(165%);
  --st-radius: 16px;
  --st-border: rgba(11, 28, 48, 0.12);
  --st-border-strong: rgba(11, 28, 48, 0.18);
  --st-text: #0b1c30;
  --st-text-muted: #486581;
  --st-text-dim: #64748b;
  --st-surface: rgba(248, 249, 255, 0.88);
  --st-surface-veil: rgba(229, 238, 255, 0.62);
  --st-accent: #0051d5;
  --st-accent-bright: #316bf3;
}

/* Reorder alerts card — light Glass Navy (mirror dark nested glass card) */
html.theme-light.ipay-twin body .layout > section.card {
  background: linear-gradient(
    165deg,
    rgba(248, 249, 255, 0.94) 0%,
    rgba(220, 233, 255, 0.78) 100%
  ) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  border: 1px solid var(--st-border) !important;
  border-radius: var(--st-radius) !important;
  box-shadow:
    0 8px 32px rgba(11, 28, 48, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  color: var(--st-text) !important;
  overflow: hidden;
}
html.theme-light.ipay-twin body .layout > section.card .card-h {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 0.5rem 1rem !important;
  padding: 1rem 1.15rem 0.85rem !important;
  border-bottom: 1px solid var(--st-border) !important;
  background: rgba(255, 255, 255, 0.42) !important;
}
html.theme-light.ipay-twin body .layout > section.card .card-h > div {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.2rem !important;
  min-width: 0;
  flex: 1 1 auto;
}
html.theme-light.ipay-twin body .layout > section.card .card-h h3 {
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  color: var(--st-text) !important;
}
html.theme-light.ipay-twin body .layout > section.card .card-h .hint {
  margin: 0 !important;
  color: var(--st-text-muted) !important;
  font-size: 0.78rem !important;
  line-height: 1.4 !important;
}
html.theme-light.ipay-twin body .layout > section.card .card-h .btn-t {
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
  padding: 0 0.75rem !important;
  border-radius: 10px !important;
  border: 1px solid rgba(49, 107, 243, 0.35) !important;
  background: rgba(49, 107, 243, 0.08) !important;
  color: var(--st-accent) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
html.theme-light.ipay-twin body .layout > section.card .card-h .btn-t:hover {
  background: rgba(49, 107, 243, 0.14) !important;
  border-color: rgba(49, 107, 243, 0.55) !important;
  color: #003ea8 !important;
  text-decoration: none !important;
}
html.theme-light.ipay-twin body .layout > section.card .table-wrap {
  padding: 0 0.5rem 0.75rem;
}
html.theme-light.ipay-twin body .layout > section.card table.t thead th {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--st-text-dim) !important;
  background: rgba(11, 28, 48, 0.04) !important;
  border-bottom: 1px solid var(--st-border) !important;
}
html.theme-light.ipay-twin body .layout > section.card table.t tbody td {
  font-size: 0.8125rem;
  color: var(--st-text) !important;
  border-bottom: 1px solid rgba(11, 28, 48, 0.06) !important;
  padding: 0.7rem 0.75rem !important;
  background: transparent !important;
}
html.theme-light.ipay-twin body .layout > section.card table.t tbody tr:hover td {
  background: rgba(49, 107, 243, 0.06) !important;
}
html.theme-light.ipay-twin body .layout > section.card .tag-danger {
  background: rgba(186, 26, 26, 0.1) !important;
  color: #c92a2a !important;
  border: 1px solid rgba(186, 26, 26, 0.28);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
}
html.theme-light.ipay-twin body .layout > section.card .btn-outline-po {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 0.65rem;
  border: 1px solid rgba(49, 107, 243, 0.45);
  border-radius: 8px;
  color: var(--st-accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(49, 107, 243, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
html.theme-light.ipay-twin body .layout > section.card .btn-outline-po:hover {
  background: rgba(49, 107, 243, 0.18);
  border-color: rgba(49, 107, 243, 0.65);
  color: #003ea8;
  box-shadow: 0 4px 14px rgba(49, 107, 243, 0.18);
}
html.theme-light.ipay-twin body .layout > section.card > .reorder-table-pager {
  border-top: 1px solid var(--st-border) !important;
  background: var(--st-surface-veil) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  color: var(--st-text-muted);
}
html.theme-light.ipay-twin body .layout > section.card .reorder-pager-status {
  color: var(--st-text);
}
html.theme-light.ipay-twin body .layout > section.card .reorder-pager-queue {
  color: var(--st-accent);
}
html.theme-light.ipay-twin body .layout > section.card .reorder-pager-indicator {
  color: var(--st-text);
}
html.theme-light.ipay-twin body .layout > section.card .reorder-pager-btn {
  border-color: var(--st-border-strong);
  background: rgba(255, 255, 255, 0.55);
  color: var(--st-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
html.theme-light.ipay-twin body .layout > section.card .reorder-pager-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(49, 107, 243, 0.45);
  color: var(--st-accent);
}

/* Reorder alerts footer — nested Stitch task (not Next-actions CTA row) */
html.ipay-twin body .layout > section.card > .task-more {
  margin: auto 0.85rem 0.85rem !important;
  padding: 0.9rem 0.95rem !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
  box-shadow: none !important;
}
html.ipay-twin body .layout > section.card > .task-more strong {
  font-size: 0.85rem !important;
  color: #0f172a !important;
}
html.ipay-twin body .layout > section.card > .task-more p {
  margin: 0.2rem 0 0 !important;
  font-size: 0.75rem !important;
  color: #64748b !important;
}
html.ipay-twin body .layout > section.card > .task-more a {
  color: #2563eb !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
html.ipay-twin body .layout > section.card > .task-more a:hover {
  text-decoration: underline !important;
}
html.theme-dark.ipay-twin body .layout > section.card > .task-more {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
html.theme-dark.ipay-twin body .layout > section.card > .task-more strong {
  color: #f1f5f9 !important;
}
html.theme-dark.ipay-twin body .layout > section.card > .task-more p {
  color: #94a3b8 !important;
}
html.theme-dark.ipay-twin body .layout > section.card > .task-more a {
  color: #00f2fe !important;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}
html.theme-dark.ipay-twin body .layout > section.card > .task-more a:hover {
  color: #fff !important;
}
/* Reorder alerts — table pagination (8 rows / page) */
html.ipay-twin body .layout > section.card > .reorder-table-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 !important;
  margin-top: auto !important;
  flex-shrink: 0;
  padding: 0.75rem 1rem !important;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.75rem;
  color: #64748b;
}
html.ipay-twin body .reorder-pager-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  min-width: 0;
}
html.ipay-twin body .reorder-pager-status {
  color: #475569;
  font-weight: 600;
}
html.ipay-twin body .reorder-pager-queue {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
html.ipay-twin body .reorder-pager-queue:hover {
  text-decoration: underline;
}
html.ipay-twin body .reorder-pager-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
html.ipay-twin body .reorder-pager-indicator {
  min-width: 3.25rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}
html.ipay-twin body .reorder-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
html.ipay-twin body .reorder-pager-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
html.ipay-twin body .reorder-pager-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
html.ipay-twin body #reorder-alerts-body tr.reorder-row.is-hidden {
  display: none;
}
html.theme-dark.ipay-twin body .layout > section.card > .reorder-table-pager {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
}
html.theme-dark.ipay-twin body .reorder-pager-status {
  color: #cbd5e1;
}
html.theme-dark.ipay-twin body .reorder-pager-queue {
  color: #00f2fe;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}
html.theme-dark.ipay-twin body .reorder-pager-queue:hover {
  color: #fff;
}
html.theme-dark.ipay-twin body .reorder-pager-indicator {
  color: #e2e8f0;
}
html.theme-dark.ipay-twin body .reorder-pager-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}
html.theme-dark.ipay-twin body .reorder-pager-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
html.theme-dark.ipay-twin body .layout > section.card > .reorder-table-pager {
  border-top: 1px solid var(--st-border) !important;
  background: var(--st-surface-2) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  color: var(--st-text-muted);
}
html.theme-dark.ipay-twin body .layout > section.card .reorder-pager-status {
  color: var(--st-text);
}
html.theme-dark.ipay-twin body .layout > section.card .reorder-pager-queue {
  color: var(--st-cyan);
}
html.theme-dark.ipay-twin body .layout > section.card .reorder-pager-indicator {
  color: var(--st-text);
}
html.theme-dark.ipay-twin body .layout > section.card .reorder-pager-btn {
  border-color: var(--st-border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--st-text);
}
html.theme-dark.ipay-twin body .layout > section.card .reorder-pager-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 242, 254, 0.35);
  color: #fff;
}
html.theme-dark.ipay-twin body .layout {
  gap: 0.85rem !important;
}
html.theme-dark.ipay-twin body .page-content .card,
html.theme-dark.ipay-twin body #app .card {
  background: var(--st-surface) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  border: 1px solid var(--st-border) !important;
  border-radius: var(--st-radius) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  overflow: hidden;
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body .page-content .card-h,
html.theme-dark.ipay-twin body #app .card-h {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 0.5rem 1rem !important;
  padding: 1rem 1.15rem 0.85rem !important;
  border-bottom: 1px solid var(--st-border) !important;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.02) !important;
}
html.theme-dark.ipay-twin body .page-content .card-h > div {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.2rem !important;
  min-width: 0;
  flex: 1 1 auto;
}
html.theme-dark.ipay-twin body .page-content .card-h h3,
html.theme-dark.ipay-twin body .page-content .st-card-title,
html.theme-dark.ipay-twin body #app .card-h h3 {
  display: block !important;
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  color: var(--st-text) !important;
  text-align: left !important;
}
html.theme-dark.ipay-twin body .page-content .card-h .hint {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  color: var(--st-text-muted) !important;
  font-size: 0.78rem !important;
  max-width: 42rem;
}
html.theme-dark.ipay-twin body .table-wrap {
  padding: 0 0.5rem 0.75rem;
}
html.theme-dark.ipay-twin body .page-content table.t thead th,
html.theme-dark.ipay-twin body .page-content table thead th {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--st-text-dim) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom: 1px solid var(--st-border) !important;
}
html.theme-dark.ipay-twin body .page-content table.t tbody td,
html.theme-dark.ipay-twin body .page-content table tbody td {
  font-size: 0.8125rem;
  color: var(--st-text) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 0.7rem 0.75rem !important;
  background: transparent !important;
}
html.theme-dark.ipay-twin body .page-content table.t tbody tr:hover td {
  background: rgba(0, 242, 254, 0.04) !important;
}
html.theme-dark.ipay-twin body .page-content table.t tbody td a {
  color: var(--st-cyan);
}
html.theme-dark.ipay-twin body .tag-danger {
  background: rgba(244, 63, 94, 0.12) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
}
html.theme-dark.ipay-twin body .btn-outline-po {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 0.65rem;
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 8px;
  color: var(--st-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(0, 242, 254, 0.08);
}
html.theme-dark.ipay-twin body .btn-outline-po:hover {
  background: rgba(0, 242, 254, 0.18);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.25);
}

/* Next actions — same Stitch pattern light + dark (stacked cards, left-aligned CTAs) */
html.ipay-twin body aside.card:has(.task),
html.ipay-twin body .layout > aside.card {
  overflow: hidden;
}
html.ipay-twin body .layout > aside.card .card-h {
  padding: 1rem 1.1rem 0.85rem !important;
}
html.ipay-twin body .task {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.65rem !important;
  margin: 0 0.85rem 0.7rem !important;
  padding: 0.9rem 0.95rem !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}
html.ipay-twin body .layout > aside.card {
  background: linear-gradient(
    165deg,
    rgba(248, 249, 255, 0.94) 0%,
    rgba(220, 233, 255, 0.78) 100%
  ) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  border: 1px solid var(--st-border) !important;
  border-radius: var(--st-radius) !important;
  box-shadow: 0 8px 32px rgba(11, 28, 48, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
html.ipay-twin body .layout > aside.card .card-h {
  border-bottom: 1px solid var(--st-border) !important;
  background: rgba(255, 255, 255, 0.42) !important;
}
html.ipay-twin body .task {
  border: 1px solid var(--st-border) !important;
  background: rgba(255, 255, 255, 0.38) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}
html.ipay-twin body .task strong {
  color: var(--st-text) !important;
}
html.ipay-twin body .task p {
  color: var(--st-text-muted) !important;
}
html.ipay-twin body .task:last-of-type {
  margin-bottom: 1rem !important;
}
html.ipay-twin body .task > div {
  min-width: 0;
}
html.ipay-twin body .task strong {
  font-size: 0.85rem !important;
  color: #0f172a !important;
  display: block;
}
html.ipay-twin body .task strong a {
  color: inherit;
  text-decoration: none;
}
html.ipay-twin body .task p {
  font-size: 0.75rem !important;
  color: #64748b !important;
  margin: 0.2rem 0 0 !important;
}
html.ipay-twin body .task > .btn {
  align-self: flex-start !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 36px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 0.65rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  border-radius: 10px !important;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.ipay-twin body .task > .btn-p {
  background: linear-gradient(135deg, #2b6ff3, #1e56c9) !important;
  border: 1px solid #1e56c9 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(43, 111, 243, 0.25) !important;
}
html.ipay-twin body .task > .btn-s {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: none !important;
}
html.ipay-twin body .task > .btn-s:hover {
  border-color: #93c5fd !important;
  background: #f0f9ff !important;
  color: #1d4ed8 !important;
}
html.theme-dark.ipay-twin body .task {
  border: 1px solid var(--st-border) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}
html.theme-dark.ipay-twin body .task strong {
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body .task p {
  color: var(--st-text-muted) !important;
}
html.theme-dark.ipay-twin body .task > .btn-p {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.3), rgba(79, 172, 254, 0.4)) !important;
  border: 1px solid rgba(0, 242, 254, 0.4) !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.2) !important;
}
html.theme-dark.ipay-twin body .task > .btn-p:hover {
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
}
html.theme-dark.ipay-twin body .task > .btn-s {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f1f5f9 !important;
}
html.theme-dark.ipay-twin body .task > .btn-s:hover {
  background: rgba(0, 242, 254, 0.12) !important;
  border-color: rgba(0, 242, 254, 0.35) !important;
  color: #fff !important;
}

html.theme-dark.ipay-twin body .twin-chart.chart-wrapper {
  border-radius: 12px !important;
  background: rgba(4, 7, 17, 0.45) !important;
  overflow: hidden !important;
  margin-top: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}
html.theme-dark.ipay-twin body .twin-chart .bar {
  background: linear-gradient(180deg, var(--st-cyan), var(--st-blue-600)) !important;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}
html.theme-dark.ipay-twin body .twin-chart .grid-line {
  background: rgba(255, 255, 255, 0.06) !important;
}
html.theme-dark.ipay-twin body .twin-chart .bar-label,
html.theme-dark.ipay-twin body .twin-chart .grid-label {
  left: 0.35rem !important;
  font-size: 0.6rem !important;
  color: var(--st-text-dim) !important;
}
html.theme-dark.ipay-twin body .card > .p-3 {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: var(--st-text);
}

html.theme-dark.ipay-twin body .kpi-val.st-accent {
  color: var(--st-cyan) !important;
  text-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
}

/* Footer / misc on dashboard canvas */
html.theme-dark.ipay-twin body .footer,
html.theme-dark.ipay-twin body footer {
  color: var(--st-text-dim) !important;
  border-top-color: var(--st-border) !important;
  background: transparent !important;
}

/* Toolbar (MASTER · CATALOGUE) — glass dark */
html.theme-dark.ipay-twin body .page-content .toolbar,
html.theme-dark.ipay-twin body #app .toolbar {
  background: var(--st-surface) !important;
  backdrop-filter: var(--st-glass-blur);
  -webkit-backdrop-filter: var(--st-glass-blur);
  border: 1px solid var(--st-border) !important;
  border-radius: var(--st-radius) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body .page-content .toolbar h1,
html.theme-dark.ipay-twin body .page-content .toolbar h2,
html.theme-dark.ipay-twin body .page-content .toolbar .twin-toolbar-title,
html.theme-dark.ipay-twin body #app .toolbar h2,
html.theme-dark.ipay-twin body #app .toolbar .page-title {
  color: #f1f5f9 !important;
}
html.theme-dark.ipay-twin body .page-content .toolbar .twin-eyebrow,
html.theme-dark.ipay-twin body .page-content .toolbar .hint,
html.theme-dark.ipay-twin body .page-content .toolbar .desc,
html.theme-dark.ipay-twin body #app .toolbar .twin-eyebrow {
  color: var(--st-text-dim) !important;
}

/* Secondary buttons — Live stock / Outstanding / Open ARN / Reconcile */
html.theme-dark.ipay-twin body .page-content .btn-s,
html.theme-dark.ipay-twin body .page-content a.btn-s,
html.theme-dark.ipay-twin body .page-content .st-today-bar .btn-s,
html.theme-dark.ipay-twin body .page-content .task .btn-s,
html.theme-dark.ipay-twin body #app .btn.btn-s {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
}
html.theme-dark.ipay-twin body .page-content .btn-s:hover,
html.theme-dark.ipay-twin body .page-content a.btn-s:hover {
  background: rgba(0, 242, 254, 0.12) !important;
  border-color: rgba(0, 242, 254, 0.4) !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.2) !important;
}

/* Context bar under topbar */
html.theme-dark.ipay-twin body .context-bar {
  background: rgba(4, 7, 17, 0.45) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--st-text-muted) !important;
}
html.theme-dark.ipay-twin body .context-bar .breadcrumb a {
  color: var(--st-cyan) !important;
}
html.theme-dark.ipay-twin body .context-bar .breadcrumb strong,
html.theme-dark.ipay-twin body .context-bar .classify {
  color: var(--st-text) !important;
}

/* Topbar notification panel (Stitch dark) */
html.theme-dark.ipay-twin body details.notif > summary {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body details.notif[open] > summary {
  border-color: rgba(0, 242, 254, 0.45) !important;
  color: var(--st-cyan) !important;
}
html.theme-dark.ipay-twin body .notif-panel {
  background: rgba(8, 12, 24, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 242, 254, 0.08) !important;
}
html.theme-dark.ipay-twin body .notif-panel-head h4 {
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body .notif-mark-all {
  color: var(--st-cyan) !important;
}
html.theme-dark.ipay-twin body .notif-row strong {
  color: var(--st-text) !important;
}
html.theme-dark.ipay-twin body .notif-row:hover {
  background: rgba(0, 242, 254, 0.08) !important;
}
html.theme-dark.ipay-twin body .notif-empty {
  color: var(--st-text-muted) !important;
}
