:root{color-scheme:dark;--bg:#0c1116;--panel:#131b22;--line:#28333d;--muted:#95a5b2;--text:#e8eff3;--green:#b6f77c;--red:#ff8d8d;--amber:#efcc7d}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}main{max-width:1440px;margin:auto;padding:0 40px}header{display:flex;align-items:center;justify-content:space-between;padding:26px 0;border-bottom:1px solid var(--line)}.brand,.header-right{display:flex;align-items:center;gap:16px}.brand strong{letter-spacing:2px;font-size:13px}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:5px}.mark{font-size:24px;font-weight:800;border:1px solid var(--line);padding:7px 10px;border-radius:10px;letter-spacing:-4px}.mark span{color:var(--green)}.paper,.tag{font-size:11px;letter-spacing:1px;padding:7px 10px;border:1px solid var(--line);border-radius:5px}.paper{color:var(--green)}button,input,select{font:inherit;color:var(--text);background:#19232c;border:1px solid var(--line);border-radius:7px;padding:9px 12px}button{cursor:pointer}button:hover{border-color:var(--green)}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--green);outline-offset:3px}button:disabled{opacity:.5;cursor:wait}.intro{display:flex;justify-content:space-between;align-items:center;padding:37px 0 26px}.eyebrow{color:var(--muted);font-size:10px;letter-spacing:2px;font-weight:600}h1{font-size:clamp(25px,3vw,38px);font-weight:550;line-height:1.18;letter-spacing:-1px;margin:12px 0}h1 span{color:var(--muted)}.intro p{color:var(--muted);margin:12px 0 0}.connection{text-align:right;font-size:13px}.connection small{display:block;color:var(--muted);margin-top:9px}.dot{width:8px;height:8px;display:inline-block;border-radius:100%;background:var(--muted);margin-right:7px}.dot.good{background:var(--green);box-shadow:0 0 12px #b6f73333}.dot.warn{background:var(--amber)}.dot.bad{background:var(--red)}.notice{border:1px solid #494232;background:#26241d;color:var(--amber);padding:12px 16px;border-radius:8px;margin-bottom:20px;line-height:1.5}.notice.hidden{display:none}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.metrics article{border:1px solid var(--line);background:var(--panel);padding:20px;border-radius:10px}.metrics article>span{color:var(--muted);font-size:12px}.metrics strong{display:block;font-size:30px;letter-spacing:-1px;margin:12px 0}.metrics small{display:block;color:var(--muted);font-size:10px;line-height:1.6}.positive{color:var(--green)}.negative{color:var(--red)}.overview{display:grid;grid-template-columns:minmax(0,2.25fr) minmax(260px,1fr);gap:22px;margin-bottom:22px}.panel{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:22px}.panel-title{display:flex;justify-content:space-between;gap:16px;align-items:center}h2{font-size:17px;font-weight:550;margin:7px 0}.tag{color:var(--muted);white-space:nowrap}#chart{height:215px;margin-top:20px}#chart svg{width:100%;height:100%;display:block}.chart-footer{display:flex;justify-content:space-between;color:var(--muted);font-size:10px}.phase{color:var(--green);font-size:21px;margin:24px 0 16px}dl{margin:0}dl>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:13px 0;font-size:11px}dt{color:var(--muted)}dd{margin:0;text-align:right}.scanner p{color:var(--muted);font-size:11px;line-height:1.6;overflow-wrap:anywhere}.filters{display:flex;gap:10px;align-items:end}.filters label{display:flex;flex-direction:column;gap:6px;font-size:10px;color:var(--muted)}input{width:165px}select{min-width:100px}.tabs{display:flex;gap:8px;margin:20px 0}.tabs button{font-size:12px;background:transparent}.tabs .active{background:var(--green);border-color:var(--green);color:#142012}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:left;font-size:12px}th{color:var(--muted);font-size:10px;font-weight:500;padding:12px 10px;border-bottom:1px solid var(--line)}td{padding:17px 10px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}td small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.badge{font-size:10px;padding:5px 7px;border:1px solid currentColor;border-radius:4px}.empty{text-align:center;padding:28px;color:var(--muted)}.table-note{font-size:10px;color:var(--muted);margin:16px 0 0}#filtered-count{color:var(--muted);font-size:12px}footer{display:flex;justify-content:space-between;gap:15px;padding:24px 0;color:var(--muted);font-size:10px;line-height:1.6}footer b{font-weight:400}@media(max-width:950px){main{padding:0 20px}.metrics{grid-template-columns:repeat(2,1fr)}.overview{grid-template-columns:1fr}.trades .panel-title{align-items:start;flex-direction:column}.scanner dl{display:grid;grid-template-columns:1fr 1fr;gap:0 25px}.phase{margin-top:14px}}@media(max-width:560px){main{padding:0 14px}header{padding:18px 0}.brand small,.paper{display:none}.brand{gap:9px}.brand strong{font-size:11px;letter-spacing:1px}.intro{display:block;padding-top:25px}.connection{text-align:left;margin-top:23px}.metrics{gap:9px}.metrics article{padding:15px 12px}.metrics strong{font-size:26px}.panel{padding:16px}.filters{width:100%;flex-wrap:wrap;gap:8px}.filters label:first-child{flex:1;min-width:110px}input{width:100%}select{min-width:85px;padding:9px}.scanner dl{display:block}.chart-footer{font-size:9px}footer{flex-direction:column}#chart{height:190px}}


/* ===== SETTINGS PAGE ===== */

.nav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 15px;
  border:1px solid #2c3944;
  border-radius:9px;
  color:#dce6ed;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  letter-spacing:.03em;
}

