:root {
  --sidebar-width: 250px;
  --brand: #1f6feb;
  --brand-dark: #14315c;
}

* { box-sizing: border-box; }

body {
  background: #f4f6f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--brand-dark);
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 1030;
  transition: transform .2s ease;
}

.sidebar-brand {
  padding: 1.1rem 1rem;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: .5rem;
}

.sidebar-nav { padding: .5rem 0; }
.sidebar-nav .nav-link {
  color: rgba(255,255,255,.75);
  padding: .65rem 1.1rem;
  display: flex; align-items: center; gap: .6rem;
  font-size: .92rem;
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: .75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.page-content { padding: 1.25rem; }

.stat-card {
  border: none;
  border-radius: .75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-icon { font-size: 1.8rem; opacity: .35; }

.table-card { border: none; border-radius: .75rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.status-dot { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; margin-right: .35rem; }
.status-dot.online { background: #22c55e; }
.status-dot.offline { background: #ef4444; }
.status-dot.unknown { background: #9ca3af; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}
.login-card { width: 100%; max-width: 380px; border: none; border-radius: 1rem; }
