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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.subtitle {
  color: #666;
  font-size: 1.1rem;
}

.back-link {
  display: inline-block;
  margin-top: 15px;
  color: #0066cc;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Navigation */
.nav-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: #0066cc;
  color: white;
}

.btn-primary:hover {
  background: #0052a3;
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Sections */
.info-section,
.users-section,
.form-section,
.results-section {
  margin-bottom: 30px;
}

.info-section h2,
.users-section h2,
.form-section h2,
.results-section h2 {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.info-section h3 {
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 10px;
}

.info-section ul {
  margin-left: 20px;
}

.info-section li {
  margin-bottom: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.hint {
  font-size: 0.85rem;
  color: #666;
  margin-top: 6px;
  line-height: 1.5;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* Users list */
.user-card {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.user-card strong {
  color: #333;
}

.badge {
  display: inline-block;
  background: #0066cc;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-left: 10px;
}

.passkeys-list {
  margin-top: 10px;
}

.passkey-item {
  font-size: 0.85rem;
  color: #666;
  padding: 5px 0;
  border-top: 1px solid #eee;
}

.credential-id {
  font-family: monospace;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.device-type {
  margin-left: 10px;
  color: #888;
}

.backed-up {
  margin-left: 10px;
  color: #0066cc;
}

.muted {
  color: #888;
  font-style: italic;
}

/* Results */
.results-section {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
}

.results-section details {
  margin-top: 15px;
}

.results-section summary {
  cursor: pointer;
  font-weight: 500;
  padding: 10px;
  background: #eee;
  border-radius: 6px;
}

.results-section summary:hover {
  background: #e0e0e0;
}

.results-section pre {
  background: #1a1a1a;
  color: #0f0;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
  margin-top: 10px;
  max-height: 400px;
  overflow-y: auto;
}

/* Messages */
.message {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.error {
  color: #c00;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
  }

  .nav-buttons {
    flex-direction: column;
  }

  header h1 {
    font-size: 1.5rem;
  }
}
