:root {
  --navy: #0b1730;
  --ink: #172033;
  --muted: #6f7b91;
  --line: #e2e8f1;
  --bg: #f3f6fb;
  --primary: #2f64ed;
  --radius: 16px;
}

body {
  background: linear-gradient(135deg, #f7f9fd 0%, #eef3fa 100%);
}

.sidebar {
  width: 272px;
  background: linear-gradient(180deg, #0c1932 0%, #101f3d 62%, #0a152a 100%);
  border-right: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 12px 0 36px rgba(15, 30, 60, .14);
}

.brand {
  height: 96px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-icon {
  background: linear-gradient(135deg, #3c77f5, #7557e8);
  box-shadow: 0 10px 28px rgba(66, 109, 238, .38);
}

.nav-caption {
  display: block;
  padding: 10px 13px 5px;
  color: #6f7f9f;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .15em;
}

.sidebar .nav-link {
  min-height: 48px;
  padding: 8px 10px;
  color: #c1cbdd;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.sidebar .nav-link > i {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
}

.sidebar .nav-link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .06);
}

.sidebar .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .105);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: none;
}

.nav-blue > i { background: linear-gradient(135deg, #3978f6, #2758d5); }
.nav-cyan > i { background: linear-gradient(135deg, #10b9c8, #078699); }
.nav-violet > i { background: linear-gradient(135deg, #8a62ef, #6540ce); }
.nav-amber > i { background: linear-gradient(135deg, #ffb84c, #e38417); }
.nav-slate > i { background: linear-gradient(135deg, #718096, #4c5a6e); }

.sidebar-footer {
  left: 20px;
  right: 20px;
  bottom: 18px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
}

.main { margin-left: 272px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 1025;
  height: 84px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(25, 43, 75, .045);
}

.content { max-width: 1720px; }

.panel,
.metric-card {
  border-color: rgba(207, 216, 231, .82);
  box-shadow: 0 9px 28px rgba(23, 43, 77, .055);
}

.panel-header { border-bottom: 1px solid #edf0f5; }

.metric-card {
  position: relative;
  overflow: hidden;
  border-top-width: 3px;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  opacity: .08;
  background: currentColor;
}

.metric-success { border-top-color: #20ad79; color: #20ad79; }
.metric-queue { border-top-color: #3978f6; color: #3978f6; }
.metric-error { border-top-color: #e44b69; color: #e44b69; }
.metric-volume { border-top-color: #7a55df; color: #7a55df; }
.metric-card > div { color: var(--ink); }
.metric-icon.violet { background: #f2edff; color: #7551d7; }

.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #f7f9fd; }

.btn-primary {
  border-color: #2f64ed;
  background: linear-gradient(135deg, #3d73f2, #2859dc);
  box-shadow: 0 5px 14px rgba(47, 100, 237, .2);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: #2555d6;
  background: linear-gradient(135deg, #3469e8, #204dc8);
}

.modal-content {
  border: 1px solid #e0e6f0;
  box-shadow: 0 24px 70px rgba(10, 25, 52, .25);
}

.modal-header {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #172d56, #25457d);
}

.modal-header .text-secondary { color: #c5d2e9 !important; }
.modal-header .btn-close { filter: invert(1) grayscale(100%); }
.modal-footer { background: #f8fafd; }

@media (min-width: 992px) {
  .sidebar.offcanvas-lg {
    display: flex !important;
    flex-direction: column;
    visibility: visible !important;
    transform: none !important;
    position: fixed !important;
    inset: 0 auto 0 0 !important;
  }
}

@media (max-width: 991.98px) {
  .sidebar { width: 286px; }
  .main { margin-left: 0; }
  .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, .1); }
}
