* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f6f8fa;
  color: #1f2328;
}

.container {
  max-width: 1320px;
  margin: 24px auto;
  padding: 0 16px 32px;
}

h1 {
  margin-bottom: 16px;
}

h2 {
  margin: 0 0 10px;
}

.card {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-header h2 {
  margin: 0;
}

.row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.inline-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  padding: 0 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

.inline-control input[type="checkbox"] {
  width: auto;
  margin: 0;
}

button {
  border: 1px solid #1f883d;
  background: #2da44e;
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

button.secondary {
  border-color: #57606a;
  background: #57606a;
}

button.danger {
  border-color: #cf222e;
  background: #cf222e;
}

button.small {
  padding: 6px 10px;
  font-size: 12px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

th,
td {
  border-bottom: 1px solid #d8dee4;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

a {
  color: #0969da;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.message {
  min-height: 20px;
  font-size: 14px;
}

.message.error {
  color: #cf222e;
}

.message.success {
  color: #1a7f37;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.break-all {
  word-break: break-all;
}

.muted {
  color: #57606a;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

.link-box {
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px dashed #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: lowercase;
}

.status-active,
.status-authorized {
  background: #dafbe1;
  color: #1a7f37;
}

.status-disabled,
.status-pending {
  background: #fff8c5;
  color: #9a6700;
}

.status-invalid,
.status-expired,
.status-failed {
  background: #ffebe9;
  color: #cf222e;
}

.empty-row {
  color: #57606a;
  text-align: center;
}

@media (max-width: 900px) {
  .row {
    flex-direction: column;
  }
}
