:root {
  color-scheme: dark;
  --bg: #0c1016;
  --surface: #161d27;
  --surface-hover: #1e2835;
  --border: #2c3848;
  --text: #e8eef6;
  --muted: #93a0b0;
  --accent: #3d7eff;
  --success: #3dba7a;
  --warning: #e2b15a;
  --danger: #e06a6a;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  --pad: 16px;
  --font: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
}

body { min-height: 100vh; }

h1, h2, h3, p, strong, code, td { overflow-wrap: anywhere; }

h1 { font-size: 1.45rem; line-height: 1.2; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0; }

a { color: inherit; }

.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
}

.card:hover { background: var(--surface-hover); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.btn-secondary {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--text);
}

.btn-danger { background: var(--danger); color: white; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-small { min-height: 44px; padding: 8px 12px; font-size: 0.95rem; }

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-active { background: rgba(61, 186, 122, 0.18); color: var(--success); }
.badge-pending { background: rgba(226, 177, 90, 0.18); color: var(--warning); }
.badge-failed, .badge-expired, .badge-danger { background: rgba(224, 106, 106, 0.18); color: var(--danger); }
.badge-disabled { background: var(--surface-hover); color: var(--muted); }
.badge-ready { background: rgba(61, 126, 255, 0.18); color: #9ec1ff; }
.badge-mock { background: rgba(147, 160, 176, 0.16); color: var(--muted); }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

textarea { min-height: 120px; resize: vertical; }

label { display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; }

label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--text);
}

label.check input { width: 20px; height: 20px; min-height: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
