
/* =========================================================
   ADSTERRA ANALYTICS — MODERN COMMAND UI V7
   Solid premium dashboard — no glass / no blur
   ========================================================= */

:root{
  --bg:#07111f;
  --bg-soft:#0b1728;
  --surface:#101e31;
  --surface-2:#13243a;
  --surface-3:#172a42;
  --border:#203a55;
  --border-2:#2b4b6c;

  --text:#f4f8ff;
  --muted:#91a4b8;
  --muted-2:#6f849a;

  --blue:#35b9ff;
  --blue-2:#168ee0;
  --cyan:#57d6ff;
  --green:#50d6aa;
  --red:#ff647c;
  --yellow:#ffc857;

  --shadow:0 14px 34px rgba(0,0,0,.28);
  --shadow-soft:0 7px 20px rgba(0,0,0,.20);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%;background:var(--bg);color:var(--text)}
body{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  overflow-x:hidden;
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}

/* ===== TOP BAR ===== */
.topbar{
  height:72px;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:0 24px;
  background:#0b1728!important;
  border-bottom:1px solid var(--border)!important;
  position:sticky;
  top:0;
  z-index:50;
}

.topbar-left,.top-actions{
  display:flex;
  align-items:center;
  gap:13px;
}

.top-title{
  font-size:18px;
  font-weight:800;
  letter-spacing:-.02em;
  color:#fff!important;
}
.credit-small{
  margin-top:2px;
  color:#8ea2b7!important;
  font-size:11px;
}
.credit-small b{color:#59c9ff!important}

.icon-btn{
  width:38px;
  height:38px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:11px!important;
  border:1px solid var(--border-2)!important;
  background:#13263d!important;
  color:#dff5ff!important;
  box-shadow:none!important;
}
.icon-btn:hover{
  background:#193450!important;
  border-color:#39769f!important;
  transform:none!important;
}

.top-actions select{
  height:38px;
  min-width:130px;
  padding:0 34px 0 12px;
  background:#13263d!important;
  border:1px solid var(--border-2)!important;
  color:#eaf5ff!important;
  border-radius:11px!important;
}
.refresh-btn{
  height:38px;
  padding:0 16px;
  background:#32b7f3!important;
  border:1px solid #54c8fa!important;
  color:#03101c!important;
  font-weight:800;
  border-radius:11px!important;
  box-shadow:0 5px 16px rgba(53,185,255,.18)!important;
}
.refresh-btn:hover{
  background:#5dcbfa!important;
  transform:translateY(-1px)!important;
}

/* ===== LAYOUT ===== */
.layout{
  display:flex;
  min-height:calc(100vh - 72px);
  background:#081322;
}

.sidebar{
  width:228px;
  flex:0 0 228px;
  padding:22px 16px;
  background:#0c192b!important;
  border-right:1px solid var(--border)!important;
}

.nav-item{
  width:100%;
  min-height:48px;
  margin-bottom:9px;
  padding:0 15px;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  border-radius:12px!important;
  background:#0f2136!important;
  border:1px solid #1c3852!important;
  color:#9eb2c7!important;
  font-weight:650;
  box-shadow:none!important;
}
.nav-item:hover{
  background:#142b45!important;
  color:#e8f7ff!important;
  border-color:#2b5879!important;
  transform:none!important;
}
.nav-item.active{
  background:linear-gradient(135deg,#1a9fe5,#247ac5)!important;
  color:#fff!important;
  border-color:#4bc6ff!important;
  box-shadow:0 8px 20px rgba(27,157,225,.20)!important;
}

/* ===== CONTENT ===== */
.content{
  min-width:0;
  flex:1;
  padding:30px 34px 42px;
  background:
    radial-gradient(700px 360px at 100% 0%,rgba(28,104,190,.12),transparent 65%),
    #081322!important;
}

.page{max-width:1280px;margin:0 auto}
.page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:22px;
}
.page-head h1{
  margin:0;
  font-size:29px;
  line-height:1.15;
  letter-spacing:-.04em;
  color:#f4f8ff!important;
}
.page-head .muted{
  margin:8px 0 0;
  color:var(--muted)!important;
  font-size:13px;
}
.status{
  flex:0 0 auto;
  margin-top:2px;
  padding:8px 13px;
  border-radius:999px!important;
  background:#102b40!important;
  border:1px solid #24516f!important;
  color:#70d5ff!important;
  font-size:11px;
  font-weight:700;
}

/* ===== TOTAL EARNINGS ===== */
.total-earnings-mini{
  min-height:82px;
  margin-bottom:14px;
  padding:0 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  background:#102238!important;
  border:1px solid #24445f!important;
  border-left:4px solid var(--blue)!important;
  border-radius:15px!important;
  box-shadow:var(--shadow-soft)!important;
}
.total-earnings-mini > div{
  display:flex;
  align-items:baseline;
  gap:18px;
}
.total-earnings-mini span{
  color:#8fa5ba!important;
  font-size:12px;
  font-weight:650;
}
.total-earnings-mini strong{
  color:#4ec5ff!important;
  font-size:25px;
  letter-spacing:-.03em;
}
.total-earnings-mini small{
  color:#72889e!important;
  font-size:11px;
}

/* ===== MONITOR CARDS ===== */
.monitor-grid{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
  margin:0 0 22px!important;
}
.monitor-card{
  position:relative;
  width:100%!important;
  min-height:91px;
  padding:17px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  background:#101f32!important;
  border:1px solid #203b56!important;
  border-radius:15px!important;
  box-shadow:var(--shadow-soft)!important;
  overflow:hidden;
}
.monitor-card:hover{
  border-color:#2f597b!important;
  background:#12243a!important;
  transform:translateY(-1px)!important;
}
.monitor-card:before{
  content:"";
  position:absolute;
  left:0;
  top:15px;
  bottom:15px;
  width:3px;
  border-radius:0 4px 4px 0;
  background:var(--blue);
}
.monitor-main{
  display:flex;
  align-items:center;
  gap:24px;
  min-width:0;
}
.monitor-main span{
  min-width:105px;
  color:#a2b5c7!important;
  font-size:13px;
  font-weight:650;
}
.monitor-main strong{
  color:#f5f9ff!important;
  font-size:25px;
  line-height:1;
  letter-spacing:-.035em;
}
.monitor-meta{
  display:flex;
  align-items:center;
  gap:16px;
  white-space:nowrap;
}
.monitor-meta small{
  color:#7e95aa!important;
  font-size:11px;
}
.monitor-meta em{
  color:#59d8b0!important;
  font-style:normal;
  font-size:11px;
  font-weight:650;
}

/* ===== PANELS ===== */
.panel{
  background:#0f1e31!important;
  border:1px solid #203b56!important;
  border-radius:16px!important;
  box-shadow:var(--shadow)!important;
}
.panel-head{
  min-height:64px;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  border-bottom:1px solid #1b334b;
}
.panel-head h2{
  margin:0;
  font-size:16px;
  color:#edf6ff!important;
}
.panel-head span{
  color:#71869a!important;
  font-size:11px;
}

.chart-panel{overflow:hidden}
.chart-wrap{
  height:350px;
  padding:16px 18px 12px;
}
.chart-wrap canvas{max-width:100%!important}

/* ===== MINI STATS ===== */
.mini-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.mini-card{
  min-height:100px;
  padding:18px 20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:#101f32!important;
  border:1px solid #203b56!important;
  border-radius:15px!important;
  box-shadow:var(--shadow-soft)!important;
}
.mini-card span{
  color:#7e94a8!important;
  font-size:11px;
}
.mini-card strong{
  color:#4ebeff!important;
  font-size:23px;
}

/* ===== FORMS ===== */
.filters{
  padding:18px;
  display:flex;
  align-items:end;
  gap:12px;
  margin-bottom:15px;
}
.filters label{
  display:flex;
  flex-direction:column;
  gap:7px;
  color:#8da2b6;
  font-size:11px;
  font-weight:650;
}
input,select,textarea{
  min-height:42px;
  padding:0 12px;
  background:#0a1829!important;
  color:#edf7ff!important;
  border:1px solid #25425c!important;
  border-radius:10px!important;
  outline:none!important;
  box-shadow:none!important;
}
textarea{padding-top:11px}
input:focus,select:focus,textarea:focus{
  border-color:#37baff!important;
  box-shadow:0 0 0 3px rgba(53,185,255,.10)!important;
}

.primary-btn{
  min-height:42px;
  padding:0 17px;
  background:#168fda!important;
  border:1px solid #35b9ff!important;
  color:#fff!important;
  font-weight:750;
  border-radius:10px!important;
  box-shadow:0 7px 17px rgba(22,143,218,.18)!important;
}
.primary-btn:hover{
  background:#22a7f1!important;
  transform:translateY(-1px)!important;
}

.add-account{
  padding:18px;
  display:grid;
  grid-template-columns:1fr 1.5fr auto;
  gap:11px;
}
.account-message{
  grid-column:1/-1;
  margin:0;
  padding:10px 12px;
  border-radius:9px;
  font-size:11px;
}
.account-message.info{
  color:#7ed9ff;
  background:#0c2940;
  border:1px solid #1d5273;
}
.account-message.error{
  color:#ff8797;
  background:#351c27;
  border:1px solid #6d3040;
}

/* ===== TABLES ===== */
.table-panel{overflow:hidden}
.table-scroll{overflow:auto}
table{
  width:100%;
  border-collapse:collapse!important;
}
th{
  padding:14px 15px;
  background:#13253a!important;
  color:#8fa6ba!important;
  font-size:11px;
  font-weight:700;
  text-align:left;
  border-bottom:1px solid #24415b!important;
}
td{
  padding:14px 15px;
  color:#d9e7f3!important;
  font-size:12px;
  border-bottom:1px solid #1b3349!important;
}
tbody tr:hover{background:#12283e!important}

/* ===== FOOTER ===== */
footer{
  margin-top:26px;
  padding:20px 0 4px;
  color:#61778c!important;
  text-align:center;
  font-size:11px;
}
footer strong{color:#72cfff!important}

/* ===== ACCOUNTS LIST ===== */
#accountsList{
  margin-top:14px;
  display:grid;
  gap:10px;
}
#accountsList > *{
  background:#101f32!important;
  border:1px solid #203b56!important;
  border-radius:13px!important;
}

/* ===== RESPONSIVE ===== */
@media(max-width:900px){
  .topbar{padding:0 15px}
  .sidebar{width:190px;flex-basis:190px}
  .content{padding:24px 20px 35px}
  .add-account{grid-template-columns:1fr}
  .account-message{grid-column:auto}
}

@media(max-width:680px){
  .topbar{height:auto;min-height:64px;padding:11px 12px;align-items:center}
  .topbar-left{gap:9px}
  .top-title{font-size:15px}
  .credit-small{font-size:9px}
  .top-actions{gap:6px}
  .top-actions select{min-width:90px;width:90px;padding-left:8px}
  .refresh-btn{padding:0 10px;font-size:11px}
  .top-actions .icon-btn{width:34px;height:34px}

  .layout{display:block;min-height:calc(100vh - 64px)}
  .sidebar{
    width:100%;
    padding:9px 10px;
    display:flex;
    gap:7px;
    overflow-x:auto;
    border-right:0!important;
    border-bottom:1px solid var(--border)!important;
  }
  .nav-item{
    flex:0 0 auto;
    width:auto;
    min-height:38px;
    margin:0;
    padding:0 11px;
    font-size:11px;
  }

  .content{padding:20px 13px 30px}
  .page-head{margin-bottom:17px}
  .page-head h1{font-size:23px}
  .status{font-size:9px;padding:7px 9px}

  .total-earnings-mini{
    min-height:72px;
    padding:0 15px;
  }
  .total-earnings-mini > div{gap:11px}
  .total-earnings-mini strong{font-size:21px}
  .total-earnings-mini span{font-size:10px}
  .total-earnings-mini small{font-size:9px}

  .monitor-card{
    min-height:78px;
    padding:14px 15px;
  }
  .monitor-main{gap:12px}
  .monitor-main span{min-width:82px;font-size:11px}
  .monitor-main strong{font-size:21px}
  .monitor-meta{gap:7px}
  .monitor-meta small,.monitor-meta em{font-size:9px}

  .panel-head{min-height:55px;padding:0 13px}
  .panel-head h2{font-size:14px}
  .chart-wrap{height:270px;padding:10px}

  .mini-grid{grid-template-columns:1fr;gap:10px}
  .mini-card{min-height:82px}

  .filters{display:grid;grid-template-columns:1fr}
}

@media(max-width:420px){
  .top-actions select{display:none}
  .page-head{align-items:flex-start}
  .page-head .status{margin-top:0}
  .monitor-card{padding:13px}
  .monitor-main span{min-width:70px}
  .monitor-meta{display:none}
}
