/* Theme (blue + white) */
:root,
[data-bs-theme="light"]{
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: #2563eb;
  --bs-link-hover-color: #1d4ed8;
  --bs-body-bg: #ffffff;
  --bs-body-color: #0f172a;
  --bs-border-color: #e5e7eb;

  --app-surface: #ffffff;
  --app-surface-2: #f8fafc;
  --app-muted: #64748b;
  --app-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --app-shadow-soft: 0 6px 18px rgba(15, 23, 42, .06);
}

.app-body{
  min-height: 100vh;
  background: linear-gradient(180deg, var(--app-surface-2), var(--bs-body-bg));
  color: var(--bs-body-color);
}

.app-watermark::before{
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../img/logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(750px, 70vw);
  opacity: .09;
  pointer-events: none;
  z-index: 0;
}

nav.app-navbar,
main{
  position: relative;
  z-index: 1;
}

.app-navbar{
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-color: rgba(226, 232, 240, .9) !important;
}

.app-logo{
  width: 70px;
  height: 70px;
  display: inline-block;
}

.app-brand-subtitle{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, .22);
  color: rgba(37, 99, 235, .85);
  background: rgba(37, 99, 235, .06);
  margin-left: 6px;
}

.app-card{
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow: var(--app-shadow-soft);
}

.project-card{
  border-radius: 16px;
  transition: transform .12s ease, box-shadow .12s ease;
}

.project-card:hover{
  transform: translateY(-1px);
  box-shadow: var(--app-shadow);
}

.live-summary{ font-size: 15px; }

.dashboard-search{
  width: min(320px, 80vw);
}

.stat-card .card-body{
  padding: 14px 16px;
}

.stat-value{
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
}

.stat-icon{
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(15, 23, 42, .04);
  font-size: 18px;
}

.chart-wrap{
  width: 100%;
}

.app-table thead th{
  color: rgba(15, 23, 42, .72);
  font-weight: 700;
  font-size: 13px;
  border-bottom-color: rgba(226, 232, 240, .95);
}

.app-table td{
  vertical-align: middle;
}

.code-block{
  border-radius: 14px;
  padding: 12px;
  background: #0b1220;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, .25);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  overflow: auto;
}

.status-dot{
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 12px rgba(15,23,42,.12);
}
.dot-ok{ background: #22c55e; }
.dot-warning{ background: #f59e0b; }
.dot-danger{ background: #ef4444; }
.dot-unknown{ background: rgba(100,116,139,.45); }
.dot-disconnected{ background: #94a3b8; }

.border-ok-glow{
  border: 1px solid rgba(34,197,94,.35) !important;
  box-shadow: 0 10px 30px rgba(34,197,94,.08);
}
.border-warning-glow{
  border: 1px solid rgba(245,158,11,.35) !important;
  box-shadow: 0 10px 30px rgba(245,158,11,.09);
}
.border-danger-glow{
  border: 1px solid rgba(239,68,68,.35) !important;
  box-shadow: 0 10px 30px rgba(239,68,68,.10);
}

.pulse{ animation: pulse 1.2s infinite; }
@keyframes pulse{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.02); }
  100%{ transform: scale(1); }
}

.alerts-feed{
  max-height: 280px;
  overflow:auto;
  border-top: 1px solid rgba(226, 232, 240, .95);
}
.alert-item{
  padding: 10px 8px;
  border-bottom: 1px solid rgba(226, 232, 240, .95);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}
