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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  padding: 0;
}

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

body.has-range main {
  max-width: 1300px;
}

h1 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 16px;
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  min-height: 54px;
  background: #111;
  border-bottom: 1px solid #222;
  font-size: 14px;
}

nav a {
  color: #aaa;
  text-decoration: none;
}

nav a:hover {
  color: #fff;
}

.nav-spacer {
  flex: 1;
}

.nav-user {
  color: #666;
  font-size: 12px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: #888;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle:hover {
  color: #fff;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a,
.nav-dropdown-menu button,
.nav-dropdown-menu input[type="submit"] {
  display: block;
  width: 100%;
  padding: 10px 16px;
  color: #ccc;
  text-decoration: none;
  font-size: 13px;
  text-align: left;
  background: none;
  border: none;
  border-radius: 0;
  margin: 0;
  cursor: pointer;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu button:hover,
.nav-dropdown-menu input[type="submit"]:hover {
  background: #2a2a2a;
  color: #fff;
  text-decoration: none;
}

.btn-link {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.btn-link:hover {
  color: #fff;
}

/* Cards */
.card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.card h2 {
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* Buttons */
button, .btn {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  margin-right: 8px;
}

button:hover, .btn:hover {
  background: #3a3a3a;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn.primary, button.primary {
  background: #0066cc;
  border-color: #0088ff;
}

.btn.danger, button.danger {
  background: #990000;
  border-color: #cc0000;
}

/* Status badges */
.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.status.disconnected { background: #333; }
.status.scanning, .status.connecting { background: #664400; }
.status.connected { background: #004400; }
.status.error { background: #440000; }
.status.running { background: #004400; }
.status.stopped { background: #333; }
.status.pending, .status.stopping, .status.shutting-down { background: #664400; }
.status.terminated { background: #440000; }

/* Metrics */
.metric {
  display: inline-block;
  margin-right: 20px;
  margin-bottom: 8px;
}

.metric .label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
}

.metric .value {
  font-size: 18px;
  font-weight: 300;
}

/* Log */
#log {
  font-family: monospace;
  font-size: 12px;
  background: #111;
  border: 1px solid #222;
  border-radius: 4px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Selects */
select {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin-right: 8px;
}

/* Auth forms */
.auth-card {
  max-width: 400px;
  margin: 60px auto;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 32px;
}

.auth-logo {
  max-width: 400px;
  margin: 0 auto 16px;
  text-align: center;
}

.auth-logo img {
  width: 100%;
  height: auto;
}

.auth-card h1 {
  margin-bottom: 20px;
  text-align: center;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  padding: 8px 12px;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 14px;
}

.field input:focus {
  outline: none;
  border-color: #0066cc;
}

.actions {
  margin-top: 20px;
}

.actions input[type="submit"], .actions .btn {
  width: 100%;
  padding: 10px;
  font-size: 14px;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.auth-link a {
  color: #4a9eff;
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}

.alert {
  background: #441111;
  border: 1px solid #662222;
  color: #ff8888;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}

.notice {
  background: #114411;
  border: 1px solid #226622;
  color: #88ff88;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #333;
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 8px 10px;
  border-bottom: 1px solid #1a1a1a;
}

tr:hover td {
  background: #1a1a1a;
}

/* Links */
a {
  color: #4a9eff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
