:root{
  --bg:#0b0f14;
  --card:#111823;
  --card2:#0e1520;
  --text:#e6edf3;
  --muted:#9aa7b4;
  --accent:#3b82f6;
  --border:#1f2a37;
  --border2:#223043;
  --shadow:0 10px 30px rgba(0,0,0,.25);
}

*{box-sizing:border-box}

/* Scope all CP styles to CP pages */
.cp-body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* Make Bootstrap behave nicely on dark background */
.cp-body a{color:inherit}
.cp-body .container-fluid{padding-left:20px;padding-right:20px}

.cp-shell{min-height:100vh;display:flex;flex-direction:column}

.cp-header{
  border-bottom:1px solid var(--border);
  background:rgba(12,18,26,.92);
  backdrop-filter:saturate(1.1) blur(8px);
}
.cp-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
}

.cp-brand{
  display:flex;
  align-items:baseline;
  gap:10px;
  text-decoration:none;
  white-space:nowrap;
}
.cp-brand-title{
  font-weight:700;
  letter-spacing:.2px;
  font-size:18px;
}
.cp-sub{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--border2);
  padding:2px 8px;
  border-radius:999px;
  line-height:1.6;
}

.cp-nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.cp-nav-link{
  display:inline-flex;
  align-items:center;
  height:34px;
  padding:0 10px;
  border-radius:10px;
  text-decoration:none;
  font-size:13px;
  color:var(--muted);
  border:1px solid transparent;
}
.cp-nav-link:hover{
  color:var(--text);
  border-color:var(--border2);
  background:rgba(255,255,255,.03);
}
.cp-nav-link.active{
  color:var(--text);
  border-color:rgba(59,130,246,.45);
  background:rgba(59,130,246,.10);
}
.cp-nav-link.disabled{
  opacity:.45;
  cursor:not-allowed;
}
.cp-nav-sep{
  width:1px;
  height:18px;
  background:var(--border2);
  margin:0 4px;
}

.cp-main{flex:1}
.cp-container{padding-top:22px;padding-bottom:22px}

.cp-page-title{margin-bottom:14px}
.cp-h1{margin:0 0 4px;font-size:20px;font-weight:700}

.cp-footer{
  border-top:1px solid var(--border);
  background:rgba(12,18,26,.65);
}
.cp-footer-inner{padding:12px 0}

.cp-card{
  width:min(860px,100%);
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:22px;
  box-shadow:var(--shadow);
}
.cp-card.compact{width:min(560px,100%)}

h1{margin:0 0 10px;font-size:22px}
.cp-muted{color:var(--muted);line-height:1.45}

.cp-actions{margin-top:16px;display:flex;gap:10px;flex-wrap:wrap}
.cp-btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:40px;padding:0 14px;border-radius:10px;
  background:var(--accent);color:#fff;text-decoration:none;
  font-weight:600;border:1px solid rgba(0,0,0,.0);
}
.cp-btn:hover{filter:brightness(1.05)}
.cp-btn:active{transform:translateY(1px)}
.cp-btn-secondary{
  background:transparent;color:var(--text);
  border:1px solid var(--border2);
}
.cp-btn-secondary:hover{background:rgba(255,255,255,.03)}

@media (max-width: 720px){
  .cp-header-inner{flex-direction:column;align-items:flex-start}
  .cp-nav{justify-content:flex-start}
  .cp-body .container-fluid{padding-left:14px;padding-right:14px}
}


/* CP auth userbox */
.cp-userbox{display:flex;align-items:center;gap:10px}
.cp-userbadge{padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);font-size:12px;white-space:nowrap}
.cp-logout{margin:0}
.cp-logout-btn{border:0;background:transparent;padding:0}
