* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #0f1116;
  color: #e6e8eb;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #21242c;
  background: #161922;
}
h1 { margin: 0; font-size: 18px; font-weight: 600; }
.actions { display: flex; gap: 8px; }
button {
  background: #2563eb;
  color: white;
  border: 0;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { background: #1d4ed8; }
button.secondary { background: #374151; }
button.secondary:hover { background: #4b5563; }
button.danger { background: #b91c1c; }
button.danger:hover { background: #991b1b; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

main { padding: 24px; max-width: 1100px; margin: 0 auto; }

#status-bar {
  min-height: 24px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #9ca3af;
}
#status-bar.error { color: #f87171; }
#status-bar.success { color: #4ade80; }

table { width: 100%; border-collapse: collapse; background: #161922; border-radius: 8px; overflow: hidden; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #21242c; font-size: 14px; }
th { font-weight: 500; color: #9ca3af; background: #11141b; }
tr:last-child td { border-bottom: 0; }
.actions-col { text-align: right; min-width: 320px; }
.actions-col .button-row { display: inline-flex; gap: 6px; }
.actions-col button { padding: 6px 10px; font-size: 12px; }

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill.running { background: #064e3b; color: #6ee7b7; }
.status-pill.stopped { background: #374151; color: #d1d5db; }
.status-pill.starting { background: #422006; color: #fbbf24; }
.status-pill.expired, .status-pill.unknown { background: #450a0a; color: #fca5a5; }

.loading { text-align: center; color: #6b7280; padding: 24px; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: #161922;
  padding: 32px;
  border-radius: 10px;
  width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.login-card h1 { margin: 0 0 20px; font-size: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #9ca3af; }
.login-card input {
  background: #0f1116;
  border: 1px solid #21242c;
  border-radius: 6px;
  color: #e6e8eb;
  padding: 10px 12px;
  font-size: 14px;
}
.login-card input:focus { outline: 2px solid #2563eb; outline-offset: 0; border-color: transparent; }
.login-card button { margin-top: 4px; padding: 10px; }
.error-banner {
  background: #450a0a;
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}
.success-banner {
  background: #064e3b;
  color: #6ee7b7;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin: 12px 0;
}

.tool-card {
  margin-top: 32px;
  background: #161922;
  border-radius: 8px;
  padding: 24px;
}
.tool-card h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.tool-card .muted { color: #9ca3af; font-size: 13px; }
.tool-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; max-width: 480px; }
.tool-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #9ca3af; }
.tool-card input {
  background: #0f1116;
  border: 1px solid #21242c;
  border-radius: 6px;
  color: #e6e8eb;
  padding: 10px 12px;
  font-size: 14px;
}
.tool-card input:focus { outline: 2px solid #2563eb; outline-offset: 0; border-color: transparent; }
.tool-card button { align-self: flex-start; }
#tester-result { margin-top: 16px; }
.screenshot {
  max-width: 100%;
  border: 1px solid #21242c;
  border-radius: 6px;
  margin-top: 8px;
  display: block;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  background: #374151;
}
.nav-link:hover { background: #4b5563; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 16px;
  background: #161922;
  border-radius: 8px;
}
.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  min-width: 160px;
}
.filter-bar label.grow { flex: 1; min-width: 220px; }
.filter-bar select,
.filter-bar input {
  background: #0f1116;
  border: 1px solid #21242c;
  border-radius: 6px;
  color: #e6e8eb;
  padding: 8px 10px;
  font-size: 13px;
}
.filter-bar select:focus,
.filter-bar input:focus {
  outline: 2px solid #2563eb;
  outline-offset: 0;
  border-color: transparent;
}

.tag-chip {
  display: inline-block;
  padding: 1px 8px;
  margin: 1px 2px;
  border-radius: 10px;
  font-size: 11px;
  background: #1f2937;
  color: #cbd5e1;
}

.muted { color: #6b7280; }
