:root {
  --sidebar-bg: #1a1a2e;
  --sidebar-hover: #16213e;
  --accent: #0f3460;
  --accent-light: #e94560;
}

body { background: #f0f2f5; }

#sidebar {
  min-height: 100vh;
  width: 240px;
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

#sidebar .nav-link:hover { background: var(--sidebar-hover); }
#sidebar .nav-link.active { background: var(--accent-light) !important; }
#sidebar .sidebar-logo { max-height: 36px; max-width: 120px; object-fit: contain; }

#page-content { min-height: 100vh; overflow-x: hidden; }

.card { border: none; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.card-header { border-radius: 12px 12px 0 0 !important; background: #fff; border-bottom: 1px solid #eee; font-weight: 600; }

.stat-card { border-radius: 12px; color: #fff; padding: 20px 24px; }
.stat-card .stat-icon { font-size: 2.2rem; opacity: .8; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; }
.stat-card .stat-label { font-size: .85rem; opacity: .85; }

.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #888; font-weight: 600; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8f9ff; }

.badge { font-size: .75rem; font-weight: 500; padding: .35em .6em; }

.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }

/* Login page */
.login-wrapper { min-height: 100vh; background: var(--sidebar-bg); display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 420px; border-radius: 16px; }
.login-card .card-header { background: var(--sidebar-bg); color: #fff; text-align: center; padding: 28px; border-radius: 16px 16px 0 0 !important; }

/* Template editor */
.template-editor { font-family: monospace; font-size: 13px; min-height: 400px; }
.tag-pill { display: inline-block; background: #e8f0fe; color: #1a73e8; border-radius: 4px; padding: 2px 8px; font-size: .78rem; cursor: pointer; margin: 2px; font-family: monospace; }
.tag-pill:hover { background: #1a73e8; color: #fff; }

/* Uptime indicator */
.uptime-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.uptime-dot.online  { background: #28a745; box-shadow: 0 0 0 3px rgba(40,167,69,.2); }
.uptime-dot.offline { background: #dc3545; box-shadow: 0 0 0 3px rgba(220,53,69,.2); }
.uptime-dot.warning { background: #ffc107; }
.uptime-dot.unknown { background: #adb5bd; }

/* Responsive */
@media (max-width: 768px) {
  #sidebar { display: none !important; }
  #page-content { width: 100% !important; }
}
