/* BMS PREDICT — prototype UI (mobile-first) */
:root{
  --bg:#0b0b15;
  --panel:#121226;
  --panel2:#171733;
  --text:#eef0ff;
  --muted:#aab0d6;
  --accent:#5b2cff;
  --accent2:#a55bff;
  --good:#19c37d;
  --warn:#ffb020;
  --bad:#ff4d4f;
  --line:rgba(255,255,255,.08);
  --shadow:0 10px 30px rgba(0,0,0,.45);
  --radius:18px;
  --radius2:26px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 800px at 70% -10%, rgba(165,91,255,.35), transparent 55%),
              radial-gradient(900px 600px at -10% 40%, rgba(91,44,255,.28), transparent 55%),
              linear-gradient(180deg, #090916 0%, #060610 100%);
  min-height:100vh;
}
#app{min-height:100vh; display:flex; flex-direction:column}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px 10px 14px;
  background: rgba(10,10,20,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.brand{display:flex; gap:10px; align-items:center}
.logo{
  width:40px; height:40px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow: var(--shadow);
  font-weight:800;
}
.title .name{font-weight:800; letter-spacing:.4px}
.title .sub{font-size:12px; color:var(--muted); margin-top:2px}
.actions{display:flex; gap:8px}
.btn{
  border:1px solid var(--line);
  color:var(--text);
  background: rgba(255,255,255,.04);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
}
.btn.primary{
  background: linear-gradient(135deg,var(--accent),var(--accent2));
  border:none;
  font-weight:700;
}
.btn.ghost{padding:10px 12px}
.main{flex:1; padding:14px; padding-bottom:90px}
.view{display:flex; flex-direction:column; gap:12px}
.card{
  background: linear-gradient(180deg, rgba(18,18,38,.95), rgba(18,18,38,.75));
  border:1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .hd{
  padding:14px 14px 10px 14px;
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  border-bottom:1px solid var(--line);
}
.card .hd h3{margin:0; font-size:15px}
.card .hd .meta{font-size:12px; color:var(--muted); margin-top:4px}
.card .bd{padding:14px}
.pills{display:flex; flex-wrap:wrap; gap:8px}
.pill{
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--muted);
  font-size:12px;
}
.kpis{display:grid; grid-template-columns:repeat(3,1fr); gap:10px}
.kpi{
  padding:12px; border-radius:18px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
}
.kpi .v{font-size:18px; font-weight:800}
.kpi .l{font-size:12px; color:var(--muted); margin-top:4px}

.list{display:flex; flex-direction:column}
.item{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  gap:10px;
}
.item:last-child{border-bottom:none}
.item .left{display:flex; flex-direction:column; gap:4px}
.item .t{font-weight:700}
.item .s{font-size:12px; color:var(--muted)}
.badge{
  padding:6px 10px; border-radius:999px;
  font-size:12px; font-weight:700;
}
.badge.good{background:rgba(25,195,125,.15); color:var(--good); border:1px solid rgba(25,195,125,.35)}
.badge.warn{background:rgba(255,176,32,.15); color:var(--warn); border:1px solid rgba(255,176,32,.35)}
.badge.bad{background:rgba(255,77,79,.15); color:var(--bad); border:1px solid rgba(255,77,79,.35)}

.row{display:flex; gap:10px; flex-wrap:wrap}
.row > *{flex:1}

.field{display:flex; flex-direction:column; gap:6px; margin-bottom:12px}
.field label{font-size:12px; color:var(--muted)}
.field input, .field select, .field textarea{
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  color:var(--text);
  padding:12px 12px;
  border-radius:16px;
  outline:none;
}
.field textarea{min-height:84px; resize:vertical}
.help{font-size:12px; color:var(--muted)}

.bottombar{
  position:fixed; left:0; right:0; bottom:0; z-index:20;
  display:flex; gap:8px;
  padding:10px 10px 14px 10px;
  background: rgba(10,10,20,.74);
  backdrop-filter: blur(10px);
  border-top:1px solid var(--line);
}
.tab{
  flex:1;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--muted);
  padding:12px 8px;
  border-radius:16px;
  cursor:pointer;
  font-weight:700;
}
.tab.active{
  color:var(--text);
  border:none;
  background: linear-gradient(135deg,var(--accent),var(--accent2));
}
hr.sep{border:none; border-top:1px solid var(--line); margin:14px 0}
.small{font-size:12px; color:var(--muted)}
.chart{
  width:100%;
  height:160px;
  background: rgba(255,255,255,.02);
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
}
.toast{
  position:fixed; left:14px; right:14px; bottom:88px;
  padding:12px 14px;
  border-radius:18px;
  background: rgba(18,18,38,.92);
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  display:none;
}
.toast.show{display:block}
.toast .ttl{font-weight:800}
.toast .msg{font-size:12px; color:var(--muted); margin-top:4px}

.modal-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.55);
  display:none; align-items:center; justify-content:center; z-index:100;
  padding:16px;
}
.modal-backdrop.show{display:flex}
.modal{
  width:min(520px, 100%);
  background: linear-gradient(180deg, rgba(18,18,38,.98), rgba(18,18,38,.86));
  border:1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal .hd{padding:14px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center}
.modal .bd{padding:14px}
.modal .hd h3{margin:0; font-size:15px}
