/* SUMU TPP - Open Banking Design System */
:root {
  --sumu-navy: #0f172a;
  --sumu-navy-light: #1e293b;
  --sumu-slate: #334155;
  --sumu-teal: #0d9488;
  --sumu-teal-light: #14b8a6;
  --sumu-cyan: #06b6d4;
  --sumu-mint: #99f6e4;
  --sumu-white: #f8fafc;
  --sumu-gray: #94a3b8;
  --sumu-danger: #ef4444;
  --sumu-warning: #f59e0b;
  --sumu-success: #10b981;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--sumu-navy);
  color: var(--sumu-white);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--sumu-teal-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--sumu-navy-light);
  border-right: 1px solid var(--sumu-slate);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--sumu-slate);
  margin-bottom: 1rem;
}

.sidebar-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sumu-mint);
}

.sidebar-brand span {
  font-size: 0.75rem;
  color: var(--sumu-gray);
  font-weight: 400;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--sumu-gray);
  transition: color 0.2s, background 0.2s;
}

.sidebar-nav a:hover {
  color: var(--sumu-white);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav a.active {
  color: var(--sumu-teal-light);
  background: rgba(13, 148, 136, 0.15);
  border-left: 3px solid var(--sumu-teal);
  margin-left: 0;
  padding-left: calc(1.5rem - 3px);
}

.sidebar-nav .sidebar-nav-sub {
  list-style: none;
  padding: 0 0 0 1rem;
  margin: 0.25rem 0 0.5rem 0;
  border-left: 1px solid var(--sumu-slate);
  margin-left: 1rem;
}

.sidebar-nav .sidebar-nav-sub li {
  margin: 0;
}

.sidebar-nav .sidebar-nav-sub a {
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}

.sidebar-nav .sidebar-nav-sub a.active {
  padding-left: calc(0.75rem - 3px);
}

.main {
  flex: 1;
  padding: 2rem;
  overflow-auto;
}

/* Cards & panels */
.card {
  background: var(--sumu-navy-light);
  border: 1px solid var(--sumu-slate);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}


.card h2,
.card h3 {
  margin-bottom: 1rem;
  color: var(--sumu-white);
  font-size: 1.1rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--sumu-white);
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--sumu-gray);
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary {
  background: var(--sumu-teal);
  color: white;
}

.btn-primary:hover {
  background: var(--sumu-teal-light);
}

.btn-secondary {
  background: var(--sumu-slate);
  color: var(--sumu-white);
}

.btn-secondary:hover {
  background: #475569;
}

.btn-ghost {
  background: transparent;
  color: var(--sumu-teal-light);
  border: 1px solid var(--sumu-teal);
}

.btn-ghost:hover {
  background: rgba(13, 148, 136, 0.2);
}

.btn-danger {
  background: var(--sumu-danger);
  color: white;
}

/* Forms */
input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--sumu-slate);
  border-radius: 8px;
  background: var(--sumu-navy);
  color: var(--sumu-white);
  font-family: inherit;
  font-size: 0.95rem;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  accent-color: var(--sumu-teal);
  cursor: pointer;
}

input[type="checkbox"] {
  border-radius: 4px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--sumu-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--sumu-gray);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--sumu-slate);
  vertical-align: middle;
}

th {
  color: var(--sumu-gray);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.cell-bank {
  display: inline-flex;
  align-items: center;
}

.bank-logo-sm {
  height: 22px;
  width: auto;
  object-fit: contain;
  display: block;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.badge-info {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}

/* Auth / standalone pages (no sidebar) */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem;
  background: linear-gradient(135deg, var(--sumu-navy) 0%, #0c1222 100%);
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--sumu-navy-light);
  border: 1px solid var(--sumu-slate);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.auth-card .logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sumu-mint);
  margin-bottom: 0.25rem;
}

.auth-card .tagline {
  color: var(--sumu-gray);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.auth-card form .btn[type="submit"] {
  margin-top: 0.75rem;
}

/* Legal pages (Terms, Privacy) – readable long-form */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem;
  background: linear-gradient(135deg, var(--sumu-navy) 0%, #0c1222 100%);
  box-sizing: border-box;
}

.legal-card {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: var(--sumu-navy-light);
  border: 1px solid var(--sumu-slate);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.legal-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--sumu-slate);
  padding-bottom: 1rem;
}

