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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

header p {
  opacity: 0.9;
}

.auth {
  max-width: 400px;
  margin: 50px auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.auth button {
  padding: 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

.auth button:hover {
  background: #764ba2;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 15px 0 20px;
}

.auth-switch button {
  padding: 10px;
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.auth-switch button.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.offer-card {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
}

.offer-card h3 {
  margin-bottom: 8px;
}

.offer-card p {
  color: #555;
  margin-bottom: 12px;
}

.offer-card button {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.me {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.me-email {
  font-weight: 600;
}

.me-nie {
  font-size: 0.9rem;
  color: #555;
}

.logout {
  padding: 10px 14px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.logout:hover {
  background: #eee;
}

.access-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.access-banner p {
  color: #7c2d12;
}

.access-banner button {
  padding: 10px 14px;
  background: #f97316;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.access-banner button:hover {
  background: #ea580c;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: white;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal h2 {
  margin-bottom: 10px;
}

.modal p {
  color: #444;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-actions button.secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.modal-actions button.secondary:hover {
  background: #eee;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card h3 {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.card .count {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
}

.declarations {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.declarations h2 {
  margin-bottom: 20px;
}

.declarations > button {
  padding: 12px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #f9f9f9;
  font-weight: 600;
}

.pending {
  color: #f59e0b;
  font-weight: 600;
}

.validated {
  color: #10b981;
  font-weight: 600;
}

.rejected {
  color: #ef4444;
  font-weight: 600;
}

td button {
  padding: 6px 12px;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 5px;
}

td button:hover {
  background: #eee;
}
