* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0; background: #f5f7fa; color: #1a202c;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
header { background: #1a202c; color: #fff; padding: 18px 0; margin-bottom: 24px; }
header .container { display: flex; align-items: center; justify-content: space-between; }
header h1 { margin: 0; font-size: 20px; font-weight: 600; }
.header-actions { display: flex; gap: 8px; align-items: center; }

.badge {
  padding: 4px 10px; border-radius: 12px; font-size: 12px;
  background: #e53e3e; color: #fff;
}
.badge.ok { background: #38a169; }

.btn {
  padding: 8px 14px; border-radius: 6px; border: none; cursor: pointer;
  background: #3182ce; color: #fff; font-size: 13px; font-weight: 500;
}
.btn:hover { background: #2c5282; }
.btn-secondary { background: #4a5568; }
.btn-secondary:hover { background: #2d3748; }
.btn-danger { background: #c53030; }
.btn-danger:hover { background: #9b2c2c; }

.category-nav {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
}
.category-nav button {
  padding: 6px 14px; border-radius: 999px; border: 1px solid #cbd5e0;
  background: #fff; cursor: pointer; font-size: 13px;
}
.category-nav button.active { background: #3182ce; color: #fff; border-color: #3182ce; }

.alert {
  padding: 12px 16px; border-radius: 6px; margin-bottom: 16px;
  font-size: 14px;
}
.alert.success { background: #c6f6d5; color: #22543d; }
.alert.error { background: #fed7d7; color: #742a2a; }
.hidden { display: none; }

.category-group { margin-bottom: 32px; }
.category-group h2 {
  font-size: 16px; color: #2d3748; margin: 0 0 12px 0;
  padding-bottom: 8px; border-bottom: 2px solid #e2e8f0; text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-card {
  background: #fff; padding: 16px 20px; margin-bottom: 12px;
  border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.setting-card .setting-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.setting-card .setting-key {
  font-family: ui-monospace, monospace; font-size: 13px; color: #1a365d; font-weight: 600;
}
.setting-card .setting-type {
  font-size: 11px; color: #718096; background: #edf2f7;
  padding: 2px 8px; border-radius: 4px; margin-left: 6px;
}
.setting-card .setting-desc {
  font-size: 13px; color: #4a5568; margin: 6px 0 10px 0; line-height: 1.5;
}
.setting-card .setting-meta {
  font-size: 11px; color: #718096; margin-top: 4px;
}
.setting-card .setting-controls {
  display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap;
}
.setting-card input, .setting-card select {
  padding: 7px 10px; border: 1px solid #cbd5e0; border-radius: 5px;
  font-size: 13px; flex: 1; min-width: 180px;
}
.setting-card input:disabled { background: #edf2f7; }
.setting-card .warn-restart {
  color: #c05621; font-size: 11px; margin-left: 8px;
}

.audit-section { margin-top: 40px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.audit-section h2 { font-size: 16px; }
#audit-list {
  margin-top: 16px; font-size: 12px; font-family: ui-monospace, monospace;
}
.audit-row {
  background: #fff; padding: 10px 14px; margin-bottom: 6px; border-radius: 5px;
  border-left: 3px solid #3182ce;
}
.audit-row .audit-key { font-weight: 600; color: #1a365d; }
.audit-row .audit-change { color: #4a5568; margin-top: 2px; }
