/* Spinner */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid #eee;
  border-top-color: #1d1d1f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #276749;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error { background: #c53030; }

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: #1a1a1a;
  color: #fff;
}
.btn-primary:hover { background: #333; }
.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.btn-secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}
.btn-secondary:hover { background: #f5f5f5; }
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-danger {
  background: #e53e3e;
  color: #fff;
}
.btn-danger:hover { background: #c53030; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  color: #888;
}
.btn-icon:hover { color: #333; }

/* Form group */
.form-group {
  margin-bottom: 16px;
}
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #666;
}
.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

/* Auth Gate */
.auth-gate {
  display: none;
  text-align: center;
  padding: 80px 24px;
}
.auth-gate.show { display: block; }
.auth-gate h2 { margin-bottom: 12px; }
.auth-gate p { color: #666; margin-bottom: 24px; }
.auth-gate .btn { display: inline-block; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: #86868b;
  font-size: 14px;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* Order card */
.order-card {
  background: #fff;
  border: 1.5px solid #f0f0f2;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.order-card:hover { border-color: #d1d1d6; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.order-divider { height: 1px; background: #f0f0f2; margin: 12px 0; }
.order-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.order-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-pending { background: #fff8e1; color: #b8860b; }
.status-pending::before { background: #f5a623; }
.status-confirmed { background: #e8f5e9; color: #2e7d32; }
.status-confirmed::before { background: #4caf50; }
.status-manufacturing { background: #e3f2fd; color: #1565c0; }
.status-manufacturing::before { background: #2196f3; }
.status-shipped { background: #e8eaf6; color: #283593; }
.status-shipped::before { background: #3f51b5; }
.status-completed { background: #f3e5f5; color: #6a1b9a; }
.status-completed::before { background: #9c27b0; }
.status-cancelled { background: #fce4ec; color: #c62828; }
.status-cancelled::before { background: #e53935; }

/* Badge */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-admin { background: #e8eaf6; color: #283593; }
.badge-owner { background: #fce4ec; color: #c62828; }
.badge-vendor { background: #fff3cd; color: #856404; }
.badge-consumer { background: #fff8e1; color: #b8860b; }
.badge-member { background: #f5f5f7; color: #86868b; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
  padding: 4px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Loading state */
.loading-state {
  text-align: center;
  padding: 60px 24px;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h1 { font-size: 24px; font-weight: 700; }
