
:root{--bg:#0a111d;--shell:#0b1422;--sidebar:#0c1524;--card:#111d2e;--card2:#142237;--edge:#26344a;--muted:#8e9daf;--text:#ecf2fb;--white:#fff;--teal:#4be0bd;--green:#52d9a4;--red:#ff7a89;--amber:#ffc679;--blue:#85a9ff;--shadow:0 14px 40px #0003}
*{box-sizing:border-box}html,body{margin:0;font:14px/1.45 'Segoe UI',Arial,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:var(--teal)}button:focus-visible,input:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
.app{min-height:100vh;display:grid;grid-template-columns:236px minmax(0,1fr)}.sidebar{background:var(--sidebar);border-right:1px solid var(--edge);padding:26px 14px;display:flex;flex-direction:column;gap:10px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:12px;align-items:center;padding:0 10px 22px}.logo{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border:1px solid #46bfa7;border-radius:11px;color:var(--teal);background:#12362f;font-size:18px;font-weight:900}.brand strong{display:block;letter-spacing:2px;font-size:19px}.brand small{display:block;color:#8295a9;letter-spacing:1px;font-size:10px}.sideheading{color:#596e88;text-transform:uppercase;letter-spacing:1.5px;font-size:10px;padding:12px 13px 5px;font-weight:800}.nav{display:flex;align-items:center;gap:13px;width:100%;background:transparent;color:#9aaac0;border:1px solid transparent;border-radius:10px;text-align:left;padding:12px 13px;font-weight:600}.nav:hover{background:#14253b;color:#fff}.nav.active{color:#d9ffef;background:#18372f;border-color:#285646}.nav .ico{font-size:17px;width:20px;text-align:center}.nav .count{margin-left:auto;background:#294337;border-radius:7px;padding:1px 6px;color:#abf9d5;font-size:10px}.bottom{margin-top:auto}.serverbox{padding:14px;background:#121f31;border:1px solid #25384d;border-radius:12px}.tiny{font-size:11px;color:var(--muted)}.online{display:inline-block;width:7px;height:7px;background:var(--green);border-radius:50%;margin-right:5px;box-shadow:0 0 0 3px #4be0bd1b}.server-row{display:flex;justify-content:space-between;margin-top:10px;font-size:12px}
.main{padding:0 28px 32px;min-width:0;max-width:1800px;width:100%;margin:0 auto}.top{height:80px;border-bottom:1px solid var(--edge);display:flex;align-items:center;justify-content:space-between;gap:14px}.breadcrumb{color:#96a7bb;font-size:12px}.breadcrumb b{color:var(--text)}.topright{display:flex;gap:10px;align-items:center}.tag,.demo{padding:7px 10px;border:1px solid #354458;border-radius:8px;color:#aebfd1;font-size:11px;font-weight:700}.demo{border-color:#715231;color:#ffd18c;background:#332819}.avatar{width:34px;height:34px;border-radius:50%;background:#2c415d;display:flex;align-items:center;justify-content:center;font-weight:800}.hero{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:26px 0 22px}.eyebrow{text-transform:uppercase;color:var(--teal);letter-spacing:2px;font-size:10px;font-weight:800}.hero h1{margin:3px 0 6px;font-size:27px;letter-spacing:-.6px;font-weight:730}.hero p{color:var(--muted);margin:0;max-width:760px;font-size:12px}.actions{display:flex;gap:8px;flex-wrap:wrap}.btn{background:#19334a;border:1px solid #35536a;color:#eaf5ff;padding:10px 14px;border-radius:9px;font-size:12px;font-weight:700}.btn:hover{filter:brightness(1.2)}.btn.primary{color:#09271e;border-color:#51dcb6;background:var(--teal)}.btn.outline{background:transparent}.btn.danger{color:#ffdce0;border-color:#8d3e50;background:#44202d}.btn.sml{padding:7px 10px;font-size:11px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 365px;gap:16px;align-items:start}.left{min-width:0}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.card{background:linear-gradient(150deg,#142239,#111b2b);border:1px solid var(--edge);border-radius:13px;box-shadow:var(--shadow)}.metric{padding:17px}.metric .lab{color:#9aabc0;text-transform:uppercase;font-size:10px;letter-spacing:.6px;font-weight:800}.metric .value{font-size:24px;font-weight:760;margin:9px 0 2px;font-variant-numeric:tabular-nums;white-space:nowrap}.metric .foot{font-size:10px;color:#8393a9}.positive{color:var(--green)!important}.negative{color:var(--red)!important}.warning{color:var(--amber)!important}.panel{padding:18px 19px;margin-bottom:14px}.panelhead{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.panelhead h2{font-size:14px;margin:0;letter-spacing:.1px}.panelhead small{font-size:10px;color:var(--muted)}.tabs{display:flex;gap:6px;flex-wrap:wrap}.tab{background:#17283d;border:1px solid #283c52;border-radius:7px;padding:6px 10px;color:#8da6bf;font-size:10px;font-weight:800}.tab.on{background:#254c43;border-color:#41896c;color:#bcffdf}.legend{display:flex;gap:13px;align-items:center;color:#94a9c0;font-size:10px}.legend i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:5px}.hourtable{overflow-x:auto}.heatmap{min-width:570px}.timehead,.heatrow{display:grid;grid-template-columns:90px repeat(12,minmax(0,1fr));gap:5px;align-items:center;margin:5px 0}.timehead span{text-align:center;color:#73879d;font-size:10px}.heatrow b{font-size:11px;font-weight:650}.heat{height:27px;border-radius:4px;border:1px solid #ffffff13;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#dbe8f9}.heat:hover{outline:1px solid #ffffff90;cursor:pointer}.heat-neg{background:#522b3e}.heat-strongneg{background:#993c53}.heat-pos{background:#1f614f}.heat-strongpos{background:#1e8b6a}.heat-neu{background:#23364a;color:#627992}.heat-selected{outline:2px solid #fff!important}.heat-note{display:flex;justify-content:space-between;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #2c3b4c;font-size:11px;color:#a8b8ca}.suggestions{display:grid;grid-template-columns:1fr 1fr;gap:11px}.insight{background:#142236;border:1px solid #2c3d52;border-radius:11px;padding:14px}.insight .kicker{font-size:10px;font-weight:800;letter-spacing:.7px;color:#cbb388}.insight h3{font-size:13px;margin:7px 0 8px}.insight p{font-size:11px;color:#b0c0d0;margin:0 0 12px;line-height:1.55}.insight .buttons{display:flex;gap:7px;flex-wrap:wrap}.insight .meta{margin-top:9px;color:#788ea6;font-size:10px}.pills{display:flex;gap:8px;flex-wrap:wrap}.pill{font-size:10px;border-radius:20px;border:1px solid #3b526a;padding:4px 8px;color:#acc2d4}.pill.green{border-color:#38765d;color:#7fe0af;background:#153a33}.pill.red{border-color:#774259;color:#ffc0c3;background:#432433}.tablewrap{overflow-x:auto}.table{border-collapse:collapse;width:100%;font-size:11px;min-width:610px}.table th{text-align:left;color:#8399af;padding:10px 9px;border-bottom:1px solid #314358;font-weight:700}.table td{padding:11px 9px;border-bottom:1px solid #25344a}.table tr:last-child td{border-bottom:0}.table tr:hover td{background:#ffffff07}.symbol{font-weight:760;color:#e7f5ff}.small-muted{font-size:10px;color:#6b8ba3}.status{font-size:10px;font-weight:800;border-radius:8px;background:#1e4237;color:#90e9bc;padding:4px 8px}.status.off{background:#47313a;color:#ffb2bb}.chat{position:sticky;top:18px;overflow:hidden;display:flex;flex-direction:column;height:calc(100vh - 105px);min-height:590px}.chathead{padding:14px 15px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #293c50;background:#14243a}.chat-title{display:flex;align-items:center;gap:10px}.chat-icon{width:32px;height:32px;border-radius:11px;background:#1c4c42;color:#7bf3c8;display:flex;align-items:center;justify-content:center;font-size:18px}.chathead b{font-size:13px}.chatmessages{overflow-y:auto;flex:1;padding:16px 14px;display:flex;flex-direction:column;gap:11px;background:radial-gradient(ellipse at 80% 0,#162641 0,transparent 55%)}.bubble{max-width:95%;padding:12px 13px;border-radius:12px;font-size:11px;white-space:pre-line;line-height:1.52}.bubble.ai{background:#1e3046;border:1px solid #36536a;border-top-left-radius:3px;align-self:flex-start}.bubble.user{background:#1c5448;border:1px solid #2a7662;border-top-right-radius:3px;align-self:flex-end}.bubble .sender{font-size:10px;font-weight:800;color:#80f3c8;margin-bottom:5px}.bubble.ai .sender{color:#a6baf1}.chatquick{padding:11px 13px;border-top:1px solid #27384e;display:flex;gap:6px;overflow-x:auto}.quick{border:1px solid #38536c;background:#1b314a;color:#a7d8e5;border-radius:14px;padding:6px 10px;white-space:nowrap;font-size:10px}.chatentry{display:flex;gap:7px;padding:12px 12px 14px;border-top:1px solid #34475c}.chatentry input{flex:1;min-width:0;padding:10px;background:#0b1728;border:1px solid #38506b;border-radius:10px;color:#fff;font-size:11px}.circle{width:35px;height:35px;border:1px solid #39506b;border-radius:10px;background:#1c2c42;color:#b6d1e6;display:flex;align-items:center;justify-content:center}.circle.primary{background:#46d5af;color:#062e20;border-color:#46d5af}.chatfoot{text-align:center;font-size:10px;color:#738da4;padding:0 12px 12px}
.section{display:none}.section.active{display:block}.subhead{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.pairgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.paircard{border:1px solid #2b3e56;border-radius:11px;padding:13px;background:#142238}.paircard .bar{height:5px;border-radius:5px;background:#26394d;overflow:hidden;margin:12px 0}.paircard .fill{height:100%;background:#50dfb7}.paircard .fill.bad{background:#f37d8f}.paircard strong{font-size:18px}.paircard .right{float:right;font-weight:800}.paircard p{font-size:11px;color:#9fadc0}.filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:13px}.select{background:#15263a;color:#dbebfa;border:1px solid #344963;border-radius:9px;padding:8px 10px;font-size:12px}.ruleslist{display:flex;flex-direction:column;gap:10px}.rule{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:14px;border:1px solid #32465b;background:#15243a;border-radius:11px}.rule b{font-size:12px}.rule .desc{font-size:11px;color:#93a8bf;margin-top:4px}.switch{width:39px;height:22px;border:0;border-radius:18px;background:#38516a;position:relative}.switch:after{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;background:white;border-radius:50%;transition:.2s}.switch.on{background:#31a982}.switch.on:after{left:20px}.settingsgrid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.formbox{border:1px solid #32465b;padding:17px;background:#142339;border-radius:12px}.formbox h3{margin:0 0 12px;font-size:14px}.formrow{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:10px 0;font-size:12px}.formrow label{color:#b8c9d7}.formrow input{max-width:130px;background:#0d192c;color:#fff;border:1px solid #31445e;border-radius:7px;padding:8px}.fakelog{font:11px/1.8 Consolas,monospace;white-space:pre-wrap;color:#a6c8d8;background:#0c1728;border-radius:9px;padding:13px}.chartbars{display:flex;align-items:end;gap:10px;height:175px;border-bottom:1px solid #526275;padding:14px 3px 0}.chartcol{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:end;height:100%;gap:5px}.chartcol .col{width:64%;border-radius:6px 6px 0 0;background:#3c8f80;min-height:2px}.chartcol .col.bad{background:#e36d80}.chartcol span{font-size:10px;color:#829ab2}.alert{border:1px solid #544832;background:#312b22;color:#fce0a9;border-radius:9px;padding:12px;font-size:11px;margin-top:12px}
.modalbg{position:fixed;inset:0;background:#000b;z-index:100;display:none;align-items:center;justify-content:center;padding:20px}.modalbg.show{display:flex}.modal{max-width:515px;width:100%;background:#132137;border:1px solid #4b607b;border-radius:17px;padding:24px;box-shadow:0 30px 100px #0008}.modal h2{margin:0 0 10px;font-size:20px}.modal p{color:#aabed0;font-size:12px}.modal pre{white-space:pre-wrap;background:#0b182a;border-radius:9px;padding:13px;color:#cfdfef;font:11px/1.7 Consolas,monospace}.modal label{display:flex;gap:9px;font-size:12px;color:#d3e3ef;align-items:flex-start;margin:15px 0}.modal label input{margin-top:2px;accent-color:#50d9b2}.modal .buttons{display:flex;gap:9px;justify-content:flex-end}.toast{position:fixed;right:20px;bottom:20px;max-width:400px;background:#154237;border:1px solid #2f9778;border-radius:11px;padding:14px 17px;color:#e2fff4;z-index:110;box-shadow:0 15px 40px #0005;display:none}.toast.show{display:block}
@media(max-width:1320px){.layout{grid-template-columns:minmax(0,1fr) 328px}.sidebar{width:210px}.app{grid-template-columns:210px minmax(0,1fr)}.main{padding:0 18px 25px}.cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:1060px){.layout{grid-template-columns:1fr}.chat{position:relative;height:520px;top:auto;min-height:0}.sidebar{height:auto;position:relative}.app{grid-template-columns:190px 1fr}.hero{align-items:flex-start}}
@media(max-width:760px){.app{display:block}.sidebar{position:relative;width:100%;padding:11px 10px;display:block;border-right:0;border-bottom:1px solid #2a3d52}.brand{padding:4px 4px 8px}.sideheading,.bottom{display:none}.navs{display:flex;overflow-x:auto;gap:5px}.nav{width:auto;min-width:max-content;padding:9px 10px;font-size:11px}.nav .ico{display:none}.nav .count{display:none}.main{padding:0 12px 20px}.top{height:56px}.topright .tag{display:none}.hero{display:block;padding:19px 0}.hero h1{font-size:23px}.actions{margin-top:14px}.cards{grid-template-columns:repeat(2,1fr)}.metric{padding:13px}.metric .value{font-size:19px}.suggestions,.pairgrid,.settingsgrid{grid-template-columns:1fr}.heatmap{min-width:560px}.panel{padding:13px}.rule{align-items:flex-start}}

/* ARALIM V3 additions */
.hintline{margin:16px 0 4px;color:var(--muted);font-size:11px}.labgrid{display:grid;grid-template-columns:minmax(230px,1fr) minmax(350px,1.2fr);gap:15px}.uploadzone{border:1.5px dashed #3f7890;border-radius:13px;background:#132c40;text-align:center;padding:18px;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.uploadicon{font-size:28px;color:var(--teal)}.uploadzone input{max-width:240px;color:var(--muted);font-size:11px}.uploadstatus{font-size:11px;color:var(--blue);overflow-wrap:anywhere}.labfields{display:grid;grid-template-columns:1fr 1fr;gap:9px}.labfields label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:11px}.labfields input,.vault input{border:1px solid #344963;background:#15263a;border-radius:8px;padding:9px;color:var(--text);width:100%}.labactions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:15px}.labstats{margin-bottom:15px}.reportcolumns{display:grid;grid-template-columns:1fr 1fr;gap:22px;border-top:1px solid var(--edge);padding-top:15px}.reportcolumns h3{font-size:13px}.reportcolumns p{font-size:12px}.vault{max-width:470px;margin:12px auto 18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px}.vaultsymbol{font-size:40px;color:var(--teal)}.vault h2{font-size:18px;margin:0}.vault p{font-size:12px;color:var(--muted);margin:0}.vault label{font-size:11px;text-align:left;width:100%;color:var(--muted)}.policybox{border:1px solid var(--edge);padding:15px;border-radius:10px;margin:14px 0;background:var(--card2)}.policybox strong{font-size:13px}.policybox .formrow{margin-top:12px}.costrow{display:flex;justify-content:space-between;border-bottom:1px solid var(--edge);font-size:12px;padding:9px 0}.progress{height:7px;background:#24374e;border-radius:10px;overflow:hidden}.progress i{display:block;background:var(--amber);height:100%}.chartoverlay{display:none;position:fixed;inset:0;background:#071020dd;z-index:100000;align-items:center;justify-content:center;padding:15px}.chartoverlay.show{display:flex}.chartdialog{background:var(--card);border:1px solid var(--edge);border-radius:15px;padding:18px;width:min(850px,96vw);max-height:92vh;overflow:auto;box-shadow:0 20px 80px #0007}.chartdialoghead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.chartactions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.chartdialog svg{width:100%;height:auto;background:#111c2b;border:1px solid #31465a;border-radius:10px}.chartnotice{border:1px solid var(--edge);border-radius:12px;padding:19px;background:var(--card2);font-size:13px;line-height:1.8}.chartnotice p{color:var(--muted)}.theme-btn{min-width:112px}
body.light{--bg:#f1f5fa;--shell:#e8eff7;--sidebar:#ffffff;--card:#ffffff;--card2:#f7fafc;--edge:#d8e0eb;--muted:#52677e;--text:#172a3e;--teal:#057e6e;--green:#067b53;--red:#c43448;--amber:#9f6203;--blue:#305fa1;--shadow:0 10px 24px #26466314;color:var(--text)}
body.light .sidebar{background:#fff}body.light .nav{color:#52647c}body.light .nav:hover{background:#edf4fa;color:#122337}body.light .nav.active{background:#d9eee8;color:#086752;border-color:#b4d7ce}body.light .card{background:#fff}body.light .metric .lab,body.light .metric .foot,body.light .tiny,body.light .panelhead small,body.light .hero p{color:#52677e}body.light .metric .value{color:#192c41}body.light .metric .value.negative,body.light .negative{color:#c43448!important}body.light .metric .value.positive,body.light .positive{color:#067b53!important}body.light .table th{color:#506782;border-color:#dbe3ee}body.light .table td{border-color:#e4e9f0}body.light .table tr:hover td{background:#edf5fb}body.light .symbol{color:#102940}body.light .tag{color:#40556e;border-color:#d0d9e5}body.light .btn:not(.primary):not(.danger){background:#edf3f9;color:#264566;border-color:#bfcddd}body.light .btn.primary{color:#fff;background:#087f6d;border-color:#087f6d}body.light .chathead{background:#eff5fb;border-color:#dbe3ec}body.light .chatmessages{background:#f6f9fd}body.light .bubble.ai{background:#fff;border-color:#d7e3ec}body.light .bubble.user{background:#dbf3eb;border-color:#b4ddcc}body.light .chatentry input,body.light .labfields input,body.light .vault input{background:#fff;color:#132638;border-color:#c3cfdb}body.light .select{background:#fff;color:#203b52;border-color:#c3cfdb}body.light .insight,body.light .paircard,body.light .serverbox,body.light .uploadzone,body.light .policybox,body.light .rule{background:#f6f9fd;border-color:#d9e2ec}body.light .tab{background:#edf4fa;border-color:#d6e1eb;color:#47637b}body.light .tab.on{background:#d6eee5;color:#0a6958;border-color:#9bd2be}body.light .chatfoot{color:#70839b}body.light .quick{background:#f0f5fa;color:#214968;border-color:#cee0e9}body.light .nav .count{background:#dbefe6;color:#12664e}body.light .heat-neu{background:#e3eaf1;color:#7a8da0}body.light .heat-pos{background:#bee9da;color:#076647}body.light .heat-neg{background:#f3cbd5;color:#9b2c46}body.light .heat-strongneg{background:#ef9aac;color:#72172c}body.light .heat-strongpos{background:#79d8b6;color:#075a3f}body.light .timehead span{color:#52677e}body.light .pills .pill,body.light .pill{color:#405672}body.light .chartdialog{background:#fff}body.light .chartnotice{background:#f7fafc}body.light .chat-icon{color:#e7fff5}
@media(max-width:1020px){.labgrid{grid-template-columns:1fr}.labfields{grid-template-columns:1fr 1fr}}@media(max-width:650px){.labfields,.reportcolumns{grid-template-columns:1fr}.chartdialog{padding:12px}.topright .tag{display:none}#themeToggle{font-size:11px}}

/* v3.1 — restored Control Dashboard from original ARALIM AI prototype */
.dashboard-wide .layout{grid-template-columns:minmax(0,1fr)}
.dashboard-wide .chat{display:none}
.restore-title{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:3px 0 17px}
.restore-title h2{font-size:21px;font-weight:760;letter-spacing:-.45px;margin:0 0 4px;color:var(--text)}
.restore-title p{color:var(--muted);font-size:12px;margin:0}
.restore-ranges{display:flex;gap:3px;border:1px solid var(--edge);border-radius:9px;padding:4px;background:var(--card2)}
.restore-ranges button{border:0;border-radius:6px;background:transparent;padding:7px 12px;color:var(--muted);font-size:11px;font-weight:650;cursor:pointer}
.restore-ranges button[aria-pressed="true"]{background:#29476a;color:#fff}
body.light .restore-ranges button[aria-pressed="true"]{background:#d8e9f5;color:#17476d}
.dash-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.dash-metric{padding:17px 17px 16px;min-height:114px}
.dash-metric .dash-metric-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.dash-metric .dash-metric-head span:first-child{font-size:11px;color:var(--muted);line-height:1.3}
.dash-symbol{width:26px;height:26px;display:grid;place-items:center;border-radius:7px;background:#253b5c;color:#a6c9ff;font-size:13px;font-weight:bold}
body.light .dash-symbol{background:#ecf3fb;color:#52749c}
.dash-metric strong{display:block;font-size:25px;letter-spacing:-.4px;margin:9px 0 1px;font-variant-numeric:tabular-nums}
.dash-metric .dash-sub{font-size:11px;color:var(--muted)}
.dash-dual-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr);gap:13px;margin-bottom:13px}
.dash-dual-grid.bottom-grid{grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr)}
.dash-card{padding:19px 20px;min-width:0;min-height:220px}
.dash-card-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px}
.dash-card-top h3{font-size:14px;font-weight:750;letter-spacing:-.1px;margin:0}
.dash-card-top .dash-subtitle{font-size:10px;color:var(--muted)}
.dash-plot{width:100%;height:188px;display:block;overflow:visible}
.dash-plot .dash-gridline{stroke:var(--edge);stroke-width:1;opacity:.82}
.dash-plot .dash-curve{fill:none;stroke:var(--green);stroke-width:3;stroke-linejoin:round;stroke-linecap:round}
.dash-plot .dash-cursor{fill:var(--green);stroke:var(--card);stroke-width:3}
.dash-chart-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;color:var(--muted);font-size:10px;margin-top:1px}
.dash-key{width:7px;height:7px;display:inline-block;background:var(--green);border-radius:50%;margin-right:6px}
.dash-events{display:flex;flex-direction:column}
.dash-event{border-bottom:1px solid var(--edge);display:flex;gap:11px;padding:11px 0;align-items:center}
.dash-event:last-child{border-bottom:0}
.dash-event-icon{flex:0 0 28px;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:#184e41;color:#75eabc;font-size:14px}
.dash-event-icon.gold{background:#4b371e;color:#ffce78}
.dash-event-icon.red{background:#512937;color:#ff9ea9}
.dash-event-text{flex:1;min-width:0}
.dash-event-text strong{display:block;font-size:11px;font-weight:750}
.dash-event-text small{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.dash-event-time{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.dash-term-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--edge)}
.dash-term-row:last-child{border:0}
.dash-term-row strong{display:block;font-size:11px}
.dash-term-row small{display:block;color:var(--muted);font-size:10px;margin-top:3px}
.dash-term-row .dash-online{color:var(--green);font-size:10px;font-weight:700;white-space:nowrap}
.dash-ai-brief{border:1px dashed #395b71;border-radius:9px;background:#192b41;padding:14px;font-size:11px;line-height:1.65;color:#c0d5e4}
body.light .dash-ai-brief{background:#f5f9fd;border-color:#bed2e0;color:#3a5367}
.dash-ai-foot{font-size:10px;color:var(--muted);line-height:1.55;margin:11px 0 14px}
.dash-lower-heading{display:flex;justify-content:space-between;gap:15px;align-items:center;margin:26px 0 12px;padding-top:16px;border-top:1px solid var(--edge)}
.dash-lower-heading h2{margin:0 0 5px;font-size:16px}
.dash-lower-heading p{font-size:11px;color:var(--muted);margin:0}
.dash-demo-note{padding:9px 12px;border:1px solid var(--edge);border-radius:8px;color:var(--muted);font-size:10px}
@media(max-width:1350px){.dash-dual-grid,.dash-dual-grid.bottom-grid{grid-template-columns:1fr 1fr}.dash-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:940px){.dash-dual-grid,.dash-dual-grid.bottom-grid{grid-template-columns:1fr}.dash-card{min-height:0}}
@media(max-width:520px){.dash-metrics{gap:8px}.dash-metric{padding:12px;min-height:111px}.dash-metric strong{font-size:21px}.restore-title{align-items:flex-start;flex-direction:column}.dash-card{padding:14px}.dash-plot{height:150px}.dash-term-row{align-items:flex-start}.dash-event-time{font-size:9px}.dash-lower-heading{align-items:flex-start;flex-direction:column}}

button:disabled{opacity:.45;cursor:not-allowed} .hidden{display:none!important} pre{white-space:pre-wrap;overflow-wrap:anywhere} .notice{color:var(--amber);padding:12px;border:1px solid var(--edge);border-radius:8px;margin:10px 0} .field{display:block;margin:12px 0}.field input,.field select{display:block;width:100%;margin-top:6px;padding:10px;border:1px solid var(--edge);border-radius:7px;background:var(--card2);color:var(--text)} .empty{padding:24px;color:var(--muted);text-align:center}.login{max-width:430px;width:95%;padding:30px}.login h1{margin:8px 0}.numeric{font-variant-numeric:tabular-nums}.connection-error{color:var(--red)} .barcell{min-width:120px}.barfill{height:5px;min-width:1px;background:var(--teal);border-radius:3px} .page-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap} #chartDialog{width:min(1000px,95vw);max-height:95vh;overflow:auto} .chart-label{font-size:12px;fill:var(--muted)} .scroll-report{max-height:500px;overflow:auto} #loginError{min-height:24px;color:var(--red)} .login label{color:var(--muted)} .light .login{background:var(--card)} .chart-drawing{width:100%;height:auto;min-height:230px} .online-dot{color:var(--green)} .stale-dot{color:var(--amber)} @media(max-width:600px){.top{height:auto;padding:14px 0;flex-wrap:wrap}.main{padding:0 12px 20px}.topright{flex-wrap:wrap}.hero{flex-wrap:wrap}.dash-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

[hidden]{display:none!important} .chatinput{padding:14px;display:grid;gap:8px}.chatinput textarea{width:100%;resize:vertical;background:var(--card2);color:var(--text);border:1px solid var(--edge);border-radius:8px;padding:10px}.section{min-width:0}.modalbg.show{z-index:1000}

.navs{display:grid;gap:6px}.mobile-logout{display:none}@media(max-width:760px){.navs{display:flex;overflow-x:auto;gap:5px}.mobile-logout{display:inline-block}}

.live-heatmap{min-width:1250px}.live-heatmap .timehead,.live-heatmap .heatrow{grid-template-columns:110px repeat(24,minmax(38px,1fr))}.live-heatmap button{padding:0}

/* Stage 3 uses the existing card, form and notice components. */
.notification-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.notification-settings label{display:flex;flex-direction:column;gap:8px;line-height:1.5}
.notification-settings label:first-child{grid-column:1/-1;flex-direction:row;align-items:center}
.notification-settings .input{max-width:100%;width:100%}
.notification-unread{border-left:3px solid var(--teal)}
#notificationJournal pre{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.notification-settings{grid-template-columns:1fr}}
.voice-file{display:block;font-size:11px;max-width:200px;margin-top:5px}.voice-result{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto}.voice-result:empty{display:none}#voicePreview{display:block;max-width:100%;margin:12px 0}#voicePreview[hidden]{display:none}

/* Live notification cards and local sound controls. */
.bubble.notification{align-self:stretch;max-width:100%;background:var(--card2);border:1px solid var(--amber);padding:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.bubble.notification .notification-title{display:block;color:var(--amber);font-size:11px;margin-bottom:7px}
.bubble.notification .notification-delivery{display:block;color:var(--muted);font-size:10px;margin-top:8px}
.notification-sound-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:end}
.notification-sound-controls input[type=range]{padding:0;height:32px}
@media(max-width:700px){.notification-sound-controls{grid-template-columns:1fr;gap:0}}
