/* ============================================================
   DEV-CG-DARK-001R — Dark Theme Foundation
   Visual layer only. No workflow, permission, API, route or DB changes.
   ============================================================ */

html.cg-theme-dark-boot { background:#0b1220; }
body.cg-theme-dark:not(.cg-public-page) {
  color-scheme: dark;
  --cg-dark-bg:#0b1220;
  --cg-dark-bg-2:#101827;
  --cg-dark-surface:#141f31;
  --cg-dark-surface-2:#182538;
  --cg-dark-surface-3:#1d2b40;
  --cg-dark-border:#2b3a50;
  --cg-dark-border-soft:#233247;
  --cg-dark-text:#f3f7fc;
  --cg-dark-text-2:#d6e0ec;
  --cg-dark-muted:#94a6bc;
  --cg-dark-blue:#60a5fa;
  --cg-dark-gold:#f5b942;
  --cg-dark-success:#3ddc97;
  --cg-dark-warning:#f5b942;
  --cg-dark-danger:#fb7185;
  background:#0b1220 !important;
  color:var(--cg-dark-text) !important;
}

/* Header theme control */
.cg-theme-toggle {
  appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  min-height:40px !important;
  padding:0 12px !important;
  border:1px solid #d7dee8 !important;
  border-radius:13px !important;
  background:#f8fafc !important;
  color:#334155 !important;
  font-size:12px !important;
  font-weight:800 !important;
  cursor:pointer !important;
  white-space:nowrap !important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease !important;
}
.cg-theme-toggle:hover { border-color:#f2c500 !important; background:#fff9db !important; }
.cg-theme-toggle:active { transform:translateY(1px); }
.cg-theme-toggle-icon { font-size:16px !important; line-height:1 !important; }
body.cg-route-login .cg-theme-toggle,
body.cg-public-page .cg-theme-toggle { display:none !important; }

/* App shell */
body.cg-theme-dark:not(.cg-public-page) .cg-main,
body.cg-theme-dark:not(.cg-public-page) #cgMain {
  background:linear-gradient(180deg,#0f1827 0%,#0b1220 100%) !important;
  color:var(--cg-dark-text) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-header,
body.cg-theme-dark:not(.cg-public-page) #cgHeader {
  background:rgba(11,18,32,.94) !important;
  border-bottom-color:#243247 !important;
  box-shadow:0 8px 28px rgba(0,0,0,.24) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-header .cg-search,
body.cg-theme-dark:not(.cg-public-page) #cgHeader .cg-search {
  background:#121d2c !important;
  border-color:#2d3b50 !important;
  box-shadow:inset 0 1px 1px rgba(0,0,0,.2) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-header .cg-search:focus-within,
body.cg-theme-dark:not(.cg-public-page) #cgHeader .cg-search:focus-within {
  background:#182538 !important;
  border-color:#4f6b91 !important;
  box-shadow:0 0 0 3px rgba(96,165,250,.12) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-header .cg-search input,
body.cg-theme-dark:not(.cg-public-page) #cgHeader .cg-search input { color:var(--cg-dark-text) !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-header .cg-search input::placeholder,
body.cg-theme-dark:not(.cg-public-page) #cgHeader .cg-search input::placeholder { color:#7f92aa !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-header .cg-search button,
body.cg-theme-dark:not(.cg-public-page) #cgHeader .cg-search button { color:#9db0c7 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-header .cg-user,
body.cg-theme-dark:not(.cg-public-page) #cgHeader .cg-user,
body.cg-theme-dark:not(.cg-public-page) .cg-theme-toggle,
body.cg-theme-dark:not(.cg-public-page) .cg-header-logout {
  background:#121d2c !important;
  border-color:#2d3b50 !important;
  color:#dbe7f4 !important;
  box-shadow:none !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-theme-toggle:hover,
body.cg-theme-dark:not(.cg-public-page) .cg-header-logout:hover {
  background:#1a293e !important;
  border-color:#f5b942 !important;
  color:#fff !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-header-clock { color:#dce7f4 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-header-clock span { color:#8fa2b9 !important; }

/* Sidebar keeps CaseGo navy identity but is deepened for dark mode */
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar,
body.cg-theme-dark:not(.cg-public-page) #cgSidebar {
  background:#081525 !important;
  border-right-color:#1d2c40 !important;
  box-shadow:12px 0 34px rgba(0,0,0,.22) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar-brand { border-bottom-color:#24364d !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar-brand strong,
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar-profile-copy strong { color:#f8fafc !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar-brand small,
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar-profile-copy small,
body.cg-theme-dark:not(.cg-public-page) .cg-side-nav .cg-nav-group-label { color:#7f96b0 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-side-nav button { color:#c7d4e4 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-side-nav button:hover { background:#12253d !important; color:#fff !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-side-nav button.active {
  background:#15304d !important;
  color:#fff !important;
  border-color:#2f6d9d !important;
  box-shadow:inset 3px 0 0 #38a9e8 !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar-toggle { color:#c5d4e6 !important; border-color:#263951 !important; background:#0d1d31 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-sidebar-profile { border-top-color:#22354c !important; }

/* Generic surfaces */
body.cg-theme-dark:not(.cg-public-page) .cg-screen { color:var(--cg-dark-text) !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-card,
body.cg-theme-dark:not(.cg-public-page) .cg-panel,
body.cg-theme-dark:not(.cg-public-page) .cg-head,
body.cg-theme-dark:not(.cg-public-page) .cg-kpi,
body.cg-theme-dark:not(.cg-public-page) .cg-section,
body.cg-theme-dark:not(.cg-public-page) .cg-status-box,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-result-card,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-form-panel,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-form-section,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-record-meta,
body.cg-theme-dark:not(.cg-public-page) .cg-announcement-panel,
body.cg-theme-dark:not(.cg-public-page) .cg-op-panel,
body.cg-theme-dark:not(.cg-public-page) .cg-profile-card-008b10i,
body.cg-theme-dark:not(.cg-public-page) .cg-workflow-task-group-table,
body.cg-theme-dark:not(.cg-public-page) .cg-workflow-table-wrap {
  background:var(--cg-dark-surface) !important;
  border-color:var(--cg-dark-border) !important;
  color:var(--cg-dark-text) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.16) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-card:hover,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-result-card:hover { border-color:#3b5574 !important; }

/* Hero / dashboard premium surfaces */
body.cg-theme-dark:not(.cg-public-page) .cg-premium-welcome,
body.cg-theme-dark:not(.cg-public-page) .cg-dashboard-welcome,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-hero,
body.cg-theme-dark:not(.cg-public-page) .cg-screen-hero {
  background:linear-gradient(120deg,#142239 0%,#18263a 56%,#332b1d 100%) !important;
  border-color:#31415a !important;
  color:#f7fbff !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-premium-insight-card,
body.cg-theme-dark:not(.cg-public-page) .cg-insight-card {
  background:linear-gradient(145deg,#141f31 0%,#19263a 100%) !important;
  border-color:#2b3a50 !important;
  color:#f1f6fb !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-premium-welcome p,
body.cg-theme-dark:not(.cg-public-page) .cg-premium-insight-card p,
body.cg-theme-dark:not(.cg-public-page) .cg-insight-card p { color:#b8c6d7 !important; }

/* Typography */
body.cg-theme-dark:not(.cg-public-page) h1,
body.cg-theme-dark:not(.cg-public-page) h2,
body.cg-theme-dark:not(.cg-public-page) h3,
body.cg-theme-dark:not(.cg-public-page) h4,
body.cg-theme-dark:not(.cg-public-page) strong,
body.cg-theme-dark:not(.cg-public-page) label { color:var(--cg-dark-text) !important; }
body.cg-theme-dark:not(.cg-public-page) p,
body.cg-theme-dark:not(.cg-public-page) small,
body.cg-theme-dark:not(.cg-public-page) .cg-muted,
body.cg-theme-dark:not(.cg-public-page) .cg-subtitle,
body.cg-theme-dark:not(.cg-public-page) .cg-helper { color:var(--cg-dark-muted) !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-kicker { color:#7fc7ff !important; }
body.cg-theme-dark:not(.cg-public-page) a { color:#7cc4ff; }

/* Forms */
body.cg-theme-dark:not(.cg-public-page) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.cg-theme-dark:not(.cg-public-page) select,
body.cg-theme-dark:not(.cg-public-page) textarea {
  background:#182538 !important;
  color:#f3f7fc !important;
  border-color:#34465f !important;
  box-shadow:none !important;
}
body.cg-theme-dark:not(.cg-public-page) input::placeholder,
body.cg-theme-dark:not(.cg-public-page) textarea::placeholder { color:#7d91aa !important; opacity:1 !important; }
body.cg-theme-dark:not(.cg-public-page) input:focus,
body.cg-theme-dark:not(.cg-public-page) select:focus,
body.cg-theme-dark:not(.cg-public-page) textarea:focus {
  border-color:#5793d0 !important;
  box-shadow:0 0 0 3px rgba(96,165,250,.12) !important;
  outline:none !important;
}
body.cg-theme-dark:not(.cg-public-page) input[readonly],
body.cg-theme-dark:not(.cg-public-page) input:disabled,
body.cg-theme-dark:not(.cg-public-page) select:disabled,
body.cg-theme-dark:not(.cg-public-page) textarea:disabled {
  background:#111b2a !important;
  color:#98abc1 !important;
  border-color:#2a394e !important;
}
body.cg-theme-dark:not(.cg-public-page) input[type="file"] {
  color:#b8c8da !important;
  background:#111b2a !important;
  border-color:#314158 !important;
}
body.cg-theme-dark:not(.cg-public-page) input[type="file"]::file-selector-button {
  background:#20324b !important;
  color:#eef6ff !important;
  border:1px solid #3b506c !important;
  border-radius:8px !important;
  padding:7px 10px !important;
}

/* Buttons */
body.cg-theme-dark:not(.cg-public-page) .cg-btn:not(.primary),
body.cg-theme-dark:not(.cg-public-page) button.cg-btn:not(.primary),
body.cg-theme-dark:not(.cg-public-page) .cg-text-btn {
  background:#162338 !important;
  border-color:#33455e !important;
  color:#e5eef8 !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-btn:not(.primary):hover,
body.cg-theme-dark:not(.cg-public-page) .cg-text-btn:hover { background:#1e3048 !important; border-color:#4e6789 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-btn.primary,
body.cg-theme-dark:not(.cg-public-page) button.primary {
  background:#2850a4 !important;
  border-color:#3565c8 !important;
  color:#fff !important;
  box-shadow:0 8px 18px rgba(24,76,177,.22) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-btn.primary:hover,
body.cg-theme-dark:not(.cg-public-page) button.primary:hover { background:#315db7 !important; }

/* Tables */
body.cg-theme-dark:not(.cg-public-page) table,
body.cg-theme-dark:not(.cg-public-page) .cg-table,
body.cg-theme-dark:not(.cg-public-page) .cg-data-table { color:#dfe9f4 !important; }
body.cg-theme-dark:not(.cg-public-page) thead,
body.cg-theme-dark:not(.cg-public-page) .cg-table thead,
body.cg-theme-dark:not(.cg-public-page) .cg-data-table thead { background:#162338 !important; color:#aebfd2 !important; }
body.cg-theme-dark:not(.cg-public-page) th { color:#aebfd2 !important; border-color:#2d3e54 !important; }
body.cg-theme-dark:not(.cg-public-page) td { border-color:#26364a !important; color:#dbe6f2 !important; }
body.cg-theme-dark:not(.cg-public-page) tbody tr,
body.cg-theme-dark:not(.cg-public-page) .cg-table-row { background:#141f31 !important; }
body.cg-theme-dark:not(.cg-public-page) tbody tr:nth-child(even) { background:#121d2d !important; }
body.cg-theme-dark:not(.cg-public-page) tbody tr:hover { background:#1a293e !important; }

/* Information/meta cells */
body.cg-theme-dark:not(.cg-public-page) .cg-info,
body.cg-theme-dark:not(.cg-public-page) .cg-info-item,
body.cg-theme-dark:not(.cg-public-page) .cg-meta-item,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-meta-item,
body.cg-theme-dark:not(.cg-public-page) .cg-locked-item,
body.cg-theme-dark:not(.cg-public-page) .cg-detail-item {
  background:#121d2d !important;
  border-color:#2b3b51 !important;
  color:#e3edf8 !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-info span,
body.cg-theme-dark:not(.cg-public-page) .cg-info-item span,
body.cg-theme-dark:not(.cg-public-page) .cg-meta-item span,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-meta-label { color:#8fa3ba !important; }

/* Announcement / lookup / modal / toast */
body.cg-theme-dark:not(.cg-public-page) .cg-modal,
body.cg-theme-dark:not(.cg-public-page) .cg-modal-card,
body.cg-theme-dark:not(.cg-public-page) .cg-dialog,
body.cg-theme-dark:not(.cg-public-page) .cg-popup,
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-modal,
body.cg-theme-dark:not(.cg-public-page) .cg-staff-modal-card {
  background:#141f31 !important;
  border-color:#33465f !important;
  color:#f3f7fc !important;
  box-shadow:0 28px 80px rgba(0,0,0,.46) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-modal-backdrop,
body.cg-theme-dark:not(.cg-public-page) .cg-popup-backdrop { background:rgba(2,6,15,.72) !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-toast { background:#182538 !important; color:#fff !important; border-color:#354963 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-announcement-card {
  background:#152236 !important;
  border-color:#2c4059 !important;
  color:#eaf2fb !important;
}

/* Status / notes */
body.cg-theme-dark:not(.cg-public-page) .cg-note,
body.cg-theme-dark:not(.cg-public-page) .cg-help-box,
body.cg-theme-dark:not(.cg-public-page) .cg-form-note,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-form-note {
  background:#1d2a33 !important;
  border-color:#554a2a !important;
  color:#e8dfbd !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-empty,
body.cg-theme-dark:not(.cg-public-page) .cg-empty-state {
  background:#111c2c !important;
  border-color:#2b3c53 !important;
  color:#9eb0c5 !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-badge,
body.cg-theme-dark:not(.cg-public-page) .cg-status-pill { border-color:transparent !important; }

/* File registry */
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-search-panel,
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-results-panel {
  background:#141f31 !important;
  border-color:#2b3a50 !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-meta-value { color:#f0f6fc !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-file-registry-folio-empty { background:#243042 !important; color:#d0dceb !important; }

/* Bottom navigation / smartphone */
body.cg-theme-dark:not(.cg-public-page) .cg-bottom-nav,
body.cg-theme-dark:not(.cg-public-page) #cgBottomNav {
  background:#0c1727 !important;
  border-top-color:#25364c !important;
  box-shadow:0 -10px 30px rgba(0,0,0,.22) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-bottom-nav button { color:#8ea2ba !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-bottom-nav button.active { color:#fff !important; background:#142a44 !important; }

/* Scrollbars */
body.cg-theme-dark:not(.cg-public-page) * { scrollbar-color:#40536d #101827; }
body.cg-theme-dark:not(.cg-public-page) *::-webkit-scrollbar-thumb { background:#40536d; }
body.cg-theme-dark:not(.cg-public-page) *::-webkit-scrollbar-track { background:#101827; }

/* QR / print preview stays neutral on-screen where paper semantics matter. */
body.cg-theme-dark:not(.cg-public-page) .cg-print-slip,
body.cg-theme-dark:not(.cg-public-page) .cg-qr-slip,
body.cg-theme-dark:not(.cg-public-page) .cg-receipt-slip {
  background:#fff !important;
  color:#0f172a !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-print-slip *,
body.cg-theme-dark:not(.cg-public-page) .cg-qr-slip *,
body.cg-theme-dark:not(.cg-public-page) .cg-receipt-slip * { color:inherit; }

@media (max-width:760px) {
  .cg-theme-toggle {
    width:38px !important;
    min-width:38px !important;
    height:38px !important;
    min-height:38px !important;
    padding:0 !important;
    border-radius:12px !important;
  }
  .cg-theme-toggle-label { display:none !important; }
  body.cg-theme-dark:not(.cg-public-page) .cg-main,
  body.cg-theme-dark:not(.cg-public-page) #cgMain {
    background:linear-gradient(180deg,#0f1827 0%,#0b1220 100%) !important;
  }
}

@media (max-width:420px) {
  .cg-theme-toggle { width:36px !important; min-width:36px !important; height:36px !important; min-height:36px !important; }
}

@media print {
  body.cg-theme-dark { color-scheme:light !important; background:#fff !important; color:#111827 !important; }
  body.cg-theme-dark .cg-main,
  body.cg-theme-dark #cgMain { background:#fff !important; color:#111827 !important; }
  .cg-theme-toggle { display:none !important; }
}

/* ============================================================
   DEV-CG-DARK-002 — Full Dark Component Coverage
   Component-complete contrast and surface pass.
   Frontend visual layer only.
   ============================================================ */
body.cg-theme-dark:not(.cg-public-page) {
  --cg-dark-bg:#0a1322;
  --cg-dark-surface:#142033;
  --cg-dark-surface-2:#18263a;
  --cg-dark-surface-3:#1d2c42;
  --cg-dark-border:#30425b;
  --cg-dark-border-soft:#26374d;
  --cg-dark-text:#f4f8fc;
  --cg-dark-text-2:#d8e4f0;
  --cg-dark-muted:#9fb0c4;
}

/* Strong runtime scope: later page-specific CSS must not revert to light surfaces. */
body.cg-theme-dark:not(.cg-public-page) #cgMain,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-screen {
  color:var(--cg-dark-text)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-panel,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-card,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-section,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-head,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-box,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-list-item,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-task-item,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-item {
  background:#142033!important;
  border-color:#30425b!important;
  color:#f4f8fc!important;
}

/* Text hierarchy / contrast */
body.cg-theme-dark:not(.cg-public-page) #cgMain h1,
body.cg-theme-dark:not(.cg-public-page) #cgMain h2,
body.cg-theme-dark:not(.cg-public-page) #cgMain h3,
body.cg-theme-dark:not(.cg-public-page) #cgMain h4,
body.cg-theme-dark:not(.cg-public-page) #cgMain h5,
body.cg-theme-dark:not(.cg-public-page) #cgMain b,
body.cg-theme-dark:not(.cg-public-page) #cgMain strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain label { color:#f4f8fc!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain p,
body.cg-theme-dark:not(.cg-public-page) #cgMain small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-muted,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-subtitle,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-helper,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-field-help,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-updated { color:#9fb0c4!important; }

/* Dashboard: avoid pale cards with white copy. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight-card,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-insight-card {
  background:linear-gradient(145deg,#17243a 0%,#1b2a40 100%)!important;
  border-color:#30425b!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight-card h2,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight-card h3,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-insight-card h2,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-insight-card h3 { color:#f5f8fc!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight-card p,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-insight-card p { color:#c2d0df!important; }

/* Announcement panel / cards */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-panel {
  background:#132035!important;border-color:#315070!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-item,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-announcement-item {
  background:#19273b!important;
  border-color:#31465f!important;
  color:#eef5fb!important;
  box-shadow:0 10px 26px rgba(0,0,0,.18)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-item.is-penting {
  background:linear-gradient(145deg,#24251f,#292316)!important;
  border-color:#695528!important;
  border-left-color:#e5a13a!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-item.is-segera {
  background:linear-gradient(145deg,#2b2027,#301d25)!important;
  border-color:#70404b!important;
  border-left-color:#df6672!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-item h3 { color:#f3f7fc!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-item p { color:#b9c8d9!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-meta,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-foot,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-announcement-foot small { color:#8fa3bb!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-personal-info-mount {
  background:#121e30!important;border-color:#2b3d54!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-personal-info-head h2,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-personal-info-copy strong { color:#edf4fb!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-personal-info-head p,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-personal-info-copy small { color:#93a7be!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-personal-info-row { border-color:#293b52!important; }

/* Announcement / acknowledgement modal complete dark treatment */
body.cg-theme-dark:not(.cg-public-page) #cgAnnouncementViewModal .cg-ann-view-dialog,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog,
body.cg-theme-dark:not(.cg-public-page) .cg-staff-editor-dialog .cg-panel {
  background:#142033!important;border-color:#344961!important;color:#f4f8fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgAnnouncementViewModal .cg-ann-view-dialog h2,
body.cg-theme-dark:not(.cg-public-page) #cgAnnouncementViewModal .cg-ann-view-dialog h3,
body.cg-theme-dark:not(.cg-public-page) #cgAnnouncementViewModal .cg-ann-view-message,
body.cg-theme-dark:not(.cg-public-page) #cgAnnouncementViewModal .cg-ann-view-publisher,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog h3,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog p { color:#eef5fb!important; }
body.cg-theme-dark:not(.cg-public-page) #cgAnnouncementViewModal .cg-ann-view-meta,
body.cg-theme-dark:not(.cg-public-page) #cgAnnouncementViewModal time { color:#9cafc4!important; }
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-close,
body.cg-theme-dark:not(.cg-public-page) .cg-ann-view-close {
  background:#17253a!important;border-color:#3b5068!important;color:#dce8f4!important;
}

/* Forms: override page-specific light !important rules */
body.cg-theme-dark:not(.cg-public-page) #cgMain input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.cg-theme-dark:not(.cg-public-page) #cgMain select,
body.cg-theme-dark:not(.cg-public-page) #cgMain textarea,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog select,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog textarea {
  background:#101c2d!important;
  color:#eef5fb!important;
  border-color:#3a4e68!important;
  -webkit-text-fill-color:#eef5fb!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain input::placeholder,
body.cg-theme-dark:not(.cg-public-page) #cgMain textarea::placeholder { color:#8499b0!important;-webkit-text-fill-color:#8499b0!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain input[readonly],
body.cg-theme-dark:not(.cg-public-page) #cgMain input:disabled,
body.cg-theme-dark:not(.cg-public-page) #cgMain select:disabled,
body.cg-theme-dark:not(.cg-public-page) #cgMain textarea:disabled {
  background:#0d1827!important;color:#91a5bb!important;-webkit-text-fill-color:#91a5bb!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain option { background:#152338!important;color:#eef5fb!important; }

/* Data tables: remove bright zebra rows and preserve readable status pills. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table-wrap,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-table-wrap,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-workflow-table-wrap { background:#142033!important;border-color:#30425b!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain table thead,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table thead { background:#1b293d!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain table th,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table th { color:#a9bbcf!important;background:#1b293d!important;border-color:#30425b!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr { background:#132035!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:nth-child(even),
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr:nth-child(even) { background:#18263a!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr[data-route]:hover { background:#203149!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain table td,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table td,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table td strong { color:#dce7f3!important;border-color:#2c3e55!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table td small { color:#97abc1!important; }

/* Activity feed */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-compact,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-compact-list .cg-activity-compact {
  background:#142033!important;border-color:#2c3e55!important;color:#e7eef7!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-compact:hover { background:#1d2d43!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-compact strong { color:#eaf2fb!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-compact small { color:#91a5bc!important; }

/* Analytics / KPI cards */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-screen .cg-kpi,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-screen [class*="analytics-card"],
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-admin-command-card {
  background:#18263a!important;border-color:#33475f!important;color:#f2f7fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-screen .cg-kpi strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-admin-command-card strong { color:#f5f8fc!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-screen .cg-kpi span,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-screen .cg-kpi small { color:#a2b4c8!important; }

/* File Registry */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-card,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-result-card,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-card-detail,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-detail-grid div {
  background:#142033!important;border-color:#30425b!important;color:#e8f0f8!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-card strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-card-detail strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-detail-grid b,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-meta-value { color:#edf4fb!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-card small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-card em,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-detail-grid span,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-registry-note { color:#97abc1!important; }

/* Help / About page */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-about-block {
  background:#17253a!important;border-color:#30445e!important;box-shadow:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-about-block h3 { color:#edf4fb!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-about-block p,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-about-text { color:#aebed0!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-about-principles span,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-help-flow span {
  background:#172b45!important;border-color:#34516f!important;color:#dcecff!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-help-flow b { color:#7188a3!important; }

/* Profile */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-hero,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-hero-008b10i {
  background:linear-gradient(135deg,#17253a,#1b2b42)!important;border-color:#334a64!important;color:#f4f8fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-hero h1,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-hero-008b10i h1 { color:#f5f8fc!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-hero p,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-hero-008b10i p { color:#a7b9cc!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-info-grid-008b10i .cg-info,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-profile-security-grid-008b10i .cg-info { background:#111d2e!important;border-color:#2e4057!important; }

/* PU registration wizard + success state */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pu-flow>div { background:#121e30!important;border-color:#31435b!important;color:#8fa4bb!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pu-flow>div.active { background:#2a271b!important;border-color:#c69b2f!important;color:#f7e9b4!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pu-flow b { background:#22334a!important;color:#dbe7f3!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pu-flow .active b { background:#e1ad2f!important;color:#172033!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pu-auto-note,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pu-next-step { background:#111d2e!important;border-color:#2e4057!important;color:#dce7f2!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-id-success .cg-short-id {
  background:#2b2617!important;border-color:#d3a51f!important;color:#ffd85b!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-id-success>strong { color:#e9f2fb!important; }

/* Notes / informational boxes that were still light. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-no-outgoing-box,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-search-result-priority,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-immutable,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-info-recipient-group,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-info-recipient-check {
  background:#252416!important;border-color:#665629!important;color:#e7debd!important;
}

/* File upload fields */
body.cg-theme-dark:not(.cg-public-page) #cgMain input[type="file"] {
  background:#101c2d!important;color:#b8c8da!important;border-color:#344961!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain input[type="file"]::file-selector-button {
  background:#1e3048!important;color:#eef5fb!important;border-color:#425975!important;
}

/* Keep status/badge semantics readable without turning them into dark text-on-dark. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-chip,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-pill,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-badge { filter:saturate(.92) brightness(.98); }

@media (max-width:760px) {
  body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tr {
    background:#142033!important;border-color:#30425b!important;
  }
  body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table td::before { color:#91a5bc!important; }
}

/* ============================================================
   DEV-CG-DARK-002A — Residual Light Component & Contrast Fix
   Targeted visual-only pass after DARK-002 UAT screenshots.
   ============================================================ */

/* Dashboard daily insight cards: retain identity, remove pale/light surfaces. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight {
  border-color:#344861!important;
  box-shadow:0 16px 34px rgba(0,0,0,.24)!important;
  color:#f4f8fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight.is-mind {
  background:
    radial-gradient(circle at 86% 50%,rgba(173,95,170,.20),transparent 42%),
    linear-gradient(135deg,#172438 0%,#1b2639 100%)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight.is-smile {
  background:
    radial-gradient(circle at 87% 50%,rgba(218,163,52,.20),transparent 44%),
    linear-gradient(135deg,#172438 0%,#222638 100%)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight-copy span {
  color:#f5f8fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-premium-insight-copy strong {
  color:#c9d6e5!important;
}

/* Activity screen: page hero, toolbar panel and activity rows must be native dark. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-dashboard-head-clean,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-activity-page-head {
  background:#142033!important;
  border:1px solid #30425b!important;
  color:#f4f8fc!important;
  box-shadow:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-activity-back {
  color:#63b8f0!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-activity-panel,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-activity-page-panel {
  background:#142033!important;
  border-color:#30425b!important;
  color:#f4f8fc!important;
  box-shadow:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-activity-row,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-activity-row.is-static {
  background:#101c2d!important;
  border-color:#2f425b!important;
  color:#e8f0f8!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-activity-row:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-activity-row.is-static:hover {
  background:#1a2a40!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-activity-copy strong {
  color:#eaf2fb!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-activity-copy small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-activity-result-meta,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-op-updated {
  color:#95a9bf!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-activity-page {
  background:#101c2d!important;
  border-color:#334a65!important;
  color:#cbd8e6!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-activity-page:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-workspace .cg-activity-page.is-active {
  background:#1f4f82!important;
  border-color:#4288c7!important;
  color:#fff!important;
}

/* Incoming detail: neutral no-action card with warning accent, never a white island. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-no-action {
  background:#182334!important;
  border:1px solid #45536a!important;
  border-left:4px solid #e5b900!important;
  color:#f2f6fb!important;
  box-shadow:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-no-action strong {
  color:#f4f8fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-no-action p {
  color:#a9bad0!important;
}

/* Analytics: dark metric cards with retained role/accent identity and strong numbers. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric {
  background:#152236!important;
  border-color:#30425b!important;
  box-shadow:none!important;
  color:#dce7f3!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric.is-blue {
  background:linear-gradient(145deg,#142238,#16283c)!important;
  border-left-color:#2d9cdb!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric.is-green {
  background:linear-gradient(145deg,#142238,#172c2a)!important;
  border-left-color:#56b870!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric.is-orange {
  background:linear-gradient(145deg,#142238,#2a261c)!important;
  border-left-color:#f4a024!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric.is-purple {
  background:linear-gradient(145deg,#142238,#251f35)!important;
  border-left-color:#8a64d6!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric span {
  color:#b8c8da!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric strong {
  color:#f8fbff!important;
  text-shadow:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-analytics-metric small {
  color:#91a6be!important;
}

/* Outgoing multi-recipient editor: remove residual light recipient shell. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-row {
  background:#101c2d!important;
  border-color:#344961!important;
  color:#f0f5fb!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-primary-badge {
  background:#183554!important;
  color:#8fd0ff!important;
  border:1px solid #315b80!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-head small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-chip small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-multi-receipt-item span:not(.cg-multi-receipt-no),
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-multi-receipt-item small {
  color:#93a8bf!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-chip,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-multi-receipt-item {
  background:#101c2d!important;
  border-color:#344961!important;
}

/* Residual generic light surfaces observed in UAT. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-empty-small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-activity-error {
  background:#101c2d!important;
  border-color:#33475f!important;
  color:#9fb1c6!important;
}

/* ============================================================
   DEV-CG-DARK-002B — Attachment, Row State & Semantic Badge Fix
   Final targeted dark-theme polish. Visual-only.
   ============================================================ */

/* Outgoing recipient editor: force the complete recipient area dark. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-field,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-rows,
body.cg-theme-dark:not(.cg-public-page) #cgMain [data-outgoing-recipient-row],
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-row {
  background:transparent!important;
  color:#eef5fb!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain [data-outgoing-recipient-row],
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-row {
  background:#101c2d!important;
  border-color:#344961!important;
  box-shadow:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-row .cg-form-row,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-row .cg-form-row > label {
  background:transparent!important;
  color:#dce7f3!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-outgoing-recipient-primary-badge {
  background:#173654!important;
  border:1px solid #315b80!important;
  color:#9bd5ff!important;
}

/* Incoming / outgoing attachment surfaces: remove all white islands. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-panel,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-box,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-list,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-softcopy .cg-softcopy-panel,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-softcopy .cg-softcopy-box {
  background:#111d2e!important;
  border-color:#30445d!important;
  color:#eaf2fb!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-loading,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-empty,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-item {
  background:#101c2d!important;
  border-color:#344961!important;
  color:#dce7f3!important;
  box-shadow:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-empty strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-item strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-head strong {
  color:#f3f7fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-empty p,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-item small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-head small,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-unavailable {
  color:#9fb1c6!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-softcopy-link {
  background:#214a91!important;
  border:1px solid #3e68ad!important;
  color:#fff!important;
}

/* Record tables: no special state may fall back to a light row. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr,
body.cg-theme-dark:not(.cg-public-page) #cgMain table.cg-record-table tbody tr,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr[class],
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr[style] {
  background:#132035!important;
  color:#dce7f3!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr:nth-child(even),
body.cg-theme-dark:not(.cg-public-page) #cgMain table.cg-record-table tbody tr:nth-child(even) {
  background:#1a2739!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr[data-route]:hover {
  background:#20324a!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr td,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr td strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr td .cg-id-col,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table .cg-id-col,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table .cg-assigned-col {
  color:#e3edf7!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr td small {
  color:#96aac0!important;
}

/* Activity feed semantic icons and badges: dark-tinted, not white pills. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-icon {
  background:color-mix(in srgb,currentColor 20%,#101c2d)!important;
  border:1px solid color-mix(in srgb,currentColor 45%,#30425b)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-icon::before {
  background:transparent!important;
  opacity:0!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-badge {
  background:color-mix(in srgb,currentColor 18%,#101c2d)!important;
  border:1px solid color-mix(in srgb,currentColor 42%,#30425b)!important;
  color:currentColor!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-badge::before {
  background:transparent!important;
  opacity:0!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-row.is-orange { color:#f3a33a!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-row.is-blue { color:#55b6ed!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-row.is-green { color:#70cf7a!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-row.is-purple { color:#b18af4!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-row.is-turquoise { color:#55d0ca!important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-op-activity-row.is-red { color:#f07f89!important; }

/* Workflow / table status badges: semantic dark surfaces with readable copy. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-badge,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-chip,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-pill {
  background:#1a2a3e!important;
  border:1px solid #3b5068!important;
  color:#dce8f4!important;
  filter:none!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-badge.green,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-chip.green,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-pill.green {
  background:#153428!important;border-color:#2f6c52!important;color:#8de0b2!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-badge.blue,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-chip.blue,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-pill.blue {
  background:#17314e!important;border-color:#315d86!important;color:#9bd2ff!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-badge.red,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-chip.red,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-pill.red {
  background:#3a2028!important;border-color:#7a414e!important;color:#ffabb4!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-badge.gray,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-chip.gray,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-status-pill.gray {
  background:#222d3a!important;border-color:#465466!important;color:#c7d2df!important;
}

/* Generic attachment/file-box residuals used by some workflow forms. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-file-box,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-attachment-box,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-attachment-card {
  background:#111d2e!important;
  border-color:#30445d!important;
  color:#dce7f3!important;
}

@media(max-width:760px){
  body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr,
  body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr:nth-child(even){
    background:#132035!important;
    border-color:#30445d!important;
  }
}

/* =========================================================
   DEV-CG-DARK-002D — Table Hover Contrast Refinement
   Dark mode only. Keep hover subtle and readable.
   ========================================================= */
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr[data-route]:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-workflow-table tbody tr:hover,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-kpi-table tbody tr:hover {
  background:#26374d !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover > td,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr:hover > td,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-workflow-table tbody tr:hover > td,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-kpi-table tbody tr:hover > td {
  background:#26374d !important;
  color:#e8eef7 !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover > td *,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-record-table tbody tr:hover > td * {
  color:inherit;
}
/* Preserve semantic badges while hovering rows. */
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover .cg-badge,
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover .cg-status,
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover [class*="status"],
body.cg-theme-dark:not(.cg-public-page) #cgMain table tbody tr:hover [class*="badge"] {
  color:revert-layer;
}

/* DEV-CG-DARK-002D — Date Input & Announcement Modal Polish */
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"],
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog #cgAnnExpiry {
  background-color:#101c2d !important;
  color:#eef5fb !important;
  -webkit-text-fill-color:#eef5fb !important;
  border-color:#3a4e68 !important;
  color-scheme:dark;
  box-shadow:none !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]::-webkit-datetime-edit,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]::-webkit-datetime-edit-fields-wrapper,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]::-webkit-datetime-edit-text,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]::-webkit-datetime-edit-month-field,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]::-webkit-datetime-edit-day-field,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]::-webkit-datetime-edit-year-field {
  color:#eef5fb !important;
  -webkit-text-fill-color:#eef5fb !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]::-webkit-calendar-picker-indicator {
  opacity:.9;
  filter:invert(86%) sepia(10%) saturate(530%) hue-rotate(174deg) brightness(105%) contrast(96%);
  cursor:pointer;
}
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"]:focus {
  border-color:#5793d0 !important;
  box-shadow:0 0 0 3px rgba(96,165,250,.12) !important;
}

/* Keep the announcement editor usable on short/mobile viewports. */
body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog {
  max-height:calc(100dvh - 28px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
@media (max-width:640px) {
  body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog {
    width:min(calc(100vw - 20px), 560px) !important;
    max-height:calc(100dvh - 20px);
    padding-bottom:max(18px, env(safe-area-inset-bottom));
  }
  body.cg-theme-dark:not(.cg-public-page) .cg-admin-ack-dialog input[type="date"] {
    min-height:44px;
  }
}


/* DEV-CG-SUPERADMIN-001 — Operations, Settings & Self-Test Repair */
body.cg-theme-dark:not(.cg-public-page) .cg-admin-operation-card{
  background:#142238 !important;
  border-color:#31465f !important;
  color:#f3f7fc !important;
  box-shadow:none !important;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
body.cg-theme-dark:not(.cg-public-page) .cg-admin-operation-card strong{color:#f3f7fc !important;}
body.cg-theme-dark:not(.cg-public-page) .cg-admin-operation-card small{color:#9fb1c7 !important;}
body.cg-theme-dark:not(.cg-public-page) .cg-admin-operation-card:hover,
body.cg-theme-dark:not(.cg-public-page) .cg-admin-operation-card:focus-visible{
  background:#1b2d47 !important;
  border-color:#3b82b8 !important;
  transform:translateY(-1px);
  outline:none;
}
body.cg-theme-dark:not(.cg-public-page) .cg-settings-screen .cg-info,
body.cg-theme-dark:not(.cg-public-page) .cg-settings-screen .cg-info-item{
  background:#142238 !important;
  border-color:#31465f !important;
  color:#f3f7fc !important;
}
.cg-selftest-summary{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.cg-selftest-chip{display:inline-flex;align-items:center;border-radius:999px;padding:7px 11px;font-weight:800;font-size:12px;border:1px solid var(--cg-border,#dbe3ec)}.cg-selftest-chip.pass{background:#e9f9ef;color:#15713b;border-color:#bce8cb}.cg-selftest-chip.fail{background:#fff0f0;color:#a82828;border-color:#f0c6c6}.cg-selftest-chip.neutral{background:#eef3f8;color:#42546b}.cg-selftest-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.cg-selftest-card{border:1px solid var(--cg-border,#dbe3ec);border-radius:14px;padding:14px;background:var(--cg-card,#fff)}.cg-selftest-card strong{display:block;margin:6px 0}.cg-selftest-card p{margin:0;color:var(--cg-muted,#64748b);line-height:1.45}.cg-selftest-status{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:900;letter-spacing:.04em}.cg-selftest-card.is-pass .cg-selftest-status{background:#e9f9ef;color:#15713b}.cg-selftest-card.is-fail .cg-selftest-status{background:#fff0f0;color:#a82828}.cg-selftest-loading{padding:24px;text-align:center;color:var(--cg-muted,#64748b)}
body.cg-theme-dark:not(.cg-public-page) .cg-selftest-card{background:#142238 !important;border-color:#31465f !important;color:#f3f7fc !important}body.cg-theme-dark:not(.cg-public-page) .cg-selftest-card p{color:#9fb1c7 !important}body.cg-theme-dark:not(.cg-public-page) .cg-selftest-card.is-pass .cg-selftest-status,body.cg-theme-dark:not(.cg-public-page) .cg-selftest-chip.pass{background:#123524 !important;color:#8ee2ae !important;border-color:#24563b !important}body.cg-theme-dark:not(.cg-public-page) .cg-selftest-card.is-fail .cg-selftest-status,body.cg-theme-dark:not(.cg-public-page) .cg-selftest-chip.fail{background:#3a1d25 !important;color:#ffb6c1 !important;border-color:#67313e !important}body.cg-theme-dark:not(.cg-public-page) .cg-selftest-chip.neutral{background:#17283d !important;color:#b8c8da !important;border-color:#31465f !important}
@media(max-width:900px){.cg-selftest-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.cg-selftest-grid{grid-template-columns:1fr}}


/* ============================================================
   CASEGO-PROD-UI-DARK-001 — Incoming Workflow + JKR Lookup
   Production visual patch only.
   - Fixes bright Incoming Detail action/status/form surfaces in Dark Mode.
   - Fixes shared Cari Fail JKR modal for all roles using the lookup.
   - No workflow, API, permission or database changes.
   ============================================================ */

/* Incoming Detail premium workspace */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium > .cg-head {
  background:linear-gradient(135deg,#152238 0%,#17263a 100%) !important;
  border-color:#30465f !important;
  border-left-color:#2b9bd7 !important;
  color:#f3f7fc !important;
  box-shadow:0 10px 30px rgba(0,0,0,.16) !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-panel {
  background:#142033 !important;
  border-color:#30425b !important;
  color:#eef5fb !important;
  box-shadow:0 10px 28px rgba(0,0,0,.14) !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-panel-head {
  border-bottom-color:#33465f !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-panel-head h2,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-panel-head strong {
  color:#f3f7fc !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-panel-head p {
  color:#9fb1c7 !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-status-box {
  background:linear-gradient(135deg,#17263a,#132033) !important;
  border-color:#334861 !important;
  color:#eef5fb !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-status-box strong {
  color:#f3f7fc !important;
}

/* Main workflow action card — removes white/yellow light-mode surface. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-primary-action,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-action-full .cg-primary-action {
  background:linear-gradient(135deg,#1c2932 0%,#172438 100%) !important;
  border-color:#5b512b !important;
  border-left-color:#f2c500 !important;
  color:#f2f6fb !important;
  box-shadow:none !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-primary-action strong,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-action-full .cg-primary-action strong {
  color:#f7f9fc !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-premium .cg-primary-action p,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-action-full .cg-primary-action p {
  color:#a9b9cb !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-no-action {
  background:linear-gradient(135deg,#1c2932,#172438) !important;
  border-color:#5b512b !important;
  border-left-color:#f2c500 !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-no-action strong { color:#f3f7fc !important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-no-action p { color:#a9b9cb !important; }

/* Dynamic PJ/EE action form and case summary. */
body.cg-theme-dark:not(.cg-public-page) #cgMain #cgActionFormBox,
body.cg-theme-dark:not(.cg-public-page) #cgMain #cgActionFormBox > *,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pj-workspace-form {
  color:#eef5fb !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pj-workspace-summary {
  background:#111d2d !important;
  border-color:#30425b !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pj-workspace-summary span { color:#91a5bb !important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pj-workspace-summary strong { color:#eef5fb !important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pj-workspace-form .cg-form-actions {
  background:#142033 !important;
  border-color:#30425b !important;
}

/* Incoming metadata cards within the shared EE/PJ/PB detail view. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-info .cg-info {
  background:#111d2d !important;
  border-color:#2b3d54 !important;
  color:#e7eef7 !important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-info .cg-info small { color:#8fa3ba !important; }
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-incoming-detail-info .cg-info strong { color:#eef5fb !important; }

/* Shared JKR File lookup modal — used by Outgoing and workflow actions. */
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-backdrop {
  background:rgba(2,6,15,.76) !important;
  backdrop-filter:blur(6px) !important;
  -webkit-backdrop-filter:blur(6px) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-dialog {
  background:#141f31 !important;
  border-color:#33465f !important;
  color:#f3f7fc !important;
  box-shadow:0 28px 80px rgba(0,0,0,.5) !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-head,
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-search {
  border-color:#2b3d54 !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-head h3 { color:#f3f7fc !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-head p { color:#9fb1c7 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-kicker { color:#58b6ec !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-results { background:#141f31 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-card {
  background:#111d2d !important;
  border-color:#30425b !important;
  color:#e9f1fa !important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-card:hover { border-color:#46617f !important; background:#17263a !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-main strong { color:#f3f7fc !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-main span { color:#c7d4e3 !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-main small { color:#91a5bb !important; }
body.cg-theme-dark:not(.cg-public-page) .cg-jkr-lookup-results .cg-muted { color:#91a5bb !important; }

@media(max-width:720px){
  body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-pj-workspace-form .cg-form-actions {
    background:rgba(20,32,51,.98) !important;
    box-shadow:0 -12px 30px rgba(0,0,0,.2) !important;
  }
}

/* CASEGO-PROD-ACTIVITY-UI-001 — Activity period controls */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-toolbar-period .cg-input,
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-toolbar-period .cg-select{
  background:#111f33!important;
  color:#eaf1fa!important;
  border-color:#30445e!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-activity-toolbar-period .cg-input::placeholder{
  color:#8ea2ba!important;
}

/* CASEGO-PROD-DASHBOARD-LITE-001C — DARK ROLE HOME HARMONIZATION
   Targets the actual dashboard classes used by dashboard.module.js. */
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-role-chip{
  color:#f2d47e!important;
  background:rgba(224,176,62,.12)!important;
  border-color:rgba(224,176,62,.38)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-kicker{
  color:#6fc0f1!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-insight{
  border-color:#30425b!important;
  box-shadow:0 10px 28px rgba(0,0,0,.18)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-insight.is-mind{
  background:linear-gradient(135deg,#17243a 0%,#1d2940 70%,#382f43 100%)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-insight.is-smile{
  background:linear-gradient(135deg,#17243a 0%,#1d293a 70%,#3a3121 100%)!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-insight-copy span{
  color:#f3f7fc!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-insight-copy strong{
  color:#bdcada!important;
}
body.cg-theme-dark:not(.cg-public-page) #cgMain .cg-dashboard-lite .cg-premium-illustration{
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.22))!important;
}
/* 001C END */


/* CASEGO-PROD-NAV-TASKS-INBOX-001 — Peti Inbox dark surfaces */
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-list .cg-personal-info-row{background:#121d2c!important;border-color:#2d3b50!important;color:#dbe7f4!important}
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-list .cg-personal-info-row.is-unread{background:#10243a!important;border-color:#31567c!important}
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-list .cg-personal-info-row.is-read{background:#101827!important;color:#9fb0c4!important}
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-screen .cg-personal-info-head p{color:#94a6bc!important}


/* CASEGO-PROD-INBOX-002 — dark inbox read-state harmonization */
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-stat-grid>article{background:#121d2c!important;border-color:#2d3b50!important;box-shadow:none!important}
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-stat-grid small{color:#8fa2b9!important}
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-stat-grid strong{color:#eef5fc!important}
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-list .cg-personal-info-row.is-unread{background:linear-gradient(135deg,#10243a 0%,#111e30 100%)!important;border-color:#31567c!important;border-left-color:#60a5fa!important;opacity:1!important}
body.cg-theme-dark:not(.cg-public-page) .cg-inbox-list .cg-personal-info-row.is-read{background:#101827!important;border-color:#26364b!important;color:#9fb0c4!important;opacity:.82!important}
body.cg-theme-dark:not(.cg-public-page) .cg-personal-info-state.is-new{background:#183957!important;color:#9bd0ff!important}
body.cg-theme-dark:not(.cg-public-page) .cg-personal-info-state.is-received{background:#173326!important;color:#9ed3b3!important}
body.cg-theme-dark:not(.cg-public-page) .cg-personal-info-receipt{color:#8fa2b9!important}


/* CASEGO-PROD-INBOX-003 — Unified Inbox dark state */
body.cg-theme-dark .cg-inbox-list .cg-inbox-type-overdue{background:linear-gradient(135deg,rgba(127,29,29,.26),rgba(69,10,10,.18))!important;border-color:#7f1d1d!important;border-left-color:#ef4444!important}
body.cg-theme-dark .cg-personal-info-state.is-overdue,body.cg-theme-dark .cg-inbox-key.is-overdue{background:rgba(239,68,68,.18)!important;color:#fecaca!important}
body.cg-theme-dark .cg-inbox-key.is-makluman{background:rgba(59,130,196,.18)!important;color:#bfdbfe!important}
body.cg-theme-dark .cg-inbox-stat-grid>article.is-overdue{background:rgba(127,29,29,.18)!important;border-color:#7f1d1d!important}
body.cg-theme-dark .cg-inbox-stat-grid>article.is-overdue strong{color:#fca5a5!important}
body.cg-theme-dark .cg-inbox-filter .cg-btn.is-active{background:#172554!important;border-color:#3b82f6!important;color:#dbeafe!important}


/* CASEGO-PROD-INBOX-004 — dark searchable recipient selector */
body.cg-theme-dark:not(.cg-public-page) .cg-info-recipient-count{
  background:#182538!important;border-color:#2b3a50!important;color:#aebed0!important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-info-recipient-chip{
  background:rgba(37,99,235,.14)!important;border-color:#315c9b!important;color:#dbeafe!important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-info-recipient-chip button{
  background:rgba(96,165,250,.12)!important;color:#dbeafe!important;
}
body.cg-theme-dark:not(.cg-public-page) .cg-info-recipient-directory .cg-info-recipient-check.is-selected{
  background:rgba(37,99,235,.12)!important;border-color:#315c9b!important;
}
