:root {
  --orange: #e8590c;
  --orange-dark: #c04a09;
  --orange-tint: #fff1e8;
  --ink: #2b2320;
  --line: #eee0d4;
  --white: #ffffff;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
}

header.topbar {
  background: var(--orange);
  color: var(--white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.topbar h1 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.2px;
}

header.topbar .who {
  font-size: 0.85rem;
  opacity: 0.9;
}

nav.tabs {
  display: flex;
  overflow-x: auto;
  background: var(--orange-tint);
  border-bottom: 1px solid var(--line);
}

nav.tabs button {
  flex: 0 0 auto;
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

nav.tabs button.active {
  border-bottom-color: var(--orange);
  color: var(--orange-dark);
  font-weight: 600;
}

main {
  padding: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 1rem;
  margin: 0 0 12px 0;
}

label {
  display: block;
  font-size: 0.85rem;
  margin: 12px 0 4px;
  color: #6b5f57;
}

input, select, button.primary {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

button {
  font-family: inherit;
}

button.primary {
  background: var(--orange);
  color: var(--white);
  border: none;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
}

button.primary:active { background: var(--orange-dark); }

button.secondary {
  background: var(--white);
  color: var(--orange-dark);
  border: 1px solid var(--orange);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 90px 32px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

th { color: #6b5f57; font-weight: 600; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--orange-tint);
  color: var(--orange-dark);
}

.error { color: #b3261e; font-size: 0.85rem; margin-top: 8px; }
.hint { color: #6b5f57; font-size: 0.8rem; margin-top: 4px; }

#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#login-screen .card { width: 100%; max-width: 340px; }

.hidden { display: none !important; }

@media (min-width: 700px) {
  main { padding: 24px; }
}
