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

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

/* Auth */
#auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-card {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
}

.error {
  background: #fee;
  color: #c00;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#login-form input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

#login-btn {
  background: #2563eb;
  color: #fff;
}

#login-btn:hover {
  background: #1d4ed8;
}

#signup-btn {
  background: #f0f0f0;
  color: #333;
}

#signup-btn:hover {
  background: #e0e0e0;
}

.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid #ddd;
}

.divider span {
  background: #fff;
  padding: 0 12px;
  position: relative;
  color: #999;
  font-size: 13px;
}

.google-btn {
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
  padding: 10px;
}

.google-btn:hover {
  background: #f8f8f8;
}

/* Dashboard */
header {
  background: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

#user-email {
  color: #666;
  font-size: 14px;
}

#logout-btn {
  background: #f0f0f0;
  color: #333;
}

#logout-btn:hover {
  background: #e0e0e0;
}

.controls {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 14px;
  color: #666;
}

.filter-group select,
.filter-group input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

#search-input {
  min-width: 200px;
}

/* Listings Grid */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 0 24px 24px;
}

.listing-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.listing-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.listing-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #eee;
}

.listing-image-placeholder {
  width: 100%;
  height: 200px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

.listing-body {
  padding: 16px;
}

.listing-body h3 {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.listing-body h3 a {
  color: #333;
  text-decoration: none;
}

.listing-body h3 a:hover {
  color: #2563eb;
}

.listing-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.listing-meta .bid {
  font-size: 18px;
  font-weight: 600;
  color: #16a34a;
}

.listing-source {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.listing-source.invaluable {
  background: #dbeafe;
  color: #1e40af;
}

.listing-source.heritage {
  background: #fef3c7;
  color: #92400e;
}

.listing-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.delete-btn {
  background: none;
  color: #999;
  font-size: 13px;
  padding: 4px 8px;
}

.delete-btn:hover {
  color: #dc2626;
}

/* States */
.loading, .empty-state {
  text-align: center;
  padding: 60px 24px;
  color: #666;
}

.empty-state p {
  margin-bottom: 8px;
}

/* Confirmation dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.confirm-dialog {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  max-width: 360px;
  width: 100%;
}

.confirm-dialog p {
  margin-bottom: 16px;
}

.confirm-dialog .btn-group {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.confirm-dialog .btn-cancel {
  background: #f0f0f0;
  color: #333;
}

.confirm-dialog .btn-delete {
  background: #dc2626;
  color: #fff;
}
