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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.6;
}

/* ── Nav ── */

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: #f0f0f0;
  color: #1a1a1a;
}

.nav-link.active {
  background: #1a1a1a;
  color: #fff;
}

/* ── Main ── */

main {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 16px;
}

/* ── Cards ── */

.card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  padding: 24px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

/* ── Forms ── */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: #1a1a1a;
}

/* ── Multi-value inputs ── */

.multi-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.multi-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.multi-input-row input {
  flex: 1;
}

.btn-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  background: #fee;
  color: #c00;
}

.btn-add {
  align-self: flex-start;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: none;
  border: 1px dashed #ccc;
  border-radius: 6px;
  cursor: pointer;
}

.btn-add:hover {
  border-color: #999;
  color: #1a1a1a;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

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

.btn-primary {
  background: #1a1a1a;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #333;
}

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

.btn-secondary:hover:not(:disabled) {
  background: #e0e0e0;
}

.btn-group {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

/* ── Profile list ── */

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.profile-item:hover {
  border-color: #999;
}

.profile-item-name {
  font-weight: 600;
  font-size: 15px;
}

.profile-item-meta {
  font-size: 13px;
  color: #888;
}

.profile-item-arrow {
  color: #ccc;
  font-size: 18px;
}

/* ── Profile view ── */

.profile-header {
  margin-bottom: 20px;
}

.profile-header h2 {
  margin-bottom: 4px;
}

.profile-header .subtitle {
  font-size: 14px;
  color: #888;
}

.profile-section {
  margin-bottom: 20px;
}

.profile-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.profile-section-content {
  font-size: 14px;
  word-break: break-word;
}

/* ── Fields ── */

.field {
  margin-bottom: 6px;
  line-height: 1.6;
}

.field-depth-0 {
  margin-bottom: 10px;
}

.field-label {
  font-weight: 600;
  color: #333;
}

.field-value {
  color: #1a1a1a;
}

.field-nested {
  margin-left: 16px;
  padding-left: 12px;
  border-left: 2px solid #eee;
  margin-top: 4px;
}

.field-list {
  margin: 4px 0 4px 20px;
  padding: 0;
}

.field-list li {
  margin-bottom: 3px;
}

/* ── Tables ── */

.field-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
}

.field-table th {
  text-align: left;
  font-weight: 600;
  color: #555;
  padding: 6px 10px;
  border-bottom: 2px solid #e0e0e0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.field-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.field-table tr:last-child td {
  border-bottom: none;
}

.field-table tr:hover td {
  background: #fafafa;
}

/* ── Status ── */

.status {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 15px;
}

.status.error {
  color: #c00;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Empty state ── */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state p {
  margin-bottom: 16px;
}
