/* Graftum — optional dark theme for the CRM & desks.
   Scoped under html.gr-dark (toggled by theme.js, persisted per device).
   Same palette as the platform panel: #0b1222 / #121c33 / #9db4e8. */

html.gr-dark body{ background:#0b1222 !important; color:#dbe4f5; }

/* surfaces */
html.gr-dark .card,
html.gr-dark .bg-white{ background:#121c33 !important; border-color:rgba(148,175,230,.10) !important; }
html.gr-dark .card{ box-shadow:0 1px 2px rgba(0,0,0,.25), 0 14px 34px -22px rgba(0,0,0,.6) !important; }
html.gr-dark .bg-slate-50, html.gr-dark .bg-slate-100, html.gr-dark .bg-slate-200{ background:#1c2947 !important; }
html.gr-dark .bg-red-50{ background:rgba(230,57,70,.15) !important; }
html.gr-dark .bg-amber-50, html.gr-dark .bg-yellow-50{ background:rgba(217,119,6,.18) !important; }
html.gr-dark .bg-green-50, html.gr-dark .bg-emerald-50{ background:rgba(34,197,94,.14) !important; }

/* text */
html.gr-dark .text-slate-700, html.gr-dark .text-slate-800,
html.gr-dark .text-slate-900, html.gr-dark .text-black{ color:#dbe4f5 !important; }
html.gr-dark .text-slate-600, html.gr-dark .text-slate-500{ color:#93a3c4 !important; }
html.gr-dark .text-slate-400{ color:#7385ad !important; }
html.gr-dark .text-slate-300{ color:#55628a !important; }
html.gr-dark .text-red-600{ color:#ff6b76 !important; }

/* borders & dividers */
html.gr-dark .border-slate-200, html.gr-dark .border-slate-100,
html.gr-dark .border-slate-50, html.gr-dark .border-slate-300{ border-color:rgba(148,175,230,.12) !important; }
html.gr-dark [class*="divide-slate"] > *{ border-color:rgba(148,175,230,.10) !important; }

/* forms */
html.gr-dark input, html.gr-dark select, html.gr-dark textarea, html.gr-dark .inp{
  background:#0e1729 !important; color:#dbe4f5 !important; border-color:#243456 !important; }
html.gr-dark input::placeholder, html.gr-dark textarea::placeholder{ color:#5d6c93; }
html.gr-dark select option{ background:#0e1729; color:#dbe4f5; }

/* tables */
html.gr-dark th{ background:#0e1729 !important; color:#6f7fa6 !important; border-color:rgba(148,175,230,.10) !important; }
html.gr-dark td{ border-color:rgba(148,175,230,.08) !important; }
html.gr-dark tbody tr:hover{ background:rgba(148,175,230,.05) !important; }

/* inline light-theme colors, re-lit (same remap as the panel) */
html.gr-dark [style*="color:#304269"]{ color:#9db4e8 !important; }
html.gr-dark [style*="background:#eef1f6"]{ background:#1c2947 !important; color:#c3d0ee !important; }
html.gr-dark [style*="background:#f4f6fa"], html.gr-dark [style*="background:#f8fafc"]{ background:#0e1729 !important; }
html.gr-dark [style*="background:#fdecec"], html.gr-dark [style*="background:#fdecee"]{ background:rgba(230,57,70,.16) !important; }
html.gr-dark [style*="background:#fef3c7"]{ background:rgba(217,119,6,.20) !important; }
html.gr-dark [style*="background:#eefaf1"], html.gr-dark [style*="background:#fee2e2"]{ background:rgba(230,57,70,.16) !important; }
html.gr-dark [style*="color:#b45309"]{ color:#f0a35c !important; }
html.gr-dark [style*="color:#15803d"]{ color:#4ade80 !important; }
html.gr-dark [style*="color:#64748b"]{ color:#8a9bc0 !important; }
html.gr-dark [style*="color:#dc2626"]{ color:#ff6b76 !important; }

/* misc */
html.gr-dark ::-webkit-scrollbar-thumb{ background:#2c3a5e; }
html.gr-dark .langchip{ background:#121c33; border-color:#243456; color:#93a3c4; }
html.gr-dark .langchip.on{ background:#304269; color:#fff; }
html.gr-dark .chip{ background:#1c2947; color:#a9b9dd; border-color:#243456; }
html.gr-dark .trade-chip{ border-color:#243456; }
html.gr-dark .trade-chip.sel{ background:#1c2947; border-color:#5b7fd4; }
html.gr-dark .preset{ background:#121c33; border-color:#243456; color:#c3d0ee; }
html.gr-dark .tab{ color:#7f90b6; }
html.gr-dark .tab.on{ background:#304269; color:#fff; }
/* print stays light — paper is paper */
@media print{ html.gr-dark body{ background:#fff !important; color:#0f172a !important; } }
