:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --muted: #6b7280;
  --border: #d8dbe1;
  --accent: #1e66d0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: #111827;
}
.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  background: #eceef2;
}
.nav-links { margin-top: 24px; }
.nav-item {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: #111827;
  text-decoration: none;
}
.nav-item.active { background: #dfe2e9; font-weight: 600; }
.content { flex: 1; padding: 28px 36px; }
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tabs {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
}
.tab.active {
  color: #111827;
  border-bottom: 2px solid #111827;
  font-weight: 600;
}
.panel {
  margin-top: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.app-list { list-style: none; padding: 0; margin: 0; }
.app-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  background: #f9fafb;
}
.app-name { color: #111827; font-weight: 600; text-decoration: none; }
.muted { color: var(--muted); margin: 6px 0 0; }
.pill {
  border: 1px solid #e8d089;
  background: #fff8da;
  font-size: 13px;
  border-radius: 999px;
  padding: 5px 10px;
}
.overview-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
}
.label { color: var(--muted); }
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
}
.primary:disabled {
  opacity: 0.8;
  cursor: wait;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.full { width: 100%; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hidden { display: none; }
.modal {
  width: 450px;
  background: white;
  border-radius: 12px;
  padding: 18px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}
form { display: flex; flex-direction: column; gap: 8px; }
input, select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.error { color: #b91c1c; margin: 0; }