.legal-header h1 {
  font-size: 1.75rem;
  color: var(--sumu-white);
  margin-bottom: 0.25rem;
}

.legal-meta {
  font-size: 0.9rem;
  color: var(--sumu-gray);
  margin-bottom: 0.25rem;
}

.legal-updated {
  font-size: 0.8rem;
  color: var(--sumu-slate);
}

.legal-body {
  color: var(--sumu-white);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-body section {
  margin-bottom: 1.5rem;
}

.legal-body h2 {
  font-size: 1.1rem;
  color: var(--sumu-mint);
  margin-bottom: 0.5rem;
}

.legal-body p {
  margin-bottom: 0.75rem;
}

.legal-body ul {
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
}

.legal-body li {
  margin-bottom: 0.35rem;
}

.legal-body a {
  color: var(--sumu-teal-light);
  text-decoration: none;
}

.legal-body a:hover {
  text-decoration: underline;
}

.legal-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sumu-slate);
  font-size: 0.9rem;
  color: var(--sumu-gray);
}

.legal-footer a {
  color: var(--sumu-teal-light);
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}

.auth-card form {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-group {
  width: 100%;
  box-sizing: border-box;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.radio-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
  padding: 0.5rem 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.radio-option input {
  margin-top: 0.2rem;
}

.radio-option span {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--sumu-navy);
  border: 1px solid var(--sumu-slate);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sumu-mint);
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--sumu-gray);
  margin-top: 0.25rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--sumu-slate);
  margin-bottom: 1rem;
}

.tabs a {
  padding: 0.75rem 1.25rem;
  color: var(--sumu-gray);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs a:hover {
  color: var(--sumu-white);
}

.tabs a.active {
  color: var(--sumu-teal-light);
  border-bottom-color: var(--sumu-teal);
}

/* Code / keys */
.code-block {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--sumu-navy);
  border: 1px solid var(--sumu-slate);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  color: var(--sumu-mint);
}

.copy-btn {
  margin-left: auto;
  font-size: 0.8rem;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-info {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid var(--sumu-cyan);
  color: #67e8f9;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--sumu-success);
  color: #6ee7b7;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--sumu-warning);
  color: #fcd34d;
}

/* Payment gateway (merchant-facing) */
.gateway-page {
  min-height: 100vh;
  padding: 2rem;
  background: var(--sumu-white);
  color: #1e293b;
}

.gateway-page .card {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}

.gateway-page .card h2 {
  color: #0f172a;
}

.gateway-page .btn-primary {
  background: var(--sumu-teal);
  color: white;
}

.gateway-page input,
.gateway-page select {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

.gateway-page .sumu-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sumu-teal);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--sumu-gray);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--sumu-gray);
}

.breadcrumb span {
  color: var(--sumu-teal-light);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--sumu-gray);
}

.empty-state p {
  margin-bottom: 1rem;
}

/* Omani Rial currency – use rial-white.svg on dark bg, rial-black.svg on light bg */
.currency-omr {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
}

/* Keep currency column as table-cell so row bottom border connects (override inline-flex on td) */
td.currency-omr {
  display: table-cell;
  vertical-align: middle;
}

td.currency-omr .rial-symbol {
  vertical-align: middle;
}

.rial-symbol {
  display: inline-block;
  width: 1.25em;
  height: 0.65em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.rial-symbol svg,
.rial-symbol img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.rial-symbol svg {
  fill: currentColor;
}

/* Bank list with logos (gateway bank selection) */
.bank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bank-list li {
  margin: 0;
}

.bank-list a,
.bank-list label.bank-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: #334155;
  transition: border-color 0.2s, background 0.2s;
}

.bank-list a:hover,
.bank-list label.bank-option:hover,
.bank-list a:focus,
.bank-list input:checked+label.bank-option {
  border-color: var(--sumu-teal);
  background: rgba(13, 148, 136, 0.08);
}

