/* Reset + base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  line-height: 1.5;
}

/* ============== PUBLIC OFFER WALL ============== */
.wall-body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem 1rem;
}
.wall-header {
  text-align: center;
  color: white;
  margin-bottom: 2rem;
}
.wall-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.wall-header .subtitle { opacity: 0.9; font-size: 1.1rem; }
.wall-main {
  max-width: 700px;
  margin: 0 auto;
}
.offer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.offer-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.offer-rank {
  font-size: 2rem;
  font-weight: 900;
  color: #667eea;
  min-width: 60px;
}
.offer-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.offer-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
}
.offer-btn {
  background: #667eea;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}
.offer-btn:hover { background: #5568d3; }
.empty {
  background: white;
  padding: 3rem;
  text-align: center;
  border-radius: 12px;
  color: #666;
}
.wall-footer {
  text-align: center;
  color: white;
  opacity: 0.7;
  margin-top: 3rem;
  font-size: 0.9rem;
}

/* ============== AUTH ============== */
.auth-body {
  background: #f5f5f7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 400px;
}
.auth-card h1 { margin-bottom: 1.5rem; text-align: center; }
.auth-card label { display: block; margin-bottom: 1rem; font-weight: 500; font-size: 0.9rem; }
.auth-card input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-top: 0.25rem;
  font-size: 1rem;
}
.auth-card input:focus { outline: none; border-color: #667eea; }

/* ============== ADMIN ============== */
.admin-body { background: #f5f5f7; min-height: 100vh; }
.admin-header {
  background: white;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e5e7;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-header h1 { font-size: 1.4rem; }
.admin-header-actions { display: flex; gap: 0.5rem; }
.admin-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.panel {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.panel h2 { margin-bottom: 1rem; font-size: 1.1rem; }
.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.form-row input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.85rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
}
.form-row input:focus { outline: none; border-color: #667eea; }

/* Table */
.offer-table {
  width: 100%;
  border-collapse: collapse;
}
.offer-table th, .offer-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  vertical-align: middle;
}
.offer-table th {
  background: #fafafa;
  font-weight: 600;
  color: #666;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.offer-table input[type="text"], .offer-table input[type="url"] {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
}
.offer-table input:focus { outline: none; border-color: #667eea; }
.actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.inline-edit { display: contents; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-active { background: #d4f4dd; color: #1a7f37; }
.badge-paused { background: #ffe8d4; color: #9a3412; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-primary { background: #667eea; color: white; width: 100%; padding: 0.75rem; }
.btn-primary:hover { background: #5568d3; }
.btn-secondary { background: #e5e5e7; color: #1a1a1a; }
.btn-secondary:hover { background: #d5d5d7; }
.btn-ghost { background: transparent; color: #666; }
.btn-ghost:hover { background: #f0f0f0; }
.btn-small { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-success { background: #1a7f37; color: white; }
.btn-success:hover { background: #156528; }
.btn-warn { background: #d97706; color: white; }
.btn-warn:hover { background: #b86405; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }

/* Flash */
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.flash-success { background: #d4f4dd; color: #1a7f37; border: 1px solid #86d99a; }
.flash-error { background: #fed7d7; color: #9b1c1c; border: 1px solid #f5a5a5; }

.error { color: #dc2626; margin-bottom: 1rem; padding: 0.5rem; background: #fef2f2; border-radius: 4px; font-size: 0.9rem; }
.muted { color: #888; font-size: 0.9rem; }

/* Mobile */
@media (max-width: 640px) {
  .wall-header h1 { font-size: 2rem; }
  .offer-card { flex-direction: column; text-align: center; }
  .offer-content { flex-direction: column; }
  .admin-header { padding: 1rem; }
  .admin-main { padding: 0 1rem; }
  .offer-table { font-size: 0.8rem; }
  .offer-table th:nth-child(1), .offer-table td:nth-child(1) { display: none; }
}
