/* Reset & Base */
* { 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;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 8px;
}

.logo { font-size: 24px; font-weight: 700; }

/* Cards */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.picker-card { text-align: center; padding: 40px 20px; }

.picker-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.picker-buttons .btn-xl {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
}

#pick-good-btn { background: #f59e0b; }
#pick-good-btn:hover { background: #d97706; }

.btn-premium { background: #7c3aed; color: #fff; }
.btn-premium:hover { background: #6d28d9; }

.premium-tag {
  display: inline-block;
  background: #7c3aed;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.btn-secondary:hover { background: #e5e7eb; }

.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: #22c55e; color: #fff; }
.btn-success:hover { background: #16a34a; }

.btn-cancel { background: transparent; color: #6b7280; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xl {
  padding: 20px 48px;
  font-size: 20px;
  font-weight: 600;
  border-radius: 16px;
}
.btn-block { width: 100%; text-align: center; }

/* Result Card */
.result-card {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-radius: 12px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.result-card .restaurant-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1f2937;
}

.result-tag {
  display: inline-block;
  background: #4f46e5;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.result-card .info-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.result-card .info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #4b5563;
}

.result-card .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Forms */
.restaurant-form { margin-top: 16px; }

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.form-actions { display: flex; gap: 12px; margin-top: 16px; }

.form-hint { font-size: 13px; color: #9ca3af; margin-top: 12px; }

/* Public Restaurant List */
.public-restaurant-item {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.public-restaurant-item:last-child { border-bottom: none; }

.public-restaurant-name {
  font-weight: 600;
  font-size: 15px;
  color: #1f2937;
}

.public-restaurant-details {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 13px;
  color: #9ca3af;
}

/* Tables */
.restaurant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.restaurant-table th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 2px solid #e5e7eb;
  color: #6b7280;
  font-weight: 600;
  font-size: 13px;
}

.restaurant-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f3f4f6;
}

.restaurant-table .actions-cell { display: flex; gap: 6px; }

/* Pending Items */
.pending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.pending-item:last-child { border-bottom: none; }

.pending-info { flex: 1; }
.pending-info .name { font-weight: 600; font-size: 15px; }
.pending-info .details { font-size: 13px; color: #9ca3af; margin-top: 4px; }
.pending-info .submitter { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.pending-actions { display: flex; gap: 8px; margin-left: 12px; }

/* Badge */
.badge {
  display: inline-block;
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
}

.badge:empty { display: none; }

/* Auth Area */
.auth-area { display: flex; align-items: center; gap: 8px; }

.login-form { display: flex; gap: 8px; align-items: center; }

.login-form input {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  width: 140px;
}

.admin-tag {
  background: #4f46e5;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title { font-size: 18px; font-weight: 600; }

/* Modal */
.modal-overlay {
  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;
  z-index: 100;
  padding: 16px;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 200;
  animation: fadeIn 0.3s ease;
}

.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }

/* Sync status */
.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sync-online {
  background: #f0fdf4;
  color: #15803d;
}

.sync-online .sync-dot { background: #16a34a; }

.sync-offline {
  background: #fffbeb;
  color: #92400e;
}

.sync-offline .sync-dot { background: #d97706; }

/* Utils */
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-size: 14px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 12px; }
  .logo { font-size: 20px; }
  .btn-xl { padding: 16px 32px; font-size: 18px; }
  .result-card .info-row { gap: 12px; }
  .restaurant-table { font-size: 13px; }
  .restaurant-table th, .restaurant-table td { padding: 8px 4px; }
  .modal-content { padding: 16px; }
  .login-form input { width: 100px; }
}
