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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020617;
  color: #e5e7eb;
  line-height: 1.5;
}

/* Top nav */

.topbar {
  background: #020617;
  border-bottom: 1px solid #1f2937;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #facc15;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #facc15;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text span:first-child {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-text span:last-child {
  font-size: 0.7rem;
  color: #9ca3af;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.8rem;
}

.nav-links a {
  text-decoration: none;
  color: #e5e7eb;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a:hover {
  border-color: #4b5563;
}

.nav-links a.active {
  border-color: #facc15;
  color: #facc15;
}

main {
  max-width: 1100px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1rem;
}

/* Cards & layout */

.card {
  background: #020617;
  border-radius: 0.9rem;
  padding: 1rem;
  border: 1px solid #1f2937;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
  margin-bottom: 1rem;
}

.card h1,
.card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.card p.sub {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.7rem;
}

.grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Forms */

form {
  display: grid;
  gap: 0.75rem;
}

label {
  font-size: 0.78rem;
  color: #d1d5db;
  margin-bottom: 0.2rem;
  display: block;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 0.6rem;
  border: 1px solid #374151;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  background: #020617;
  color: #e5e7eb;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 1px #facc15;
}

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

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

/* Buttons */

.btn {
  border-radius: 999px;
  border: none;
  padding: 0.55rem 1.15rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-primary {
  background: #facc15;
  color: #111827;
}

.btn-ghost {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid #374151;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.74rem;
}

.btn:active {
  transform: scale(0.97);
}

/* Lists */

.list {
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid #1f2937;
  margin-top: 0.5rem;
}

.list-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid #111827;
  font-size: 0.8rem;
}

.list-item span {
  display: block;
  color: #9ca3af;
  font-size: 0.72rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: #111827;
  color: #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Helpers */

.muted {
  font-size: 0.78rem;
  color: #9ca3af;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }

textarea.readonly {
  min-height: 200px;
}

/* Small screen nav */

@media (max-width: 600px) {
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
