/* StockKonnect sign-in pages - dark mode (redesign).
   Follows the same saved theme as the app (localStorage "sk.theme": light | dark | system).
   The inline script in each page's <head> sets <html data-theme> before first paint.
   Light mode: only --ink-3 is darkened so grey helper text passes WCAG AA (4.5:1) on white. */

:root { --ink-3: #6b6661; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --green: #8FD3BF; --green-2: #0F3B31; --green-3: #6CC3A8; --green-soft: #12322A;
  --ink: #EEF2F0; --ink-2: #C2C9C6; --ink-3: #9AA39F;
  --cream: #141A18; --card: #0B1511; --line: #2A3732; --line-2: #18231F;
  --crit: #FF8A80; --crit-soft: #3A1714; --good: #6FD39B; --good-soft: #12301F;
  --info: #9BBEF5; --info-soft: #14223A; --warn: #F5B94D;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 36px rgba(0,0,0,.45);
  --field: #101D18;
}

/* Fields and secondary buttons that were hard-coded white */
:root[data-theme="dark"] .amz a,
:root[data-theme="dark"] .inp input,
:root[data-theme="dark"] .inp select,
:root[data-theme="dark"] .inp textarea,
:root[data-theme="dark"] .ghost,
:root[data-theme="dark"] .otp input,
:root[data-theme="dark"] .lang-btn,
:root[data-theme="dark"] .skl input[type="checkbox"],
:root[data-theme="dark"] .rules li::before { background-color: var(--field); }
:root[data-theme="dark"] .otp input.filled { background: var(--green-soft); }
:root[data-theme="dark"] .skl input[type="checkbox"]:checked { background-color: var(--green-3); }
:root[data-theme="dark"] .skl input[type="checkbox"]:checked::after { border-color: #0B1511; }
:root[data-theme="dark"] .rules li.ok::before { background-color: var(--good); }
:root[data-theme="dark"] .lang-pop .menu { background: #0F1A16; }
:root[data-theme="dark"] .inp input:-webkit-autofill,
:root[data-theme="dark"] .inp input:-webkit-autofill:hover { -webkit-box-shadow: 0 0 0 1000px var(--field) inset; }
:root[data-theme="dark"] .inp input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px var(--field) inset, 0 0 0 4px rgba(108,195,168,.18); }
:root[data-theme="dark"] .inp input:focus,
:root[data-theme="dark"] .inp select:focus,
:root[data-theme="dark"] .inp textarea:focus { box-shadow: 0 0 0 4px rgba(108,195,168,.18); }
:root[data-theme="dark"] .amz a b { color: #FF9F3D; }

/* Brand panel keeps its deep green (the same panel in both themes) */
:root[data-theme="dark"] .L2 .brand,
:root[data-theme="dark"] .L5 .brand { background: #06352B; box-shadow: inset -1px 0 0 #1C4A3F; }
:root[data-theme="dark"] .L3 { background-color: #06352B; }
:root[data-theme="dark"] .L2 .brand .chips span,
:root[data-theme="dark"] .L5 .brand .chips span { color: #1a1a1a; }
:root[data-theme="dark"] .L5 .brand .news article { border-color: #26594F; }
:root[data-theme="dark"] .L2 .brand p, :root[data-theme="dark"] .L5 .brand p,
:root[data-theme="dark"] .L5 .brand .news p, :root[data-theme="dark"] .L2 .brand .facts li { color: #D7E5E0; }
:root[data-theme="dark"] .news .tag-fixed { color: #FFD38A; background: #3A2A0E; }
:root[data-theme="dark"] .news .tag-security { color: #A9C4FF; background: #16233F; }

/* Logos on the page background: use the version made for dark backgrounds */
:root[data-theme="dark"] .side > .logo .lt { display: none; }
:root[data-theme="dark"] .side > .logo .dk { display: block; }

/* Preview bar (prototype only) */
:root[data-theme="dark"] .skl-pv { background: #2A230F; border-bottom-color: #5A4A1C; }
:root[data-theme="dark"] .skl-pv button,
:root[data-theme="dark"] .skl-pv button.pub[aria-disabled="true"] { background: var(--field); }
:root[data-theme="dark"] .skl-pv button[aria-pressed="true"] { background: #26594F; border-color: #26594F; }
