* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}
a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar h1 { font-size: 18px; margin: 0; flex: 1; }
.topbar nav a { margin-right: 12px; color: #cbd5e1; }
.topbar .user { color: #94a3b8; font-size: 14px; }
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 6px;
}
.role-admin { background: #b91c1c; color: white; }
.role-deployer { background: #1d4ed8; color: white; }
.role-viewer { background: #475569; color: white; }

.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 24px;
}
.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 16px; color: #f1f5f9; }

label { display: block; font-size: 13px; color: #94a3b8; margin-bottom: 4px; }
input, select, button {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #e2e8f0;
}
input:focus, select:focus { outline: 2px solid #3b82f6; outline-offset: -1px; }
input[disabled], select[disabled], button[disabled] { opacity: 0.5; cursor: not-allowed; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; min-width: 180px; flex: 1; }

button {
  background: #3b82f6;
  border: none;
  color: white;
  cursor: pointer;
  font-weight: 600;
}
button:hover:not([disabled]) { background: #2563eb; }
button.danger { background: #b91c1c; }
button.danger:hover:not([disabled]) { background: #991b1b; }
button.secondary { background: #475569; }
button.secondary:hover:not([disabled]) { background: #334155; }

.deploy-buttons { display: flex; gap: 12px; margin-top: 16px; }
.deploy-buttons button { flex: 1; padding: 14px; font-size: 15px; }

.log-output {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  height: 420px;
  overflow-y: auto;
  color: #cbd5e1;
}
.log-status { margin-top: 8px; font-size: 13px; color: #94a3b8; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #334155; }
th { font-weight: 600; color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover td { background: #243248; }
.status-running { color: #facc15; }
.status-success { color: #4ade80; }
.status-failed, .status-error { color: #f87171; }

.login-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { margin: 0 0 16px; font-size: 22px; }

.error-msg { color: #f87171; font-size: 13px; margin-top: 8px; min-height: 18px; }
.info-msg { color: #4ade80; font-size: 13px; margin-top: 8px; min-height: 18px; }
.empty { color: #64748b; font-style: italic; padding: 12px 0; }