.bank-list .bank-logo {
  width: 100px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.bank-list .bank-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Show logo only, hide name (name in img alt for a11y) */
.bank-list .bank-name[aria-hidden="true"] {
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  position: absolute;
  width: 1px;
  height: 1px;
}

.bank-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Flow container – consistent width and alignment for gateway flows */
.flow-container {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Responsive layout */
@media (max-width: 768px) {
  .auth-page {
    padding: 1.5rem 1rem;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .legal-page {
    padding: 1.5rem 1rem;
  }

  .legal-card {
    padding: 1.5rem;
  }

  .gateway-page {
    padding: 1rem 0.75rem;
  }

  .gateway-page .card {
    padding: 1.25rem;
  }

  .flow-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .bank-list {
    grid-template-columns: 1fr;
  }

  .bank-list .bank-logo {
    width: 88px;
    height: 36px;
  }

  .main {
    padding: 1rem;
  }

  .sidebar {
    padding: 1rem 0;
  }

  .sidebar-brand {
    padding: 0 1rem 1rem;
  }

  .sidebar-nav a {
    padding: 0.65rem 1rem;
  }

  .page-header h1 {
    font-size: 1.35rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }
}

/* Charts (financial reality & credit) */
.chart-container {
  margin: 1rem 0;
}

.chart-bar-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 180px;
  padding: 0 0.5rem;
}

.chart-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.chart-bar-item .bar {
  width: 100%;
  max-width: 48px;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.3s;
}

.chart-bar-item .label {
  font-size: 0.75rem;
  color: var(--sumu-gray);
  text-align: center;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--sumu-gray);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chart-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.score-gauge {
  width: 200px;
  height: 110px;
  margin: 0 auto 0.5rem;
}

.factor-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.factor-bar .label {
  flex: 0 0 140px;
  font-size: 0.9rem;
}

.factor-bar .bar-wrap {
  flex: 1;
  height: 20px;
  background: var(--sumu-slate);
  border-radius: 4px;
  overflow: hidden;
}

.factor-bar .bar-fill {
  height: 100%;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .auth-page {
    padding: 1rem 0.75rem;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .legal-page {
    padding: 1rem 0.75rem;
  }

  .legal-card {
    padding: 1.25rem;
  }

  .gateway-page {
    padding: 0.75rem 0.5rem;
  }

  .gateway-page .card {
    padding: 1rem;
  }

  .flow-container {
    max-width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .breadcrumb {
    font-size: 0.8rem;
    word-break: break-word;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .tabs a {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Touch-friendly and alignment */
.gateway-page .btn-primary,
.gateway-page .btn-secondary {
  min-height: 48px;
  justify-content: center;
}

@media (min-width: 769px) {
  .gateway-page .card h2 {
    font-size: 1.25rem;
  }
}

.error {
  margin-top: 0.5rem;
  color: var(--sumu-danger);
  font-size: 0.85rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
      list-style: none;

}

/* Links */
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--sumu-white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.headingPlusButton {

  display: flex;
  justify-content: space-between;
}

.PowerdPlusImage {

  display: flex;
  justify-content: space-between;
}

.consent-logo {

  width: 50px;
}

/* Hover effect */
.pagination a:hover {
  background: rgba(13, 148, 136, 0.15);
  border-color: var(--sumu-teal);
  color: var(--sumu-teal-light);
  transform: translateY(-1px);
}

/* Active/disabled state (if you add later) */
.pagination a.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Page indicator text */
.pagination span {
  font-size: 0.9rem;
  color: var(--sumu-gray);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dangetATag {
  color: #dc2626 !important;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dangetATag:hover {
  color: #b91c1c !important;
  text-decoration: underline;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #fff;
  margin: 8% auto;
  padding: 20px;
  width: 40%;
  border-radius: 8px;
  position: relative;
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .pagination {
    gap: 0.5rem;
  }

  .pagination a {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
  }
}

.bankButton {
  background: #ededed;
  color: #2b2b2b;
}

.bankButton:hover {
  background: #9ddbca;
}

.pending_message_functionlity {


  display: flex;
  justify-content: center;
}

.creditScoring-main  {
  background: #f8fafc !important;

}