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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.screen { display: none; text-align: center; max-width: 520px; padding: 2rem; width: 100%; }
.screen.active { display: block; }

h1 { font-size: 2rem; margin-bottom: 0.25rem; color: #f8fafc; }
.subtitle { color: #94a3b8; margin-bottom: 2rem; }

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.25rem; margin-bottom: 0.75rem; color: #f1f5f9; }
.card p { color: #94a3b8; line-height: 1.5; margin-bottom: 1rem; }

.btn {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: #2563eb; }
.btn-secondary { background: #475569; }
.btn-secondary:hover { background: #64748b; }

.download-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1rem; }

.hint { font-size: 0.85rem; color: #64748b; margin-bottom: 0.5rem; }

.install-box {
  display: flex;
  align-items: stretch;
  border: 1px solid #334155;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.install-cmd {
  flex: 1;
  background: #0f172a;
  padding: 0.75rem 1rem;
  font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
  font-size: 0.85rem;
  color: #a5f3fc;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  border: none;
}

.copy-btn {
  background: #334155;
  color: #e2e8f0;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn:hover { background: #475569; }

.self-install { margin-top: 1rem; }
.self-install summary {
  color: #60a5fa;
  cursor: pointer;
  font-size: 0.9rem;
}
.self-install summary:hover { color: #93c5fd; }
.self-install p { margin-top: 0.75rem; }

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #475569;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 1rem;
  margin-bottom: 1rem;
}
input[type="text"]:focus, input[type="password"]:focus {
  outline: none; border-color: #3b82f6;
}

.error { color: #f87171; font-size: 0.9rem; }
.success { color: #34d399; font-size: 0.9rem; }

.tab-bar {
  display: flex; gap: 0; margin-bottom: 0;
  border-bottom: 1px solid #334155;
}
.tab {
  flex: 1; padding: 0.75rem; background: none; border: none;
  color: #94a3b8; font-size: 1rem; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.tab:hover { color: #e2e8f0; }
.tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid #334155;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 1rem auto 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

a { color: #60a5fa; }

.row { display:flex; justify-content:space-between; align-items:baseline;
       padding:0.65rem 0; border-bottom:1px solid #334155; gap:1.5rem }
.label { color:#94a3b8; white-space:nowrap }
.value { color:#f1f5f9; font-family:"SF Mono","Cascadia Code",monospace;
         text-align:right }
.up { color:#4ade80 }
.down { color:#f87171 }

/* Admin */
.admin-link {
  position: fixed; top: 1rem; right: 1rem;
  color: #94a3b8; font-size: 0.85rem; text-decoration: none;
}
.admin-link:hover { color: #94a3b8; }

.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.25rem;
}

.btn-sm {
  display: inline-block; background: #3b82f6; color: #fff;
  padding: 0.35rem 0.75rem; border-radius: 6px; border: none;
  font-size: 0.8rem; cursor: pointer;
  margin-left: 0.4rem;
}
.btn-sm:hover { background: #2563eb; }
.btn-secondary { background: #475569; }
.btn-secondary:hover { background: #64748b; }
.btn-danger { background: #64748b; color: #f87171; }
.btn-danger:hover { background: #475569; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; text-align: left; }
.admin-table th {
  text-align: left; color: #94a3b8; font-weight: 500;
  padding: 0.5rem 0.5rem; border-bottom: 1px solid #334155; white-space: nowrap;
}
.admin-table th:first-child, .admin-table td:first-child { width: 40%; }
.admin-table td {
  padding: 0.5rem 0.5rem; border-bottom: 1px solid #1e293b;
  color: #e2e8f0; text-align: left;
}
.admin-table tr.selected { background: #334155; }
.admin-table tr:hover { background: #1e293b; }
.mono { font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace; font-size: 0.85rem; }

.invite-result {
  background: #0f172a; border-radius: 8px; padding: 1rem;
  margin-top: 1rem;
}
.invite-link-value { word-break: break-all; }
.invite-link-value a { word-break: break-all; }
