:root {
  --canvas: #0b0f17;
  --surface: #111827;
  --surface-raised: #1e293b;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #94a3b8;
  --ghost: #64748b;
  --indigo: #6366f1;
  --indigo-soft: rgba(99, 102, 241, 0.15);
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --crimson: #ef4444;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--indigo);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
}

h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
}

h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

.ghost {
  color: var(--ghost);
}

.mono {
  font-family: var(--mono);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ghost);
}

/* ---------------------------------------------------------------- layout */

.wrap {
  width: min(1180px, 100% - 3rem);
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--hairline);
  background: rgba(11, 15, 23, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 20px rgba(99, 102, 241, 0.5);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ------------------------------------------------------------- controls */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--indigo);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.button:hover {
  text-decoration: none;
  background: #5558e8;
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button.secondary {
  background: transparent;
  border-color: var(--hairline-strong);
  color: var(--muted);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.button.danger {
  background: transparent;
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--crimson);
}

.button.small {
  height: 30px;
  padding: 0 0.65rem;
  font-size: 12.5px;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ghost);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: rgba(10, 14, 22, 0.85);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: var(--ghost);
}

/* ---------------------------------------------------------------- cards */

.card {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.badge.ok {
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.badge.warn {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

.badge.info {
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.1);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.notice {
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.7rem 0.85rem;
  font-size: 13px;
  color: var(--muted);
}

.notice.error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
}

.notice.success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: #a7f3d0;
}

.notice[hidden] {
  display: none;
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  max-width: 360px;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong);
  background: rgba(30, 41, 59, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.7);
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
}

/* ---------------------------------------------------------------- table */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ghost);
  font-weight: 400;
  padding: 0 0.6rem 0.5rem;
  border-bottom: 1px solid var(--hairline);
}

td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--indigo-soft);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-family: var(--mono);
  font-size: 11px;
  flex: none;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 4rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--ghost);
  font-family: var(--mono);
  font-size: 11.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 640px) {
  .wrap {
    width: min(1180px, 100% - 1.5rem);
  }
}
