/* CentralPay Midnight theme, global contrast and surface corrections.
   Loaded last on every admin page to prevent page-specific styles hiding text. */
:root {
  color-scheme: dark;
  --cp-page: #090d18;
  --cp-card: #141a29;
  --cp-card-raised: #1a2435;
  --cp-text: #edf2fa;
  --cp-muted: #aab7ca;
  --cp-border: #303b52;
  --cp-orange: #f58220;
  --cp-cyan: #08b6e8;
  --cp-gold: #e2c33e;
}
html, body.dashboard-body, body.login-body {
  background: #090d18 !important;
  color: #edf2fa !important;
  color-scheme: dark;
}
body.dashboard-body .main-area,
body.dashboard-body .page-content { background: #090d18 !important; color: #edf2fa !important; }

/* Text hierarchy. Explicitly correct legacy light-theme text colours. */
body.dashboard-body .page-content,
body.dashboard-body .page-content label,
body.dashboard-body .page-content legend,
body.dashboard-body .page-content li,
body.dashboard-body .page-content dt,
body.dashboard-body .page-content dd { color: #dce5f2; }
body.dashboard-body .page-content h1,
body.dashboard-body .page-content h2,
body.dashboard-body .page-content h3,
body.dashboard-body .page-content h4,
body.dashboard-body .page-content strong,
body.dashboard-body .page-content b,
body.dashboard-body .page-content .panel-heading h3,
body.dashboard-body .page-content .section-card h3 { color: #f4f7fc !important; }
body.dashboard-body .page-content p,
body.dashboard-body .page-content .muted,
body.dashboard-body .page-content small,
body.dashboard-body .page-content .helper-text,
body.dashboard-body .page-content .description,
body.dashboard-body .page-content .sub,
body.dashboard-body .page-content .metric-label,
body.dashboard-body .page-content .metric-top,
body.dashboard-body .page-content .metric-foot,
body.dashboard-body .page-content .metric-note,
body.dashboard-body .page-content .metric-period { color: #aab7ca !important; }
body.dashboard-body .page-content .eyebrow,
body.dashboard-body .page-content .section-eyebrow { color: #63cafa !important; }

/* Cards, panels, nested sections and data containers. */
body.dashboard-body .panel,
body.dashboard-body .section-card,
body.dashboard-body .metric-card,
body.dashboard-body .summary-tile,
body.dashboard-body .account-card,
body.dashboard-body .notice-card,
body.dashboard-body .txn-stat,
body.dashboard-body .txn-trend-card,
body.dashboard-body .txn-hero,
body.dashboard-body .portfolio-section,
body.dashboard-body .cs-list-panel,
body.dashboard-body .cs-editor-panel,
body.dashboard-body .cs-category-settings,
body.dashboard-body .detail-card,
body.dashboard-body .detail-head,
body.dashboard-body .service-panel,
body.dashboard-body .status-panel,
body.dashboard-body .metric,
body.dashboard-body .analytics-grid > article,
body.dashboard-body .content-card {
  background: #141a29 !important;
  border-color: #303b52 !important;
  color: #e7edf7 !important;
}
body.dashboard-body .panel p,
body.dashboard-body .panel .muted,
body.dashboard-body .section-card p,
body.dashboard-body .detail-card span { color: #aab7ca !important; }

/* The website portfolio hero intentionally uses a pale blue surface.
   Its text and statistic tiles must therefore use dark ink. */
body.dashboard-body .website-hero,
body.dashboard-body .website-hero-main,
body.dashboard-body .portfolio-hero,
body.dashboard-body .portfolio-banner {
  background-color: #b9dcff !important;
  color: #142846 !important;
  border-color: #b9dcff !important;
}
body.dashboard-body .website-hero h1,
body.dashboard-body .website-hero h2,
body.dashboard-body .website-hero p,
body.dashboard-body .website-hero strong,
body.dashboard-body .website-hero .website-hero-kicker,
body.dashboard-body .website-hero-main h1,
body.dashboard-body .website-hero-main p,
body.dashboard-body .portfolio-hero h1,
body.dashboard-body .portfolio-hero p,
body.dashboard-body .portfolio-banner h1,
body.dashboard-body .portfolio-banner p { color: #142846 !important; }
body.dashboard-body .website-hero-stat,
body.dashboard-body .website-hero-stats > div {
  background: #dceeff !important;
  border: 1px solid #f2f8ff !important;
  color: #17365d !important;
}
body.dashboard-body .website-hero-stat span,
body.dashboard-body .website-hero-stat strong,
body.dashboard-body .website-hero-stats span,
body.dashboard-body .website-hero-stats strong { color: #17365d !important; }

/* Tables: remove the bright white body cells and restore readable contrast. */
body.dashboard-body .table-scroll,
body.dashboard-body .table-wrap,
body.dashboard-body .table-container,
body.dashboard-body .table-panel,
body.dashboard-body .table-responsive,
body.dashboard-body .admin-table,
body.dashboard-body .data-table-wrap {
  background: #141a29 !important;
  border-color: #303b52 !important;
}
body.dashboard-body table,
body.dashboard-body table tbody,
body.dashboard-body table tfoot { background: #141a29 !important; color: #e7edf7 !important; }
body.dashboard-body table thead,
body.dashboard-body table thead tr,
body.dashboard-body table thead th,
body.dashboard-body table th {
  background: #1d293d !important;
  color: #b9c9df !important;
  border-color: #35445d !important;
}
body.dashboard-body table tbody tr,
body.dashboard-body table tbody tr:nth-child(even),
body.dashboard-body table tbody tr:nth-child(odd) {
  background: #141a29 !important;
}
body.dashboard-body table tbody td,
body.dashboard-body table td,
body.dashboard-body table tfoot td {
  background: transparent !important;
  color: #dce5f2 !important;
  border-color: #303b52 !important;
}
body.dashboard-body table tbody tr:hover,
body.dashboard-body table tbody tr:hover td { background: #202c40 !important; }
body.dashboard-body table a,
body.dashboard-body .table-scroll a { color: #39baf4 !important; }

/* Platform health rows and labels. */
body.dashboard-body .service-row strong,
body.dashboard-body .service-row .service-name,
body.dashboard-body .service-row .service-label { color: #edf2fa !important; }
body.dashboard-body .service-row small,
body.dashboard-body .service-row p { color: #aab7ca !important; }
body.dashboard-body .service-state { color: #46d5a1 !important; }
body.dashboard-body .service-state.pending { color: #ffbd70 !important; }
body.dashboard-body .status-footer { color: #aab7ca !important; }
body.dashboard-body .status-pill,
body.dashboard-body .live-status { color: #dce5f2 !important; }

/* Inputs, selects, textareas and labels. */
body.dashboard-body input:not([type=checkbox]):not([type=radio]):not([type=range]),
body.dashboard-body select,
body.dashboard-body textarea,
body.dashboard-body .toolbar input,
body.dashboard-body .toolbar select {
  background: #0e1523 !important;
  color: #edf2fa !important;
  border-color: #3a4861 !important;
}
body.dashboard-body input::placeholder,
body.dashboard-body textarea::placeholder { color: #8796ad !important; opacity: 1; }
body.dashboard-body label,
body.dashboard-body .form-grid label,
body.dashboard-body .admin-form label { color: #c8d4e5 !important; }

/* Buttons and links. */
body.dashboard-body .btn-primary,
body.dashboard-body .btn.btn-primary { background: #f58220 !important; border-color: #f58220 !important; color: #101522 !important; }
body.dashboard-body .btn-outline,
body.dashboard-body .btn.btn-outline { background: #202b3d !important; border-color: #3a4861 !important; color: #edf2fa !important; }
body.dashboard-body a,
body.dashboard-body .text-link { color: #39baf4; }
body.dashboard-body .btn-primary,
body.dashboard-body .btn-outline,
body.dashboard-body button { text-shadow: none; }

/* Pills, tags, empty states, notices and small metadata. */
body.dashboard-body .status-tag.success,
body.dashboard-body .status-tag.active,
body.dashboard-body .status-pill.good,
body.dashboard-body .status-badge.success { background: #123b32 !important; color: #74e0b5 !important; }
body.dashboard-body .status-tag.pending,
body.dashboard-body .status-pill.pending,
body.dashboard-body .status-badge.pending { background: #49321d !important; color: #ffd08d !important; }
body.dashboard-body .status-tag.failed,
body.dashboard-body .status-tag.cancelled,
body.dashboard-body .status-tag.suspended,
body.dashboard-body .status-pill.error,
body.dashboard-body .status-badge.failed { background: #48262e !important; color: #ffadb2 !important; }
body.dashboard-body .empty-state,
body.dashboard-body .txn-empty,
body.dashboard-body .chart-empty,
body.dashboard-body .cs-empty { color: #aab7ca !important; }
body.dashboard-body .empty-state strong { color: #edf2fa !important; }
body.dashboard-body .notice-card,
body.dashboard-body .gi-security-note,
body.dashboard-body .ps-alert,
body.dashboard-body .ct-notice { background: #18283a !important; border-color: #344b65 !important; color: #dce7f5 !important; }
body.dashboard-body .notice-card strong,
body.dashboard-body .gi-security-note strong,
body.dashboard-body .ps-alert strong,
body.dashboard-body .ct-notice strong { color: #8edcff !important; }

/* Content studio editor surfaces and tab labels. */
body.dashboard-body .content-tabs { border-color: #303b52 !important; }
body.dashboard-body .content-tabs a,
body.dashboard-body .content-tabs button { color: #bdc9da !important; }
body.dashboard-body .content-tabs a.active,
body.dashboard-body .content-tabs button:hover { background: #202b3d !important; color: #59c9f5 !important; }
body.dashboard-body .cs-toolbar,
body.dashboard-body .cs-side-card,
body.dashboard-body .cs-modal,
body.dashboard-body .ct-editor,
body.dashboard-body .ct-preview { background: #171f30 !important; border-color: #35445d !important; color: #e7edf7 !important; }
body.dashboard-body .cs-visual-editor,
body.dashboard-body .cs-html-editor { background: #0e1523 !important; color: #edf2fa !important; border-color: #35445d !important; }

/* Header and sidebar contrast. */
body.dashboard-body .topbar { background: #0e1422 !important; border-color: #303b52 !important; }
body.dashboard-body .page-heading { color: #f4f7fc !important; }
body.dashboard-body .breadcrumb { color: #aab7ca !important; }
body.dashboard-body .sidebar { background: #0d1322 !important; color: #d0d9e7 !important; border-color: #293247 !important; }
body.dashboard-body .sidebar .nav-link { color: #c3cede !important; }
body.dashboard-body .sidebar .nav-link.active { color: #fff !important; }
body.dashboard-body .sidebar .workspace-label { color: #91a0b6 !important; }
body.dashboard-body .sidebar .profile-mini strong { color: #f4f7fc !important; }
body.dashboard-body .sidebar .profile-mini small { color: #aab7ca !important; }

/* Keep chart series distinct and visible on dark cards. */
body.dashboard-body .chart-line { stroke: #e2c33e !important; }
body.dashboard-body .chart-area-fill { fill: #f58220 !important; opacity: .13 !important; }
body.dashboard-body .chart-gridlines i { border-color: #303b52 !important; }
body.dashboard-body .chart-legend,
body.dashboard-body .legend,
body.dashboard-body .x-labels,
body.dashboard-body .y-labels { color: #aab7ca !important; }

@media(max-width:760px) {
  body.dashboard-body .website-hero,
  body.dashboard-body .website-hero-main { background-color: #b9dcff !important; }
  body.dashboard-body .table-scroll,
  body.dashboard-body .table-wrap { overflow-x: auto; }
}


/* Page-specific contrast repair: Customer Management / Users.
   This page uses a pale-blue hero and dark dashboard cards. Keep text dark on
   the hero, and use dark surfaces with light text for the surrounding cards. */
body.dashboard-body .users-page .page-intro,
body.dashboard-body .users-page .users-page-intro,
body.dashboard-body .users-page .users-hero-main,
body.dashboard-body .users-page .users-hero {
  background: #b9dcff !important;
  color: #142846 !important;
  border-color: #a9d2fa !important;
}
body.dashboard-body .users-page .page-intro *,
body.dashboard-body .users-page .users-page-intro *,
body.dashboard-body .users-page .users-hero-main *,
body.dashboard-body .users-page .users-hero-main h1,
body.dashboard-body .users-page .users-hero-main h2,
body.dashboard-body .users-page .users-hero-main p,
body.dashboard-body .users-page .users-hero-main .users-hero-kicker,
body.dashboard-body .users-page .users-hero-main .users-hero-stat,
body.dashboard-body .users-page .users-hero-main .users-hero-stat span,
body.dashboard-body .users-page .users-hero-main .users-hero-stat strong {
  color: #17365d !important;
}
body.dashboard-body .users-page .users-hero-main h1 { color:#10264a !important; }
body.dashboard-body .users-page .users-hero-main p { color:#496887 !important; }
body.dashboard-body .users-page .users-hero-kicker { color:#315d86 !important; }
body.dashboard-body .users-page .users-hero-stat {
  background:#dceeff !important;
  border:1px solid #f2f8ff !important;
}
body.dashboard-body .users-page .users-hero-stat span { color:#496887 !important; }
body.dashboard-body .users-page .users-hero-stat strong { color:#10264a !important; }

/* White cards were producing white-on-white text under the midnight theme. */
body.dashboard-body .users-page .users-mini-stat,
body.dashboard-body .users-page .users-insight-card,
body.dashboard-body .users-page .users-payment-card {
  background:#141a29 !important;
  border:1px solid #303b52 !important;
  color:#edf2fa !important;
  box-shadow:0 8px 22px #0003 !important;
}
body.dashboard-body .users-page .users-mini-stat label,
body.dashboard-body .users-page .users-payment-card span,
body.dashboard-body .users-page .users-insight-head p,
body.dashboard-body .users-page .users-website-domain,
body.dashboard-body .users-page .users-website-row small,
body.dashboard-body .users-page .users-trend-labels {
  color:#b8c5d8 !important;
}
body.dashboard-body .users-page .users-mini-stat strong,
body.dashboard-body .users-page .users-insight-head h3,
body.dashboard-body .users-page .users-directory-title h3,
body.dashboard-body .users-page .users-website-name,
body.dashboard-body .users-page .users-website-count,
body.dashboard-body .users-page .users-payment-card strong,
body.dashboard-body .users-page .users-directory-title p {
  color:#f1f5fb !important;
}
body.dashboard-body .users-page .users-mini-stat .mini-icon {
  border:1px solid #ffffff12;
}
body.dashboard-body .users-page .users-website-track {
  background:#29364b !important;
}
body.dashboard-body .users-page .users-trend-grid line {
  stroke:#35445d !important;
}
body.dashboard-body .users-page .users-trend-empty {
  background:#141a29e8 !important;
  color:#bdc9da !important;
}
body.dashboard-body .users-page .users-insight-head select {
  background:#0e1523 !important;
  color:#e7edf7 !important;
  border-color:#3a4861 !important;
}
body.dashboard-body .users-page .users-table,
body.dashboard-body .users-page .users-toolbar,
body.dashboard-body .users-page .users-meta {
  color:#dce5f2 !important;
  border-color:#303b52 !important;
}
body.dashboard-body .users-page .users-table td,
body.dashboard-body .users-page .users-table th {
  color:#dce5f2 !important;
  border-color:#303b52 !important;
}
body.dashboard-body .users-page .users-toolbar {
  background:#141a29 !important;
}
body.dashboard-body .users-page .users-pager button {
  background:#202b3d !important;
  color:#edf2fa !important;
  border-color:#3a4861 !important;
}
body.dashboard-body .users-page .users-empty,
body.dashboard-body .users-page .users-empty strong {
  color:#c3cede !important;
}



/* Keep the Users hero grid wrapper transparent, only its main feature panel is blue. */
body.dashboard-body .users-page .users-hero {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