.nav-link:hover{
  border-color:#637482;
}


.settings-intro{
  margin-bottom:18px;
}


.settings-layout{
  display:grid;
  grid-template-columns:minmax(0,2.2fr) minmax(280px,.8fr);
  gap:16px;
  align-items:start;
}


.settings-panel{
  padding:28px;
}


.settings-side{
  padding:28px;
  position:sticky;
  top:16px;
}


.settings-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:24px;
}


.setting-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:17px;
  border:1px solid #27343e;
  border-radius:11px;
  background:#111a21;
}


.setting-card > span{
  color:#8fa0ad;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:700;
}


.setting-card > strong{
  font-size:15px;
  color:#edf3f6;
}


.setting-card input{
  width:100%;
  box-sizing:border-box;
  padding:12px 13px;
  border-radius:8px;
  border:1px solid #33434f;
  background:#0d151b;
  color:#f3f6f8;
  font-size:18px;
  font-weight:700;
  outline:none;
}


.setting-card input:focus{
  border-color:#8497a6;
}


.setting-card small{
  color:#8495a1;
  line-height:1.45;
  min-height:40px;
}


.settings-actions{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid #26333c;
}


.settings-actions button{
  min-height:42px;
}


.primary-action{
  background:#e8eef2 !important;
  color:#10181e !important;
  border-color:#e8eef2 !important;
  font-weight:800;
}


#save-state{
  color:#8fa0ad;
  font-size:13px;
  margin-left:auto;
}


.settings-side dl{
  margin-top:22px;
}


.settings-warning{
  margin-top:24px;
  padding:17px;
  border:1px solid #32414b;
  border-radius:10px;
  background:#111a21;
}


.settings-warning strong{
  display:block;
  margin-bottom:9px;
  color:#edf3f6;
}


.settings-warning p{
  color:#91a0aa;
  font-size:13px;
  line-height:1.5;
  margin:7px 0 0;
}


.success-notice{
  border-color:#3b5940;
}


.bad-notice{
  border-color:#6f4040;
}


