:root{
  --bg:#070708;
  --panel: rgba(0,0,0,.42);
  --stroke: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);

  --shadow: 0 14px 30px rgba(0,0,0,.55);
  --radius: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);

  /* bg.jpg MUST be in /public/assets/bg.jpg */
  background-image:
    radial-gradient(1200px 600px at 40% 20%, rgba(255,80,80,.10), transparent 55%),
    radial-gradient(900px 500px at 80% 65%, rgba(255,80,80,.08), transparent 60%),
    url("bg.jpg");
  background-size: cover;
  background-position:center;
  background-attachment: fixed;
}

a{ color:inherit; text-decoration:none; }
.cm-app{ padding:14px 14px 22px; }

.cm-shell{
  max-width: 1680px;
  width:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns: 280px minmax(0,1fr) 320px;
  gap:18px;
  align-items:start;
}

.cm-sidebar .cm-sidepanel,
.cm-hud,
.cm-content{
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(0,0,0,.38);
  box-shadow: var(--shadow);
  overflow:hidden;
}

/* brand */
.cm-brand{
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(0,0,0,.50);
  box-shadow: var(--shadow);
  padding:18px 14px;
  margin-bottom:14px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.cm-brand-top{ font-weight:900; font-size:18px; }
.cm-brand-bottom{ font-weight:900; font-size:18px; opacity:.85; margin-top:2px; }

.cm-panel-title{
  background: linear-gradient(180deg, rgba(140,0,0,.65), rgba(40,0,0,.25));
  border-bottom: 1px solid rgba(255,255,255,.10);
  padding:12px 14px;
  font-weight:900;
}

.cm-nav{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.18);
}
.cm-nav:hover{ background: rgba(255,255,255,.04); }
.cm-nav span{ font-weight:650; color: rgba(255,255,255,.92); }

/* icons */
.cm-ico{
  width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.92;
}
.cm-ico svg{
  width:18px;
  height:18px;
  fill: rgba(255,255,255,.88);
}

/* HUD */
.cm-hud-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.cm-hud-left{ display:flex; align-items:center; gap:14px; }
.cm-logo-pill{
  border:1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  padding:10px 12px;
  min-width: 140px;
}
.cm-logo-mini{
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  line-height:1.05;
  opacity:.90;
}

.cm-toplinks{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.cm-toplinks a{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
}
.cm-toplinks a:hover{ background: rgba(255,255,255,.04); }
.cm-toplinks span{ font-weight:700; font-size:13px; }

.cm-timepill{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  padding:10px 12px;
  font-weight:800;
  font-size:13px;
  color: rgba(255,255,255,.86);
}

/* 4 boxes */
.cm-hud-cards{
  display:grid;
  grid-template-columns: 1.2fr 1.2fr 1.2fr 1.35fr;
  gap:14px;
  padding:12px 14px;
}
.cm-mini{
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  background: rgba(0,0,0,.30);
  padding:12px 12px;
  min-height:108px;
}
.cm-mini-row{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  padding:5px 0;
  white-space:nowrap;
}
.cm-mini-row b{
  margin-left:auto;
  font-weight:900;
}

.cm-mini-bars .cm-bars{ display:flex; flex-direction:column; gap:10px; padding-top:4px; }
.cm-bar-row{ display:grid; grid-template-columns: 90px 1fr; gap:10px; align-items:center; }
.cm-bar-label{ font-weight:800; font-size:12px; color: rgba(255,255,255,.82); }
.cm-bar{
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  overflow:hidden;
}
.cm-bar-fill{
  height:100%;
  background: linear-gradient(90deg, rgba(255,90,90,.35), rgba(255,255,255,.12));
}

/* tabs */
.cm-tabs{
  display:flex;
  gap:10px;
  padding:12px 14px 14px;
  border-top:1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.18);
}
.cm-tab{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  font-weight:800;
  color: rgba(255,255,255,.90);
}
.cm-tab:hover{ background: rgba(255,255,255,.04); }

.cm-content{
  margin-top:14px;
  padding:18px;
  min-height:420px;
}

@media (max-width: 1200px){
  .cm-shell{ grid-template-columns: 260px minmax(0,1fr); }
  .cm-sidebar.right{ display:none; }
}
@media (max-width: 860px){
  .cm-shell{ grid-template-columns: 1fr; }
  .cm-sidebar.left{ display:none; }
  .cm-hud-cards{ grid-template-columns: 1fr; }
}
