* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

/* Login screen */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-card h1 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.login-subtitle { color: #94a3b8; font-size: 14px; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input {
  background: #0f172a; border: 1px solid #475569; border-radius: 6px;
  padding: 10px 14px; color: #e2e8f0; font-size: 14px; text-align: center;
}
.login-form input:focus { outline: none; border-color: #3b82f6; }
.login-form button {
  background: #3b82f6; color: white; border: none; border-radius: 6px;
  padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.login-form button:hover { background: #2563eb; }
.login-error { color: #f87171; font-size: 13px; margin-top: 12px; min-height: 20px; }

.login-help {
  margin-top: 20px; text-align: left; font-size: 13px; color: #94a3b8;
}
.login-help summary {
  cursor: pointer; color: #60a5fa; font-size: 13px;
  text-align: center; list-style: none;
}
.login-help summary::-webkit-details-marker { display: none; }
.login-help summary::before { content: '? '; }
.login-help p { margin-top: 10px; line-height: 1.5; }
.login-help ul { margin: 8px 0 0 16px; line-height: 1.8; }
.login-help code {
  background: #0f172a; padding: 1px 5px; border-radius: 3px; font-size: 12px;
}

/* App header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

header h1 { font-size: 20px; font-weight: 600; }

.sign-out-btn {
  background: transparent; color: #94a3b8; border: 1px solid #475569;
  border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 13px;
}
.sign-out-btn:hover { color: #e2e8f0; border-color: #64748b; }

button.action-btn {
  background: #3b82f6; color: white; border: none; border-radius: 6px;
  padding: 6px 16px; cursor: pointer; font-size: 14px;
}
button.action-btn:hover { background: #2563eb; }
button.danger { background: #ef4444; }
button.danger:hover { background: #dc2626; }

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

table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th { text-align: left; padding: 8px 12px; color: #94a3b8; font-size: 12px; text-transform: uppercase; border-bottom: 1px solid #334155; }
td { padding: 10px 12px; border-bottom: 1px solid #1e293b; font-size: 14px; }
tr:hover { background: #1e293b; }

a.host-link { color: #60a5fa; text-decoration: none; }
a.host-link:hover { text-decoration: underline; }

.status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 12px; font-weight: 500;
}
.status-healthy { background: #065f46; color: #34d399; }
.status-stale { background: #78350f; color: #fbbf24; }
.status-new { background: #1e3a5f; color: #60a5fa; }

.card {
  background: #1e293b; border-radius: 8px; padding: 16px; margin-top: 16px;
  border: 1px solid #334155;
}
.card h3 { margin-bottom: 8px; font-size: 16px; }

.install-cmd {
  background: #0f172a; border: 1px solid #334155; border-radius: 6px;
  padding: 12px; font-family: monospace; font-size: 13px;
  word-break: break-all; margin-top: 8px; position: relative;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px; background: #475569;
  border: none; color: white; border-radius: 4px; padding: 4px 8px;
  font-size: 11px; cursor: pointer;
}

.timeline {
  margin-top: 16px; border-left: 2px solid #334155; padding-left: 16px;
}
.timeline-entry { margin-bottom: 16px; }
.timeline-entry .time { color: #94a3b8; font-size: 12px; }
.timeline-entry .change { font-size: 14px; margin-top: 4px; }

.setup-steps {
  margin-top: 16px; font-size: 13px; color: #cbd5e1; line-height: 1.7;
}
.setup-steps ol, .setup-steps ul {
  margin: 6px 0 6px 20px;
}
.setup-steps li { margin-bottom: 4px; }
.setup-steps code {
  background: #0f172a; padding: 1px 5px; border-radius: 3px; font-size: 12px;
}
.setup-steps strong { color: #e2e8f0; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.form-group input {
  width: 100%; background: #0f172a; border: 1px solid #475569;
  border-radius: 6px; padding: 8px 12px; color: #e2e8f0; font-size: 14px;
}

.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-content {
  background: #1e293b; border: 1px solid #334155; border-radius: 12px;
  padding: 24px; width: 100%; max-width: 640px; max-height: 90vh;
  overflow-y: auto;
}
