/* v21 — softer light theme, unified sidebar, desktop + PWA theme controls */
.header-actions{display:grid;justify-items:end;align-content:center;gap:5px;margin-right:14px;min-width:126px}
.header-actions .theme-toggle{margin:0;min-width:82px;justify-content:center}
.header-actions .sync{margin:0;padding:4px 9px;font-size:.66rem;white-space:nowrap;background:transparent}
.header-actions .sync i{width:6px;height:6px;margin-right:6px}

/* Softer light palette: deliberately not pure white. */
html[data-theme="light"]{background:#e9eff6!important;color-scheme:light}
html[data-theme="light"] body{background:linear-gradient(180deg,#e9eff6 0,#edf2f7 52%,#e7edf4 100%)!important;color:#1d2a3a!important}
html[data-theme="light"] .app{background:transparent!important}
html[data-theme="light"] header{background:#edf2f7f2!important;border-color:#cbd6e2!important;box-shadow:0 1px 0 #ffffff80!important}
html[data-theme="light"] .brand{color:#142234!important;border-color:#cbd6e2!important}
html[data-theme="light"] .brand>div small{color:#607286!important}
html[data-theme="light"] .ticker .status{color:#62758a!important}
html[data-theme="light"] .ticker b{color:#26384c!important}
html[data-theme="light"] .ticker em{color:#6d7f92!important}

html[data-theme="light"] aside,
html[data-theme="light"] #sidebar{background:#e2eaf3!important;border-color:#c6d2df!important;color:#243549!important}
html[data-theme="light"] aside nav button{color:#4e6277!important}
html[data-theme="light"] aside nav button:hover{background:#d6e1ec!important;color:#17283a!important}
html[data-theme="light"] aside nav button.active{background:#f1f5f9!important;color:#122335!important;box-shadow:inset 3px 0 #16b985,0 1px 2px #42566b12!important}
html[data-theme="light"] aside nav button b{background:#cad6e2!important;color:#40556b!important}
html[data-theme="light"] .source{border-color:#c6d2df!important}
html[data-theme="light"] .source small,
html[data-theme="light"] .source .time{color:#667b90!important}
html[data-theme="light"] .source p{color:#344b61!important}
html[data-theme="light"] .source p b{color:#5c7085!important}

html[data-theme="light"] main{background:transparent!important}
html[data-theme="light"] .panel,
html[data-theme="light"] .stock-card,
html[data-theme="light"] .market-cards article,
html[data-theme="light"] .catalog-list,
html[data-theme="light"] .catalog-toolbar{background:#f6f8fb!important;border-color:#cdd8e4!important;box-shadow:0 8px 22px #43576c0b!important}
html[data-theme="light"] .market-sessions>div{background:#dfe8f1!important;border-color:#c4d1de!important;color:#203247!important}
html[data-theme="light"] .market-sessions>div b{color:#17293d!important}
html[data-theme="light"] .market-sessions>div small,
html[data-theme="light"] .market-sessions>p{color:#587087!important}
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:#17283a!important}
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:#5d7187!important}
html[data-theme="light"] .stock-row{border-color:#d2dde7!important}
html[data-theme="light"] .stock-row:hover,
html[data-theme="light"] .stock-row.selected,
html[data-theme="light"] .catalog-row:hover{background:#e9f0f6!important}
html[data-theme="light"] .catalog-row{border-color:#ccd8e3!important}
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:#e9eff5!important;color:#17283a!important;border-color:#c4d2df!important}
html[data-theme="light"] .catalog-search input{color:#17283a!important}
html[data-theme="light"] .catalog-search input::placeholder{color:#718399!important}
html[data-theme="light"] .catalog-tabs button{color:#60748a!important}
html[data-theme="light"] .catalog-tabs button.active{background:#dbe5ef!important;color:#17283a!important}
html[data-theme="light"] .ghost,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .insight>button{background:#f5f8fb!important;color:#30465b!important;border-color:#c2cfdd!important}
html[data-theme="light"] .ghost:hover,
html[data-theme="light"] .theme-toggle:hover{background:#e3ebf3!important;border-color:#aebdcb!important}
html[data-theme="light"] .sync{color:#456176!important;border-color:#bac8d6!important;background:#e2eaf2!important}
html[data-theme="light"] .primary{color:#06241b!important}
html[data-theme="light"] .insight{background:linear-gradient(145deg,#f4f7fa,#e9f0f5)!important}
html[data-theme="light"] .modal-box{background:#f3f6f9!important;border-color:#c8d4df!important;box-shadow:0 30px 80px #40566b26!important}
html[data-theme="light"] .bottom-nav{background:#e8eef5f2!important;border-color:#c4d0dc!important}
html[data-theme="light"] .bottom-nav button{color:#63778d!important}
html[data-theme="light"] .bottom-nav button.active{color:#008b68!important;background:#dde8ef!important}
html[data-theme="light"] .toast{background:#eff4f8!important;border-color:#c5d1dc!important;color:#25384c!important;box-shadow:0 12px 30px #34475e1c!important}
html[data-theme="light"] .chat-message{background:#dfe8f0!important}
html[data-theme="light"] .chat-message.user{background:#d8eee7!important}
html[data-theme="light"] .admin-toolbar{background:linear-gradient(135deg,#f6f8fb,#eaf0f5)!important;border-color:#cbd7e2!important}
html[data-theme="light"] .admin-message:not(:empty){background:#e7eef4!important;border-color:#cbd7e2!important}
html[data-theme="light"] .admin-stat{background:linear-gradient(145deg,#f6f8fb,#e9f0f5)!important;border-color:#cad6e1!important}
html[data-theme="light"] .account-user{background:linear-gradient(145deg,#f5f8fa,#eaf0f5)!important;border-color:#cbd7e2!important}
html[data-theme="light"] .account-user:hover{background:#e6eef4!important;border-color:#aebfce!important}
html[data-theme="light"] .account-user-main b{color:#17283a!important}
html[data-theme="light"] .account-user-main small{color:#5f7388!important}
html[data-theme="light"] .account-limit{background:#e4ebf2!important;border-color:#c4d1dd!important}
html[data-theme="light"] .account-limit input{background:#f4f7fa!important;color:#17283a!important;border-color:#b9c8d6!important}
html[data-theme="light"] .account-user .save-limit{background:#dcefe8!important;color:#08785b!important;border-color:#a9dbc9!important}
html[data-theme="light"] .account-user .danger-action{background:#f7e8ea!important;color:#b73c4d!important;border-color:#e2b8be!important}
html[data-theme="light"] .account-admin-badge{background:#dfe7ef!important;color:#536b81!important;border-color:#c4d0dc!important}
html[data-theme="light"] .mobile-menu{color:#24384d!important}

@media(max-width:900px){
  header{grid-template-columns:42px minmax(0,1fr) auto!important}
  .header-actions{margin-right:8px;min-width:72px;gap:3px}
  .header-actions .theme-toggle{display:flex!important;min-width:68px;padding:6px 8px!important;border-radius:10px!important;gap:5px!important}
  .header-actions .theme-toggle small{display:inline!important;font-size:10px!important}
  .header-actions .sync{display:flex!important;max-width:86px;padding:3px 6px!important;font-size:0!important;border-radius:999px!important}
  .header-actions .sync i{margin:0!important}
  .brand{min-width:0!important;padding:0 6px!important}
  .brand>div{white-space:nowrap;font-size:.78rem!important}
  .brand>img{width:30px!important;height:30px!important}
  aside,#sidebar{top:62px!important}
  html[data-theme="light"] aside,
  html[data-theme="light"] #sidebar{background:#e2eaf3!important}
}
@media(max-width:540px){
  .header-actions{min-width:66px;margin-right:5px}
  .header-actions .theme-toggle{min-width:62px;padding:6px!important}
  .header-actions .theme-toggle small{font-size:9px!important}
  .header-actions .sync{max-width:70px}
}
