* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #2e2a55;
  background: linear-gradient(135deg, #a8c8ec 0%, #b9c6f2 45%, #f2b8d8 100%);
  background-attachment: fixed;
  min-height: 100dvh;
}
.blob { position: fixed; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0; pointer-events: none; }
.blob.c1 { width: 420px; height: 420px; background: #9fe8e0; top: -120px; right: 10%; }
.blob.c2 { width: 380px; height: 380px; background: #f5a8d0; bottom: -140px; left: 30%; }
.blob.c3 { width: 300px; height: 300px; background: #c4a8f0; top: 40%; left: -100px; }
.blob.c4 { width: 260px; height: 260px; background: #8fb8f0; bottom: 10%; right: -80px; }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 240px; height: 100dvh; z-index: 20;
  background: rgba(255,255,255,.55); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-right: 1px solid rgba(255,255,255,.65);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
}
.logo { font-size: 20px; font-weight: 800; margin: 4px 8px 4px; }
.logo span { background: linear-gradient(90deg, #f43f9e, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo small { display: block; font-size: 11px; font-weight: 600; color: rgba(46,42,85,.62); margin-top: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: #2e2a55; text-decoration: none; font-weight: 600; font-size: 14px; }
.nav-item:hover { background: rgba(255,255,255,.6); }
.nav-item.active { background: linear-gradient(90deg, #f43f9e, #8b5cf6); color: #fff; box-shadow: 0 6px 18px rgba(244,63,158,.35); }
.sidebar .spacer { flex: 1; }
.sidebar .foot { font-size: 11px; color: rgba(46,42,85,.62); padding: 0 8px; }

.main { margin-left: 240px; position: relative; z-index: 1; }
.topbar {
  position: sticky; top: 0; z-index: 15; padding: 14px 28px;
  background: rgba(255,255,255,.5); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.65);
  font-weight: 700; font-size: 15px;
}
.topbar .crumb-sep { color: #d81b74; margin: 0 6px; }
.content { padding: 24px 28px 48px; max-width: 1100px; }

.card {
  background: rgba(255,255,255,.62); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,.65); border-radius: 18px; padding: 20px;
  box-shadow: 0 10px 30px rgba(139,92,246,.12); margin-bottom: 20px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { text-align: left; }
.stat .num { font-size: 28px; font-weight: 800; }
.stat .lbl { font-size: 12px; font-weight: 700; color: rgba(46,42,85,.62); text-transform: uppercase; letter-spacing: .04em; }
h1 { font-size: 22px; margin: 0 0 14px; }
h2 { font-size: 17px; margin: 0 0 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(46,42,85,.08); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: rgba(46,42,85,.62); }
input, select, textarea {
  font: inherit; font-size: 13.5px; color: #2e2a55; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(46,42,85,.18); background: rgba(255,255,255,.8); width: 100%;
}
textarea { min-height: 90px; }
label { display: block; font-size: 12px; font-weight: 700; margin: 10px 0 4px; color: rgba(46,42,85,.75); }
.btn {
  display: inline-block; border: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 13.5px;
  padding: 9px 16px; border-radius: 12px; color: #fff; text-decoration: none;
  background: linear-gradient(90deg, #f43f9e, #8b5cf6); box-shadow: 0 6px 16px rgba(244,63,158,.3);
}
.btn.secondary { background: rgba(255,255,255,.75); color: #2e2a55; box-shadow: none; border: 1px solid rgba(46,42,85,.15); }
.btn.danger { background: linear-gradient(90deg, #e0245e, #b91c4d); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 9px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > div { flex: 1; min-width: 130px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; background: rgba(34,184,216,.18); color: #0e7490; }
.badge.warn { background: rgba(217,119,6,.16); color: #b45309; }
.badge.bad { background: rgba(224,36,94,.14); color: #be1240; }
.badge.ok { background: rgba(14,159,110,.15); color: #047857; }
.notice { padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.65); margin-bottom: 16px; font-size: 14px; }
.muted { color: rgba(46,42,85,.62); font-size: 13px; }
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; padding: 20px; }
.login-card { width: 100%; max-width: 380px; }
details summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar .spacer, .sidebar .foot { display: none; }
  .main { margin-left: 0; }
}
