/* Member terminal: preserve the original member template's palette and density. */
:root {
    color-scheme:dark;
    --bg:#0a0e17; --surface:#0d131f; --surface-raised:#111827;
    --line:#1f293d; --muted:#9ca3af; --fg:#f3f4f6; --accent:#fbbf24;
}
* { box-sizing:border-box; letter-spacing:0; }
body { margin:0; background:var(--bg); color:var(--fg); font:13px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; }
[hidden] { display:none!important; }
h1,h2,h3,p { margin:0; }
h1 { font-size:16px; font-weight:700; }
h2 { font-size:16px; }
h3 { font-size:18px; overflow-wrap:anywhere; }
button,input,select,textarea { font:inherit; color:inherit; background:#090d16; border:1px solid #374151; border-radius:4px; padding:7px 10px; min-height:34px; max-width:100%; }
button { cursor:pointer; background:#1f2937; transition:border-color .15s,background .15s; }
button:hover { border-color:#6b7280; background:#273449; }
button:disabled { opacity:.5; cursor:default; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
a { color:var(--accent); }
label { display:flex; align-items:center; gap:8px; }
header { background:#0a0e17; border-bottom:1px solid var(--line); }
.header-inner { max-width:1280px; margin:auto; padding:12px 24px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.brand { display:flex; align-items:center; gap:12px; min-width:0; }
.brand-mark { display:grid; place-items:center; width:32px; height:32px; flex:none; background:#f59e0b; border:1px solid #d99006; color:#111827; border-radius:4px; font-weight:900; box-shadow:0 3px 12px #f59e0b20; }
.actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.header-actions { flex-wrap:nowrap; flex:none; }
#account { max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; }
#admin-link { font-size:12px; text-decoration:none; }
#logout { background:transparent; border-color:#47252b; color:#f87171; min-height:30px; padding:3px 9px; font-size:12px; }
.icon-button { display:grid; place-items:center; width:34px; height:34px; padding:0; flex:none; }
.icon-button svg { width:16px; height:16px; }
.subnav { background:#0f1523; border-bottom:1px solid var(--line); padding:8px 24px; }
#tabs { max-width:1232px; margin:auto; display:flex; align-items:stretch; gap:4px; padding:4px; background:#080c14; border:1px solid var(--line); border-radius:8px; width:fit-content; }
#tabs button { display:flex; align-items:center; justify-content:center; gap:6px; border-color:transparent; background:transparent; color:var(--muted); white-space:nowrap; padding:8px 16px; font-size:12px; min-height:38px; }
#tabs button[aria-selected="true"] { color:var(--accent); background:#162032; border-color:#73551c; }
.tab-dot { width:7px; height:7px; border-radius:50%; flex:none; }
.red { background:#ef4444; }.cyan { background:#06b6d4; }.green { background:#10b981; }.gold { background:#f59e0b; }
main { max-width:1280px; margin:auto; padding:18px 24px 0; }
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.toolbar label { font-size:12px; color:var(--muted); min-width:0; }
.toolbar select { width:240px; min-width:0; font-size:12px; }
#report { font-size:12px; background:transparent; color:var(--accent); border-color:#665121; flex:none; }
#status { color:var(--muted); font-size:11px; min-height:32px; padding:6px 0; overflow-wrap:anywhere; }
.error { color:#fca5a5!important; }
.notice { padding:9px 12px; border-left:2px solid #80601f; background:#15170f; color:#dfcf9f; font-size:12px; overflow-wrap:anywhere; margin-bottom:12px; }
.publication { border:1px solid #665121; border-radius:6px; margin-bottom:14px; padding:10px 14px; background:#0d131f; }
.publication-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.publication-heading strong { font-size:12px; color:var(--accent); }
.publication-heading span { font-size:11px; color:var(--muted); }
.legacy-warning { color:#fbbf24; font-size:11px; margin-top:4px; }
.publication details { margin:5px 0 0; padding:3px 0 0; border:0; }
.publication details p { margin-top:6px; }
.grid { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.pick { background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:18px 20px 12px; min-width:0; }
.pick-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-bottom:12px; }
.stock-identity { min-width:0; flex:1; }
.stock-title { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rank { display:grid; place-items:center; width:28px; height:28px; flex:none; border-radius:4px; background:#e5e7eb; color:#111827; font:700 12px/1 ui-monospace,monospace; }
.pick:first-child .rank { background:#f59e0b; }
.stock-code { font:12px/1.5 ui-monospace,Consolas,monospace; padding:1px 5px; color:#a9b7cb; background:#1f2937; border-radius:3px; }
.stock-tags { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin:6px 0 0 36px; }
.sector { color:#93c5fd; border:1px solid #234077; background:#12213a; padding:1px 5px; border-radius:3px; font-size:11px; overflow-wrap:anywhere; }
.badge { color:#fca5a5; background:#39151e; border:1px solid #76313d; padding:1px 5px; border-radius:3px; font-size:11px; white-space:nowrap; }
.score { flex:none; text-align:right; }
.score label { display:block; font-size:11px; color:var(--muted); }
.score strong { font:700 22px/1.5 ui-monospace,Consolas,monospace; color:var(--accent); }
.score small { display:block; color:var(--muted); font-size:10px; }
.live-strip { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 16px; background:#080d16; border-block:1px solid var(--line); padding:8px 12px; }
.live-price { font-size:12px; }.live-price strong { font:700 16px/1.5 ui-monospace,Consolas,monospace; }
.quote-time { color:var(--muted); font-size:10px; margin-left:auto; }
.up { color:#f87171; }.down { color:#34d399; }
.code,.muted { color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.section-label { color:var(--muted); font-size:10px; margin:10px 0 5px; }
.metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; padding:8px 0; }
.metric { min-width:0; }
.metric label { display:block; color:var(--muted); font-size:11px; }
.metric strong { font:600 14px/1.8 ui-monospace,Consolas,monospace; overflow-wrap:anywhere; }
.reference-plan { display:flex; gap:8px 24px; flex-wrap:wrap; border-top:1px solid var(--line); padding:8px 0; font-size:12px; }
.reference-plan strong { font-family:ui-monospace,Consolas,monospace; color:var(--accent); }
.signal { border-left:2px solid #866721; padding-left:8px; color:#c5b580; font-size:11px; overflow-wrap:anywhere; }
.pick-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--line); margin-top:10px; padding-top:10px; }
.pick-footer .actions { flex-wrap:nowrap; flex:none; }
.pick-footer button { font-size:11px; padding:4px 10px; min-height:30px; }
.pick-footer button:first-child { color:var(--accent); }
.pick details { margin:8px 0 0; }
.empty { padding:40px 0; text-align:center; color:var(--muted); }
.table-wrap { overflow-x:auto; width:100%; margin-top:12px; }
table { width:100%; border-collapse:collapse; white-space:nowrap; font-size:12px; }
td,th { text-align:left; border-bottom:1px solid var(--line); padding:12px 10px; }
th { background:#080d16; color:var(--muted); font-weight:500; }
.summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:16px; padding:16px 0; border-block:1px solid var(--line); margin:16px 0; }
.summary .metric strong { color:var(--accent); font-size:22px; }
footer { border-top:1px solid var(--line); margin-top:24px; padding:16px 0; color:#6b7280; text-align:center; font-size:11px; }
.copyright { margin-top:8px; }
#auth-gate { min-height:100vh; display:flex; flex-direction:column; justify-content:center; width:min(100%,416px); padding:32px 24px; margin:auto; }
#auth-gate h1 { text-align:center; margin-bottom:24px; font-size:24px; }
#login-form { border:1px solid var(--line); border-radius:8px; padding:24px; background:#0f1624; box-shadow:0 20px 40px #0004; }
#login-form h2 { font-size:14px; border-bottom:1px solid var(--line); padding-bottom:12px; }
#login-form label { display:grid; gap:6px; margin-top:18px; font-size:12px; color:var(--muted); }
#login-form input { min-height:42px; }
#login-form button { width:100%; background:#f59e0b; border-color:#f59e0b; color:#111827; font-weight:700; min-height:42px; }
#login-error { color:#fca5a5; min-height:30px; padding:6px 0; font-size:12px; overflow-wrap:anywhere; }
dialog { background:var(--surface); color:var(--fg); border:1px solid #374151; border-radius:8px; padding:20px; width:min(980px,calc(100% - 24px)); max-height:92dvh; overflow:auto; }
dialog::backdrop { background:#05080fd9; backdrop-filter:blur(6px); }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); padding-bottom:12px; margin-bottom:12px; }
.dialog-heading h2 { min-width:0; overflow-wrap:anywhere; }
#price-chart { width:100%; height:420px; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; font:13px/1.8 system-ui,sans-serif; }
.diagnose-form { display:flex; flex-wrap:wrap; gap:12px; padding:12px 0; margin-bottom:12px; }
.diagnose-form input { flex:1; min-width:140px; max-width:360px; }
#diagnosis-result { padding:16px 0; border-top:1px solid var(--line); }
#diagnosis-result p { margin:8px 0; }
.watch-editor { display:grid; gap:16px; max-width:460px; }
.watch-editor label { display:grid; gap:6px; }
textarea { min-height:100px; resize:vertical; }
details { margin:10px 0; border-block:1px solid var(--line); padding:8px 0; }
summary { cursor:pointer; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
details input { margin:10px 0; width:min(100%,360px); }
details>div { max-height:320px; overflow:auto; }
@media(min-width:1280px) {
    #tabs { margin-left:max(0px,calc((100% - 1232px)/2)); }
}
@media(max-width:800px) {
    .header-inner { padding:10px 12px; gap:8px; }
    .brand { gap:8px; }.brand-mark { width:28px; height:28px; }
    h1 { font-size:14px; }
    .header-actions { gap:8px; } #account { display:none; }
    #admin-link { font-size:10px; }
    .subnav { padding:8px; }
    #tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:2px; }
    #tabs button { min-width:0; min-height:36px; padding:6px 4px; font-size:11px; }
    #tabs button:nth-child(n+5) { min-height:30px; border-top:1px solid var(--line); }
    main { padding:12px 12px 0; }
    .toolbar select { width:178px; }
    .publication { padding:8px 10px; margin-bottom:12px; }
    .publication-heading { gap:2px; }
    .grid { gap:14px; }
    .pick { padding:12px 10px 10px; }
    .pick-heading { gap:8px; padding-bottom:10px; }
    h3 { font-size:16px; }
    .stock-title { gap:6px; }
    .stock-code { font-size:10px; }
    .rank { width:22px; height:22px; font-size:10px; }
    .stock-tags { margin-left:28px; }
    .score { width:86px; }.score label { font-size:10px; }.score strong { font-size:20px; }
    .sector,.badge { font-size:10px; }
    .live-strip { padding:7px 8px; gap:2px 12px; }
    .quote-time { flex-basis:100%; margin-left:0; font-size:10px; }
    .live-price strong { font-size:14px; }
    .metrics { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px 8px; }
    .metric label { font-size:10px; }.metric strong { font-size:13px; }
    .reference-plan { gap:6px 16px; font-size:11px; }
    .pick-footer { gap:6px; align-items:flex-start; }
    .pick-footer .muted { font-size:10px; }
    .pick-footer .actions { gap:5px; }
    .pick-footer button { font-size:10px; padding:4px 6px; }
    .summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #price-chart { height:330px; }
    dialog { padding:12px; }
}
@media(max-width:370px) {
    .header-actions { gap:5px; }
    .brand { gap:6px; } h1 { font-size:12px; }
    .toolbar select { width:154px; }
    .pick-footer { flex-wrap:wrap; }
    .pick-footer .actions { margin-left:auto; }
}
