/* Dark theme: loaded after dashboard.css. Selectors are prefixed with `html` so they win over
   page stylesheets linked later (accounts.css). Remove the <link> in base.html/login.html to go back to light. */
:root{--blue:#6b97ff;--ink:#e3e8f2;--muted:#8b96ab;--line:#283249;--bg:#0b1019;--green:#3ecf9b;--red:#ff7b80;color-scheme:dark}
html body{background:radial-gradient(1100px 420px at 18% -80px,#14213f66,transparent 70%),var(--bg);background-attachment:fixed;color:var(--ink)}
html ::selection{background:#2b4580;color:#fff}

/* shell */
html .sidebar{background:#0f1521;border-right-color:#222b3f}
html .brand small,html .nav-label{color:#6f7a90}
html .nav-item{color:#a3adc0}
html .nav-item{position:relative;transition:background .12s,color .12s}
html .nav-item:hover{background:#171e2d;color:#dbe2f0}
html .nav-item.active,html .nav-item.active:hover{color:#9db8ff;background:#22345f;font-weight:600;box-shadow:inset 3px 0 0 var(--blue)}
html .nav-item.active span{color:var(--blue)}
html .sidebar-note{background:#192031;border-color:#252e43}
html .avatar,html .avatar-lg{background:#1d2944}
html .topbar{background:#131a29;border-bottom-color:#232d44;color:#7e8aa0}
html .breadcrumb{color:#aab4c6}
html footer{color:#5f6a80}

/* controls */
html .button.secondary{background:#1a2133;border-color:#2c3650;color:#c3cbdc}
html .button.secondary:hover{background:#202941}
html .button.soft{background:#1d2944}
html .button:disabled{opacity:.5}
html textarea,html .wide-input,html .search input,html .field input,html .field select{background:#0d131f;border-color:#2c3852;color:var(--ink)}
html textarea:focus,html input:focus,html select:focus{outline:2px solid #2a4278;border-color:var(--blue)}
html ::placeholder{color:#5f6a80}
html .tag{background:#1e2638;color:#95a1b8}
html .tag.blue{background:#1d2944;color:var(--blue)}
html .step{border-color:#2c3650;color:#8592ab}

/* surfaces */
html .metric,html .card,html .login-card,html .account-card{background:#161e30;border-color:#29344d;box-shadow:0 1px 0 #ffffff08 inset,0 6px 18px #00000033}
html .login-page{background:var(--bg)}
html .card-head,html .account-top,html .account-col,html .task-toolbar{border-color:#26314a}
html .account-col:last-child{border-right:0}
html .metric-label{color:#8a95aa}
html .metric small,html .file-sub{color:#6f7a90}
html .metric-icon{background:#1d2944}
html .metric.success .metric-icon{background:#13322a}
html .metric.failure .metric-icon{background:#3a1f27}
html .preview-box{background:#111a2b;border-color:#26314a}
html .preview-box summary{color:#93a6d0}
html .preview-item{border-top-color:#232b3e}
html .activity{background:#111a2b;border-bottom-color:#26314a}
html .activity-title{color:#94a0b6}
html .progress-track{background:#232b3e}
html .entry-icon{background:#1d2944}
html .entry-icon.green{background:#13322a}
html .guide{border-left-color:var(--line)}
html .login-card p,html .login-footer{color:#7a869b}

/* notices */
html .notice.error,html .attention{background:#2f1c24;border-color:#4b2a33}
html .account-error{background:#2f1c24;border-color:#4b2a33}

/* tables */
html th{background:#111a2b;color:#7f8aa0}
html th,html td{border-bottom-color:#232d44}
html tbody tr:hover{background:#1b2438}
html .tab{color:#7f8aa0}
html .tab.active{color:var(--blue)}
html .tab span{background:#1e2638}
html .file-icon{background:#1d2944;border-color:#2a3a63;color:#8aa8f0}
html .status-badge.completed{background:#12312a}
html .status-badge.running{background:#1d2944}
html .status-badge.queued{background:#232b3b;color:#8a95aa}
html .status-badge.failed{background:#3a1f27}
html .date-cell,html .pagination{color:#7a869b}
html .empty{color:#667289}
html .empty strong{color:#94a0b6}
html details.row-detail{color:#7a869b}
html .history-item{border-bottom-color:var(--line)}

/* accounts page */
html .stat{background:#1a2438}
html .account-foot{background:#111a2b;border-top-color:#26314a}
html .guide-code{background:#1a2438;color:#b6c1d7}
html .slider{background:#3a4358}
html .switch input:checked+.slider{background:var(--blue)}
html .dirty-note{color:#e2aa4d}

/* misc */
html .table-wrap .actions a{border-color:#2c3650}
html ::-webkit-scrollbar{width:11px;height:11px}
html ::-webkit-scrollbar-track{background:#0b1019}
html ::-webkit-scrollbar-thumb{background:#2a3347;border-radius:8px;border:2px solid #0b1019}
html ::-webkit-scrollbar-thumb:hover{background:#38435c}
