:root {
  --bg: #14182e;
  --card: #fff8e7;
  --text: #171321;
  --muted: #5b5470;
  --border: #171321;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --accent: #ffcf3f;
  --radius: 0px;
}

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

body {
  font-family: "Courier New", ui-monospace, monospace;
  background:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 16px 16px;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, .btn, .badge, th {
  font-family: "Courier New", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: 8px 8px 0 #000;
}

.brand h1 { font-size: 1.35rem; font-weight: 900; text-shadow: 2px 2px 0 var(--accent); }
.brand p { font-size: 0.875rem; color: var(--muted); font-weight: 700; }

.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 800;
  padding: 6px 12px;
  border: 3px solid var(--border);
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  text-transform: uppercase;
}
.nav-links a.active, .nav-links a:hover {
  background: var(--accent);
  color: var(--text);
}

.card {
  background: var(--card);
  border: 4px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 8px 8px 0 #000;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 3px solid var(--border);
  border-radius: 0;
  box-shadow: 4px 4px 0 #000;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.05s steps(2), box-shadow 0.05s steps(2);
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: #fff; color: var(--text); }
.btn-outline:hover { background: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 3px solid var(--border);
  border-radius: 0;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  background: #fff;
  box-shadow: inset 3px 3px 0 rgba(0,0,0,0.08);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--accent);
  border-color: var(--border);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--border);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 2px 2px 0 #000;
}
.badge-success { background: #bbf7d0; color: #14532d; }
.badge-warning { background: #fde68a; color: #713f12; }
.badge-danger { background: #fecaca; color: #7f1d1d; }
.badge-info { background: #bfdbfe; color: #1e3a8a; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.alert {
  padding: 12px 16px;
  border: 3px solid var(--border);
  box-shadow: 4px 4px 0 #000;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.alert-error { background: #fecaca; color: #7f1d1d; }
.alert-success { background: #bbf7d0; color: #14532d; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border: 2px solid var(--border); }
th { font-weight: 900; color: var(--text); background: var(--accent); font-size: 0.8rem; }

.hidden { display: none !important; }

.pixel-title { text-shadow: 3px 3px 0 var(--accent); }
.pixel-panel { border: 4px solid var(--border); box-shadow: 8px 8px 0 #000; background: var(--card); }
