/* v20 — polished admin console + lightweight light/dark theme */
:root{--admin-accent:#29e3a7;--admin-accent-soft:#29e3a718;--admin-warn:#f5b942;--admin-danger:#ff6b7a}
.theme-toggle{display:flex;align-items:center;gap:7px;margin-right:10px;padding:8px 11px;border:1px solid #2b3d52;border-radius:12px;background:#101b2b;color:#cbd8e6;cursor:pointer;font-weight:700}.theme-toggle span{font-size:16px;line-height:1}.theme-toggle small{font-size:11px;letter-spacing:.02em}.theme-toggle:hover{border-color:#405871;background:#152337}

#view-admin .page-head{margin-bottom:18px}#view-admin .page-head h1{margin-bottom:8px}#view-admin .page-head p{max-width:720px}
.admin-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin-bottom:16px;background:linear-gradient(135deg,#101c2b,#0d1724)}.admin-toolbar-actions{display:flex;flex-wrap:wrap;gap:10px}.admin-message{margin:0;min-height:18px;color:#8fa6bb;font-size:12px;text-align:right}.admin-message:not(:empty){padding:8px 11px;border-radius:9px;background:#0a1420;border:1px solid #22354a}
.admin-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}.admin-stat{padding:16px 17px;border:1px solid #23374c;border-radius:14px;background:linear-gradient(145deg,#111d2c,#0c1622)}.admin-stat small{display:block;color:#70859b;font-size:10px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.admin-stat b{display:block;margin-top:8px;font-size:24px}.admin-stat em{display:block;margin-top:3px;color:#7f93a8;font-style:normal;font-size:11px}.admin-stat.active b{color:var(--admin-accent)}.admin-stat.pending b{color:var(--admin-warn)}.admin-stat.suspended b{color:var(--admin-danger)}
#accountAdmin{padding:0!important;margin:0!important;background:transparent!important;border:0!important;box-shadow:none!important}#accountAdmin>h3{display:flex;align-items:center;justify-content:space-between;margin:4px 0 10px;font-size:15px}#accountAdmin>h3:after{content:'TÀI KHOẢN';font-size:10px;letter-spacing:.12em;color:#657b91}
#accountUsers{display:grid;gap:10px}.account-user{display:grid!important;grid-template-columns:minmax(230px,1fr) auto auto;gap:14px!important;align-items:center!important;padding:16px 17px!important;border:1px solid #23364b!important;border-radius:14px;background:linear-gradient(145deg,#0f1a28,#0b1520);transition:border-color .18s,transform .18s,background .18s}.account-user:hover{border-color:#36506b!important;background:#111f30;transform:translateY(-1px)}.account-user-main{display:grid!important;gap:6px!important;min-width:0!important}.account-user-main b{font-size:14px!important;overflow-wrap:anywhere}.account-user-main small{font-size:11px!important;color:#8599ae!important}.account-user-status{display:inline-flex;width:max-content;align-items:center;gap:6px;padding:5px 8px;border-radius:999px;background:#142336;color:#95a9bd;font-size:10px;font-weight:800;letter-spacing:.03em}.account-user-status:before{content:'';width:6px;height:6px;border-radius:50%;background:#6f8296}.account-user-status.active{background:#103228;color:#69e7bd}.account-user-status.active:before{background:#29e3a7}.account-user-status.pending{background:#342a13;color:#f6c861}.account-user-status.pending:before{background:#f5b942}.account-user-status.suspended{background:#351a22;color:#ff8996}.account-user-status.suspended:before{background:#ff6b7a}.account-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.account-limit{display:grid!important;grid-template-columns:auto 76px;align-items:center;gap:8px!important;padding:6px 8px;border:1px solid #283c52;border-radius:10px;background:#09131f;font-size:10px!important;color:#8094aa!important}.account-limit input{width:76px!important;height:34px;padding:6px 9px!important;border-radius:8px!important;text-align:center;font-weight:800;background:#111e2d!important}.account-user .ghost{min-height:38px;padding:9px 12px;border-radius:10px}.account-user .save-limit{border-color:#2c6254;color:#7fe6c6;background:#123029}.account-user .save-limit:hover{background:#174136}.account-user .danger-action{border-color:#573342;color:#ff9aaa}.account-admin-badge{justify-self:end;padding:7px 10px!important;border-color:#3a4f69!important;background:#142236;color:#9db0c6!important}.admin-pager{display:flex;gap:9px;margin-top:14px}.admin-pager button{min-width:110px}

/* Light theme overrides — no data/API behavior changes */
html[data-theme="light"] body{background:#f4f7fb;color:#172334}html[data-theme="light"] header{background:#fff;border-color:#dce4ee}html[data-theme="light"] .brand{border-color:#e1e8f0;color:#162335}html[data-theme="light"] .brand>div small,html[data-theme="light"] .ticker em,html[data-theme="light"] .source,html[data-theme="light"] .source .time{color:#718096}html[data-theme="light"] .ticker b{color:#334155}html[data-theme="light"] aside{background:#f7f9fc;border-color:#dce4ee}html[data-theme="light"] aside nav button{color:#526173}html[data-theme="light"] aside nav button:hover,html[data-theme="light"] aside nav button.active{background:#e8f0fb;color:#172334}html[data-theme="light"] main{background:#f4f7fb}html[data-theme="light"] .panel,html[data-theme="light"] .stock-card,html[data-theme="light"] .market-cards article{background:#fff;border-color:#d9e3ed;box-shadow:0 8px 24px #2130470a}html[data-theme="light"] .page-head h1,html[data-theme="light"] .panel h2,html[data-theme="light"] .stock-row b,html[data-theme="light"] .catalog-company span,html[data-theme="light"] .news-item,html[data-theme="light"] .chat-message p{color:#1b293a}html[data-theme="light"] .page-head p,html[data-theme="light"] .list-head p,html[data-theme="light"] .stock small,html[data-theme="light"] .price small,html[data-theme="light"] .catalog-status,html[data-theme="light"] .catalog-company small,html[data-theme="light"] .account-panel p,html[data-theme="light"] .news-item p,html[data-theme="light"] #newsStatus{color:#6b7d90}html[data-theme="light"] .stock-row{border-color:#e4eaf1}html[data-theme="light"] .stock-row:hover,html[data-theme="light"] .stock-row.selected,html[data-theme="light"] .catalog-row:hover{background:#f1f6fb}html[data-theme="light"] .catalog-toolbar,html[data-theme="light"] .catalog-list{background:#fff}html[data-theme="light"] .catalog-search,html[data-theme="light"] .meter,html[data-theme="light"] .account-limit,html[data-theme="light"] .chat-panel textarea,html[data-theme="light"] .account-panel input,html[data-theme="light"] .modal-box input,html[data-theme="light"] .modal-box select{background:#f7f9fc;color:#172334;border-color:#d5e0ea}html[data-theme="light"] .catalog-search input{color:#172334}html[data-theme="light"] .catalog-tabs button.active{background:#e7eef7;color:#172334}html[data-theme="light"] .ghost,html[data-theme="light"] .theme-toggle,html[data-theme="light"] .insight>button{background:#fff;color:#35465a;border-color:#ced9e5}html[data-theme="light"] .primary{color:#06241b}html[data-theme="light"] .sync{color:#5c6e82}html[data-theme="light"] .insight{background:linear-gradient(145deg,#ffffff,#f2f7fb)}html[data-theme="light"] .modal-box{background:#fff;border-color:#d5e0ea;box-shadow:0 30px 80px #50607022}html[data-theme="light"] .bottom-nav{background:#fffffff2;border-color:#d8e2ec}html[data-theme="light"] .bottom-nav button{color:#728296}html[data-theme="light"] .bottom-nav button.active{color:#008b68}html[data-theme="light"] .toast{background:#fff;border-color:#d2dde8;color:#263548;box-shadow:0 12px 30px #34475e1c}html[data-theme="light"] .chat-message{background:#eaf1f7}html[data-theme="light"] .chat-message.user{background:#dff4ec}html[data-theme="light"] .admin-toolbar{background:linear-gradient(135deg,#fff,#f6f9fc);border-color:#d9e3ed}html[data-theme="light"] .admin-message:not(:empty){background:#f5f8fb;border-color:#d9e3ed}html[data-theme="light"] .admin-stat{background:linear-gradient(145deg,#fff,#f6f9fc);border-color:#d9e3ed}html[data-theme="light"] .account-user{background:linear-gradient(145deg,#fff,#f8fafc);border-color:#d9e3ed!important}html[data-theme="light"] .account-user:hover{background:#f7fafc;border-color:#bccddd!important}html[data-theme="light"] .account-user-main b{color:#1b293a}html[data-theme="light"] .account-user-main small{color:#6c7d90!important}html[data-theme="light"] .account-limit{background:#f5f8fb;border-color:#d3dee9}html[data-theme="light"] .account-limit input{background:#fff!important;color:#172334!important;border-color:#cbd8e5}html[data-theme="light"] .account-user .save-limit{background:#e9f8f3;color:#08785b;border-color:#b9e9d9}html[data-theme="light"] .account-user .danger-action{background:#fff4f5;color:#c74455;border-color:#f0c4ca}html[data-theme="light"] .account-admin-badge{background:#eef3f8;color:#5c7085!important;border-color:#d3dde7!important}

@media(max-width:900px){.theme-toggle small{display:none}.theme-toggle{padding:8px 10px;margin-right:4px}.admin-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-toolbar{align-items:flex-start;flex-direction:column}.admin-message{text-align:left}.account-user{grid-template-columns:1fr!important}.account-controls{justify-content:flex-start}.account-admin-badge{justify-self:start}.admin-pager{padding-bottom:10px}}
@media(max-width:540px){.admin-stats{gap:8px}.admin-stat{padding:13px}.admin-stat b{font-size:21px}.account-user{padding:14px!important}.account-controls{display:grid;grid-template-columns:1fr 1fr;width:100%}.account-limit{grid-column:1/-1;grid-template-columns:1fr 84px}.account-limit input{width:84px!important}.account-user .ghost{width:100%}.admin-toolbar-actions{width:100%}.admin-toolbar-actions button{flex:1}.admin-pager button{flex:1}.theme-toggle{border-radius:10px}}
