:root {
  --red: #d92d20;
  --bg: #f7f7f8;
  --border: #e2e2e6;
  --text: #1a1a1e;
  --muted: #6b6b73;
}

* { box-sizing: border-box; }

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

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
  text-align: center;
}

.login-box h1 { margin: 0 0 4px; }
.subtitle { color: var(--muted); margin: 0 0 20px; }

.login-box input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.login-box button, .filters select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--red);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.error { color: var(--red); font-size: 13px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.topbar h1 { font-size: 18px; margin: 0; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
}

.filters {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
}

.filters select {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
  font-weight: 400;
}

table {
  width: calc(100% - 48px);
  margin: 0 24px 24px;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-aperta { background: #fff3cd; color: #7a5c00; }
.badge-approvata { background: #d4edda; color: #1e6b34; }
.badge-scartata { background: #f1f1f3; color: var(--muted); }
.badge-bug { background: #fde2e1; color: var(--red); }
.badge-richiesta { background: #e0ecff; color: #1d4ed8; }

.row-actions button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 6px;
}

.row-actions .approve { color: #1e6b34; }
.row-actions .discard { color: var(--muted); }

#empty-state { text-align: center; color: var(--muted); padding: 40px; }
