:root {
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --gray-100: #f3f4f6;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-900: #111827;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.9rem 1.5rem;
  background: var(--gray-900);
  color: white;
}
.topnav a { color: #cbd5e1; text-decoration: none; }
.topnav a:hover { color: white; }
.topnav .brand { font-weight: 700; color: white; }
.topnav .spacer { flex: 1; }
.topnav .who { color: #94a3b8; font-size: 0.9rem; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 { margin-top: 0; }

.controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.controls label { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; }
select {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.stat-card h2 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.03em; }
.big-number { font-size: 2.75rem; font-weight: 800; color: var(--blue); }

.warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
}
.error { color: var(--red); font-weight: 600; }
.success { color: var(--green); font-weight: 600; }
.muted { color: var(--gray-600); font-size: 0.9rem; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; }
.data-table th, .data-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-300);
}
.badge {
  background: var(--green);
  color: white;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.upload-form { display: flex; gap: 0.75rem; align-items: center; margin: 1rem 0 2rem; }

button {
  background: var(--blue);
  color: white;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { opacity: 0.9; }

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.auth-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-card label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.auth-card input[type=text], .auth-card input[type=password] {
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
}
.checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: 500 !important; }