@media(max-width:1000px){

  .settings-layout{
    grid-template-columns:1fr;
  }

  .settings-side{
    position:static;
  }

  .settings-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


@media(max-width:640px){

  .settings-grid{
    grid-template-columns:1fr;
  }

  .settings-panel,
  .settings-side{
    padding:18px;
  }

  .settings-actions{
    align-items:stretch;
    flex-direction:column;
  }

  #save-state{
    margin-left:0;
  }
}



/* ===== FTP DEPLOY ===== */

.deploy-panel{
  margin-top:16px;
  padding:28px;
}

.deploy-description{
  max-width:760px;
  color:#91a0aa;
  line-height:1.55;
}

.deploy-actions{
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:20px;
}

#deploy-message{
  color:#a5b2bb;
  font-size:13px;
}

#deploy-time{
  display:block;
  margin-top:13px;
  color:#71818d;
}

.deploy-success{
  border-color:#49744f !important;
}

.deploy-error{
  border-color:#864747 !important;
  color:#ff9f9f !important;
}

.deploy-validating,
.deploy-restarting,
.deploy-queued{
  border-color:#7a7141 !important;
}

@media(max-width:640px){
  .deploy-actions{
    flex-direction:column;
    align-items:stretch;
  }
}


/* ===== NEWS ===== */

.active-nav{
  border-color:#718491;
  color:#fff;
}


.news-layout{
  display:grid;
  grid-template-columns:minmax(0,2.2fr) minmax(280px,.8fr);
  gap:16px;
  align-items:start;
}


.news-feed,
.news-sources{
  padding:28px;
}


.news-sources{
  position:sticky;
  top:16px;
}


.news-filters{
  display:flex;
  gap:8px;
}


.news-filters select{
  padding:9px 12px;
  border:1px solid #33434f;
  border-radius:8px;
  background:#0d151b;
  color:#dfe8ed;
}


.news-list{
  margin-top:12px;
}


.news-item{
  padding:23px 0;
  border-top:1px solid #27343e;
}


.news-item:first-child{
  border-top:0;
}


.news-item-top,
.news-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}


.news-badges{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}


.news-badge{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:0 8px;
  border:1px solid #35444f;
  border-radius:6px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
}


.impact-high{
  border-color:#835151;
  color:#ffaaaa;
}


.impact-medium{
  border-color:#716a46;
  color:#d8ce91;
}


.sentiment-positive{
  color:#b6f77c;
}


.sentiment-negative{
  color:#ff9d9d;
}


.asset-badge{
  border-color:#3f5667;
  color:#b9d5e7;
}


.news-age{
  color:#81919c;
  font-size:12px;
  white-space:nowrap;
}


.news-source{
  margin-top:14px;
  color:#8da0ad;
  font-size:12px;
  font-weight:700;
}


.news-item h3{
  margin:8px 0;
  color:#edf3f6;
  font-size:20px;
  line-height:1.35;
}


.news-item p{
  max-width:900px;
  margin:0;
  color:#a1b0ba;
  line-height:1.6;
}


.news-bottom{
  margin-top:14px;
  color:#71818c;
  font-size:12px;
}


.news-bottom a{
  color:#c6d5de;
  text-decoration:none;
}


.news-bottom a:hover{
  text-decoration:underline;
}


.news-source-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:15px 0;
  border-bottom:1px solid #27343e;
}


.news-source-row strong,
.news-source-row small{
  display:block;
}


.news-source-row small{
  margin-top:4px;
  color:#788994;
  font-size:10px;
  letter-spacing:.08em;
}


.news-source-health{
  display:flex;
  align-items:center;
  gap:7px;
  color:#8495a0;
  font-size:11px;
}


@media(max-width:1000px){

  .news-layout{
    grid-template-columns:1fr;
  }

  .news-sources{
    position:static;
  }
}


@media(max-width:640px){

  .news-feed,
  .news-sources{
    padding:18px;
  }

  .news-filters{
    flex-direction:column;
  }

  .news-item-top,
  .news-bottom{
    align-items:flex-start;
  }

}
