:root {
  --lb-primary: #2eb85c;
  --lb-primary-dark: #229a4a;
  --lb-blue: #3399ff;
  --lb-purple: #8a63d2;
  --lb-orange: #f9b115;
  --lb-red: #e55353;
  --lb-surface: rgba(255, 255, 255, 0.78);
  --lb-soft: #f3f7fb;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 4%, rgba(51, 153, 255, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(46, 184, 92, 0.15), transparent 30%),
    linear-gradient(135deg, #f5f8fb 0%, #eef6f3 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(34, 154, 74, 0.14);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--lb-primary), var(--lb-blue));
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(46, 184, 92, 0.28);
}

.sidebar {
  --cui-sidebar-bg: #1f2937;
  --cui-sidebar-color: rgba(255, 255, 255, 0.78);
  --cui-sidebar-brand-bg: rgba(0, 0, 0, 0.14);
  --cui-sidebar-nav-link-active-bg: rgba(46, 184, 92, 0.18);
  --cui-sidebar-nav-link-active-color: #fff;
}

.sidebar-brand-full {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.wrapper {
  width: 100%;
  padding-left: var(--cui-sidebar-occupy-start, 16rem);
  transition: padding 0.15s;
}

.header {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.76);
}

.page-body {
  padding: 1.5rem;
}

.page-title {
  font-weight: 900;
  letter-spacing: 0;
}

.stat-card,
.panel-card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.07);
}

.stat-card {
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
}

.metric-number {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
}

.table-title {
  font-weight: 800;
}

.table-subtitle {
  color: var(--cui-secondary-color);
  font-size: 0.875rem;
  line-height: 1.45;
}

.nav-link {
  cursor: pointer;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.form-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--cui-secondary-color);
}

.setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.setting-grid .wide {
  grid-column: 1 / -1;
}

.event-row,
.health-row,
.system-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--cui-border-color);
}

.event-row:last-child,
.health-row:last-child,
.system-row:last-child {
  border-bottom: 0;
}

.icon-tile {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 0.85rem;
  background: rgba(46, 184, 92, 0.1);
  color: var(--lb-primary-dark);
}

.toast-container {
  z-index: 1080;
}

.empty-state {
  border: 1px dashed var(--cui-border-color);
  border-radius: 1rem;
  color: var(--cui-secondary-color);
  padding: 2rem;
  text-align: center;
}

@media (max-width: 991.98px) {
  .wrapper {
    padding-left: 0;
  }

  .page-body {
    padding: 1rem;
  }

  .setting-grid {
    grid-template-columns: 1fr;
  }
}
