body {
  background: #f5f7fb;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #344054;
  min-height: 100vh;
}

/* Sidebar styling matching ecwhatsapp */
.sidebar {
  min-height: calc(100vh - 56px);
  background: #ffffff;
  border-right: 1px solid #e7eaf0;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #344054;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 3px;
  transition: all 0.15s ease-in-out;
}

.sidebar a:hover {
  background: #eef3ff;
  color: #0d6efd;
}

.sidebar a.active {
  background: #eef3ff;
  color: #0d6efd;
  font-weight: 600;
}

.sidebar a i {
  font-size: 1.15rem;
}

/* Stat & Metric cards */
.stat-card, .metric-card {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(16, 24, 40, 0.06);
  background: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.1);
}

.card {
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.card-header {
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
  font-weight: 600;
}

.table {
  vertical-align: middle;
}

.table th {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667085;
}

/* Badges and tags */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* User Account Display in Navbar */
.user-role-badge {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  padding: 0.3rem 0.65rem !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
}

.user-role-badge.role-superadmin {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

.user-account-name {
  color: #ffffff !important;
  font-weight: 500 !important;
  font-size: 0.92rem !important;
  display: inline-flex !important;
  align-items: center !important;
}

.user-account-name i {
  color: #38bdf8 !important;
  font-size: 1.1rem !important;
}

.font-monospace {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/* Status indicator pulse dots */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-indicator.status-up {
  background-color: #198754;
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.25);
}
.status-indicator.status-down {
  background-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}
.status-indicator.status-partial {
  background-color: #ffc107;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25);
}
.status-indicator.status-unknown {
  background-color: #6c757d;
  box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.25);
}

/* Live monitor grid cards */
.monitor-server-card {
  border-radius: 12px;
  transition: all 0.2s ease;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.monitor-server-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.monitor-server-card.border-up {
  border-left: 5px solid #198754;
}
.monitor-server-card.border-down {
  border-left: 5px solid #dc3545;
}
.monitor-server-card.border-partial {
  border-left: 5px solid #ffc107;
}
.monitor-server-card.border-unknown {
  border-left: 5px solid #6c757d;
}

/* Target port badges */
.port-pill {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Dynamic row builders in modal */
.dynamic-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  transition: background 0.15s ease;
}
.dynamic-row:hover {
  background: #f1f5f9;
}

/* Login styling matching ecwhatsapp admin login */
.login-bg {
  background-color: #0f172a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.admin-card {
  width: 100%;
  max-width: 440px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
}
.login-bg .form-control {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
.login-bg .form-control:focus {
  background-color: #0f172a;
  border-color: #3b82f6;
  color: #f8fafc;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}
.login-bg .input-group-text {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
