/* ================================================================
   account.css — Account page (settings / billing / display /
   screen mode) + the Light screen-mode theme.

   The panel is styled from the shared CSS variables in styles.css,
   so it follows the theme automatically. Light mode itself is a
   variable swap on <html data-theme="light"> plus overrides for the
   spots styles.css hardcodes; the chart canvas colors are driven
   from JS (app.js MVDisplay) because CSS can't reach them. Candle
   green/red are series colors and stay identical in both themes.
   ================================================================ */

/* ---------------- account panel ---------------- */
.acct-panel {
  position: fixed; top: 64px; right: 12px; width: 400px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 92px); overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid rgba(30, 227, 8, .35);
  border-radius: 10px; padding: 12px 14px 14px; z-index: 60;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  display: none;
}
.acct-panel.open { display: block; }
.acct-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 8px; border-bottom: 1px solid var(--edge);
}
.acct-head h2 {
  margin: 0; font-size: 13px; letter-spacing: 2px; color: var(--green);
}
.acct-close {
  background: none; border: none; color: var(--dim); font-size: 16px;
  cursor: pointer; padding: 2px 6px;
}
.acct-close:hover { color: var(--ink); }
.acct-sec { margin-top: 14px; }
.acct-sec > h3 {
  margin: 0 0 4px; font-size: 11px; letter-spacing: 1.6px;
  color: var(--d-label); text-transform: uppercase;
}
.acct-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--d-sep);
  font-size: 12.5px;
}
.acct-row:last-child { border-bottom: none; }
.acct-row .k { color: var(--dim); }
.acct-row .v { color: var(--ink); font-weight:400; text-align: right; }
.acct-note { font-size: 11.5px; color: var(--dim); line-height: 1.45; margin: 6px 0 0; }
.acct-msg { font-size: 12px; min-height: 15px; margin: 8px 0 0; }
.acct-msg.err { color: var(--red); }
.acct-msg.ok { color: var(--green); }

.acct-panel select,
.acct-panel input[type="password"] {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--edge); border-radius: 6px;
  padding: 6px 8px; font: inherit; font-size: 12.5px;
}
.acct-panel select { min-width: 150px; }
.acct-panel input[type="password"] { width: 100%; box-sizing: border-box; margin-top: 8px; }
.acct-panel input[type="checkbox"] {
  accent-color: #1ee308; width: 16px; height: 16px; cursor: pointer;
}
.acct-btn {
  background: transparent; border: 1px solid rgba(30, 227, 8, .5);
  color: var(--green); border-radius: 7px; padding: 7px 12px;
  font: inherit; font-size: 12.5px; font-weight:400; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.acct-btn:hover { background: rgba(30, 227, 8, .08); }
.acct-btn.primary { background: var(--green); color: #04140a; border-color: var(--green); }
.acct-btn.primary:hover { background: var(--green); filter: brightness(1.08); }
.acct-btn:disabled { opacity: .5; cursor: default; }

.acct-billing {
  border: 1px solid var(--edge); border-radius: 9px;
  background: var(--panel); padding: 10px 12px 12px;
}
.acct-billing .headline { font-size: 13.5px; font-weight:400; color: var(--ink); }
.acct-billing .acct-row { border-bottom-color: var(--d-sep); }
.acct-billing .acct-btn { margin-top: 10px; }

.acct-seg {
  display: flex; border: 1px solid var(--edge); border-radius: 7px; overflow: hidden;
}
.acct-seg button {
  flex: 1; background: transparent; border: none; color: var(--dim);
  font: inherit; font-size: 12.5px; font-weight:400; padding: 6px 12px;
  cursor: pointer;
}
.acct-seg button.on { background: var(--green); color: #04140a; }

/* ================================================================
   LIGHT SCREEN MODE — html[data-theme="light"]
   Set pre-paint by the inline script in index.html (from the
   localStorage mirror) and reconciled with the server pref by
   account.js. Everything below restyles the app shell; add-on
   module panels that use the shared variables follow along.
   ================================================================ */
html[data-theme="light"] {
  --bg: #edf2f7;
  --panel: #ffffff;
  --panel-2: #f4f8fc;
  --edge: #c2d2e2;
  --ink: #12283d;
  --dim: #5d7590;
  --d-panel: #ffffff;
  --d-edge: #b7cbdf;
  --d-row: #f2f6fb;
  --d-sep: #d7e3ef;
  --d-label: #1668b4;
  background: #edf2f7;
}
html[data-theme="light"] body { background: var(--bg); }
html[data-theme="light"] .topbar {
  background: linear-gradient(180deg, #e9f6e6, #f8fcf7);
  border-bottom-color: rgba(13, 163, 6, .35);
  box-shadow: 0 0 22px rgba(46, 160, 67, .12);
}
html[data-theme="light"] .brand .wordmark .pos { color: #12283d; }
html[data-theme="light"] .icon-btn svg path { fill: #0da306; }
html[data-theme="light"] .icon-btn svg .gear { stroke: #0da306; }
html[data-theme="light"] .title h1 { color: #0da306; text-shadow: none; }
html[data-theme="light"] .title .sub { color: var(--dim); }
html[data-theme="light"] .proto-tag {
  background: #fff3cd; color: #7a5b00; border-color: #e3cf8a;
}
html[data-theme="light"] .tf {
  background: #e7eef6; color: #22384f; border-color: #c2d2e2;
}
html[data-theme="light"] .tf small { color: #7e97ad; }
html[data-theme="light"] .tf:hover { border-color: #0da306; color: #0da306; }
html[data-theme="light"] .tf.active {
  background: #1ee308; color: #04140a; border-color: #1ee308;
}
html[data-theme="light"] .tf.active small { color: #0b5d04; }
html[data-theme="light"] .ind-btn {
  background: #e7eef6; color: #22384f; border-color: #c2d2e2;
}
html[data-theme="light"] .ind-btn:hover { border-color: #0da306; color: #0da306; }
html[data-theme="light"] .tape { background: #e4ebf3; }
html[data-theme="light"] .tape .q b { color: #12283d; }
html[data-theme="light"] .tape .sep { color: #9db4c9; }
html[data-theme="light"] .watchlist { background: var(--panel); }
html[data-theme="light"] .wl-head { color: #0da306; }
html[data-theme="light"] .wl-item { border-bottom-color: #dde7f1; }
html[data-theme="light"] .wl-item:hover { background: #eef4fa; }
html[data-theme="light"] .wl-item.active {
  background: #e4f5df; box-shadow: inset 2px 0 0 #1ee308;
}
html[data-theme="light"] .wl-add input {
  background: #ffffff; color: #12283d; border-color: #b7cbdf;
}
html[data-theme="light"] .wl-rm { background: #eef4fa; color: #41597a; border-color: #b7cbdf; }
html[data-theme="light"] .wl-rm:hover { color: #d43a3a; border-color: #d43a3a; }
html[data-theme="light"] .dash { box-shadow: 0 0 24px rgba(30, 80, 160, .10); }
html[data-theme="light"] .dash-head { background: #e8eff7; }
html[data-theme="light"] .dash-sub { background: rgba(46, 230, 107, .16); }
html[data-theme="light"] .ind-panel,
html[data-theme="light"] .acct-panel {
  border-color: rgba(13, 163, 6, .4);
  box-shadow: 0 12px 40px rgba(18, 40, 61, .18);
}
html[data-theme="light"] #indSearch {
  background: #ffffff; color: #12283d; border-color: #b7cbdf;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #b7cbdf; }

@media (max-width: 760px) {
  .acct-panel { top: 64px; }
}

html[data-theme="light"] .provider-note { color: #5a7186; }
